Problem with config file - program turns off

Report application bugs here
Post Reply
maras52
Posts: 3
Joined: 04 Jul 2020, 11:59
Location: Poland

Problem with config file - program turns off

Post by maras52 » 04 Jul 2020, 12:12

Hello

The problem is when I run a clean program it starts normally, but if the configuration file (xml) is in the directory, the program closes as if loading. In addition, I noticed that when I script the key and use it, the program also turns off.

Windows 10, runing as admin, compatibility mode does't d help :(

I use scripts like this :

Code: Select all

<Macro>
      <Device>NUMPAD</Device>
      <Name>AFK ON/OFF</Name>
      <KeyCode>13</KeyCode>
      <Direction>down</Direction>
      <Action>SCR</Action>
      <Sequence></Sequence>
      <SCEvent></SCEvent>
      <XPLCommand></XPLCommand>
      <ScriptSource>HIDMacros.SendKeysSlow "{NUMPAD}", 100
HIDMacros.SendKeysSlow "{F16}", 100
HIDMacros.SendKeysSlow "{NUMPAD}", 100</ScriptSource>
      <SCText>0</SCText>
      <SCParams></SCParams>
      <Command></Command>
    </Macro>
If i use simple binding to run program like
screen.png
screen.png (14.46 KiB) Viewed 3635 times
It works fine.

Can somebody help with this ugly problem ?

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Problem with config file - program turns off

Post by admin » 07 Jul 2020, 09:05

Hmm, no special idea.
I would start with empty config files (which works) and try to add macros one by one and see which one makes app to crash.
Or lines in your script file, maybe some char needs to be escaped? Did you create the xml by hidmacros (filling macros in app) or manually?
Petr Medek
LUAmacros author

maras52
Posts: 3
Joined: 04 Jul 2020, 11:59
Location: Poland

Re: Problem with config file - program turns off

Post by maras52 » 07 Jul 2020, 21:20

Hi
If i have clear / new / empty config everything works fine, I can even script keys to run programs it also works and don't crash soft.
Now i see when i write script

Code: Select all

HIDMacros.SendKeysSlow "{NUMPAD}", 100
HIDMacros.SendKeysSlow "{F16}", 100
HIDMacros.SendKeysSlow "{NUMPAD}", 100
and click Compile > Test = program shoutdown :/

I write scripts in HIDmacros config file also has been generated in program.

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Problem with config file - program turns off

Post by admin » 08 Jul 2020, 07:44

What is {NUMPAD} supposed to send?
See https://github.com/me2d13/luamacros/wik ... #key-names
I don't think it's valid key name. Isn't it reason for crash? If you remove that call or use valid key name?
Petr Medek
LUAmacros author

maras52
Posts: 3
Joined: 04 Jul 2020, 11:59
Location: Poland

Re: Problem with config file - program turns off

Post by maras52 » 08 Jul 2020, 14:30

Minor mistake - i think about numlock but write numpad ... :?

This solved the problem.

Post Reply