Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had just learned a little about using AutoHotKey and had a few .ahk files set up when the latest Microsoft update or security scan rendered them inoperable. I remember AVG had identified something as a virus and I removed it.

When I try to reactivate them they don't work even though the script text is correct!

E.G.: I had one set up to open Firefox and Thunderbird; its name is: OpenFF&TB-Win+F.ahk This is the text in the file:

#f:: "Run B:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe"

"Run B:\Program Files (x86)\Mozilla Firefox\firefox.exe"

"return"

The file is set to run by clicking Window Logo key and F; it had worked before the problem, but not now.

Now no matter what I do it will not run.

Would it help, and is it necessary to uninstall AutoHotKey and ALL the .ahk files and start over again?

Any suggestions would be greatly appreciated.

share|improve this question
    
If you check AVG's logs, what does it tell you it removed? Compiled AHK scripts are often identified as malware (but it doesn't sound like you're compiling them). –  Ƭᴇcʜιᴇ007 Apr 28 '11 at 17:24
    
If you launch them from within AutoHotKey (instead of trying to use the desired hot key) does it run the script? –  Ƭᴇcʜιᴇ007 Apr 28 '11 at 17:28

2 Answers 2

Here are some things to check:

  1. What exactly happens when you execute the script? Do you get an error? What is it?
  2. Does an icon in your system tray appear when you run it?
  3. Do any other AHK scripts work on your machine?
  4. Look at task manager to see if autohotkey.exe is running. Try end-task'ing them all and execute your script again.
  5. Could there be another app taking over control of hotkeys?
  6. If it seems to be the script itself, first try to simplify it. Pare it down to 1 function/hotkey and see if that works.
  7. You can try to reinstall the AHK runtime from scratch. No harm in it. .AHK files are simple text files, so there's nothing to do with those.

I've never seen AHK be interpreted as a virus so hopefully your virus was separate, although it could have infected other files including autohotkey.exe. Do a full system scan to ensure you're not infected.

share|improve this answer
    
Mofoo, Thanks for the tips; I will check out each of them. –  Brian Apr 28 '11 at 17:22
    
+1. // Virus scanners do often mark compiled AHK scripts (compiled as independed .exe files) as viruses due to the encoding techniques AHK uses for this. But that's probably not the case here. // Another thing to check would be whether the .ahk files are present in the Programs/Startup folder in the start menu. // And have you tried right-clicking the .ahk file, and selecting "run as administrator"? (Does not apply to XP.) –  Cerberus Apr 28 '11 at 22:52

If your script actually has the quotes in it, I'm not sure it will work. This might work better:

#f:: 
Run "B:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe"
Run "B:\Program Files (x86)\Mozilla Firefox\firefox.exe"
return
share|improve this answer
    
ranomore, I am having a hard time understanding; my original posted script apears the same as you posted! Both have quotes before the B:\ and after the .exe –  Brian May 4 '11 at 17:13
    
ranomore, I am having a hard time understanding; my original posted script apears the same as you posted! Both have quotes before the B:\ and after the .exe –  Brian May 4 '11 at 17:29
    
ranomore- I will just copy and past the script you posted. BUT DOES IT WORK!! I apprehensively pressed Win+F and held my breath and . . . . . . . IT WORKED !!!!!! I am not sure what exactly was different, but thanks ranomore for helping me get things to work again. Brian –  Brian May 4 '11 at 17:46
    
The difference is where the opening quote is located. "Run B:\program..." is different than Run "B:\program...". –  ranomore May 4 '11 at 23:10
    
Ranomore, Thanks for that explanation and the help. –  Brian May 5 '11 at 17:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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