I have an autohotkey script that is continuously running on my computer. I inadvertently saved a blank script over it, but the original is still running in the background.

I tried to recover the original .ahk file using Recuva but that didn't work.

Typically with autohotkey I would right-click the green AHK "H" button in the taskbar tray, click "Edit This Script" and the problem would be solved. Unfortunately, I have this script set for no tray icon so it does not appear in the tray.

Is there any way to toggle off "NoTrayIcon", or some command I can send that would open it for editing; perhaps something in the Sysinternals Suite that could do the trick, other third party software, etc.?

Any help would be tremendously appreciated.

  • I think you may be out of luck in this case. In the future, it may be advisable to bing a key to Menu, Tray, Icon to re-show the icon. You can also bind a key to Edit to edit the current script when the tray icon is hidden. – Worthwelle Jun 14 '18 at 16:26
  • Simply restoring the file from the recent backup is the right thing to do in such scenario. Do you have backups? – Kamil Maciorowski Jun 14 '18 at 16:30
  • You could also try using a hex editor to recover the script from the running process. – Worthwelle Jun 14 '18 at 16:30

Use a service such as OneDrive. Create a folder to hold all of your AHK scripts under the OneDrive folder. Onedrive creates up to 30 revisions for you. You can download older versions of any of your scripts this way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.