Page 1 of 1

Problem with config file - program turns off

Posted: 04 Jul 2020, 12:12
by maras52
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 5872 times
It works fine.

Can somebody help with this ugly problem ?

Re: Problem with config file - program turns off

Posted: 07 Jul 2020, 09:05
by admin
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?

Re: Problem with config file - program turns off

Posted: 07 Jul 2020, 21:20
by maras52
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.

Re: Problem with config file - program turns off

Posted: 08 Jul 2020, 07:44
by admin
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?

Re: Problem with config file - program turns off

Posted: 08 Jul 2020, 14:30
by maras52
Minor mistake - i think about numlock but write numpad ... :?

This solved the problem.