Page 1 of 1

HIDMacros lost all configuration

Posted: 28 Aug 2013, 00:12
by jasinski
Because HIDMacros won't work with acccented chars, I created an AutoHotKey script to turn HIDMacros on/off when I need to write in other languages:

Code: Select all

; Ctrl + F3 ⇒ Run HIDMacros
^F3::
  Run C:\apps\HidMacros_21\HIDMacros.exe
  return

; Ctrl + Shift + F3 ⇒ Close HIDMacros
+^F3::
  process=HIDMacros.exe 
  Process, Exist, %process%
  if pid := ErrorLevel
  {
    Loop 
    {
      WinClose, ahk_pid %pid%, , 5	; will wait 5 sec for window to close
      if ErrorLevel	; if it doesn't close
        Process, Close, %pid%	; force it 
      Process, Exist, %process%
    } Until !pid := ErrorLevel
  }
  return
It worked, but when HIDMacros opened again it had lost all configuration, i.e., the 'Macros' list was blank.

Any idea what might have happened?

(gonna cry now after losing all my awesome macros... :cry: )

Cheers,

Re: HIDMacros lost all configuration

Posted: 28 Aug 2013, 00:29
by jasinski
I think I understand what happened. When I ran HIDMacros programmatically (instead of using the desktop shortcut), it has overwritten the settings file for some obscure reason.

I fixed the Autohotkey script so that it now runs HIDMacros from a given location/folder, and now it seems to work ok:

Code: Select all

; Ctrl + F3 ⇒ Run HIDMacros
^F3::
  Run C:\apps\HidMacros_21\HIDMacros.exe, C:\apps\HidMacros_21\
  return

; Ctrl + Shift + F3 ⇒ Close HIDMacros
+^F3::
  process=HIDMacros.exe 
  Process, Exist, %process%
  if pid := ErrorLevel
  {
    Loop 
    {
      WinClose, ahk_pid %pid%, , 5   ; will wait 5 sec for window to close
      if ErrorLevel   ; if it doesn't close
        Process, Close, %pid%   ; force it 
      Process, Exist, %process%
    } Until !pid := ErrorLevel
  }
  return
My good old macros are still gone for good, I'm afraid :cry:

Re: HIDMacros lost all configuration

Posted: 29 Aug 2013, 03:23
by admin
Configuration is stored when you close HidMacros. If you kill it (force to be closed) it won't be saved.
However you can save macros with button (in the latest beta).
Settings should be stored in application's directory and current dir should not play a role, but I can not be 100% sure as I don't know how Authotkey executes application.