HIDMacros lost all configuration

Report application bugs here
Post Reply
jasinski
Posts: 4
Joined: 20 Aug 2013, 14:59

HIDMacros lost all configuration

Post by jasinski » 28 Aug 2013, 00:12

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,

jasinski
Posts: 4
Joined: 20 Aug 2013, 14:59

Re: HIDMacros lost all configuration

Post by jasinski » 28 Aug 2013, 00:29

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:

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

Re: HIDMacros lost all configuration

Post by admin » 29 Aug 2013, 03:23

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.
Petr Medek
LUAmacros author

Post Reply