Unable to trigger scripts

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
rtuite
Posts: 3
Joined: 20 Feb 2018, 15:43

Unable to trigger scripts

20 Feb 2018, 15:54

I'm not completely new to AHK, but it's been several years so I'm quite rusty.

I have the following script, but I'm unable to trigger it. I press Alt+m and nothing happens. I don't see a client running in task manager or in the tray, and I'm not finding a service to see if anything is even looking for keypresses. This is on my work computer, and we are somewhat locked down. So I checked with our security operations guys, and they say it isn't blocked.

The script is a simple one to populate fields in our ticketing system, puts information into fields and tabs to the next ones.

Any idea what's going on here?

Code: Select all

!m::
Send, ser
Send {down}
Send {tab}
Send, 3
Send {tab 2}
Send, 3
Send {tab 5}
Send {down}
Send {tab 2}
Send, mem
Send {tab)
Send, user
Send {tab 2}
Send, tui
Send {tab}
Send, run
Send {tab 3}
Send {left}
Send {delete 6}
Send {end}
Send {backspace}
Send, {space}-{space}
Return
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Unable to trigger scripts

20 Feb 2018, 16:10

This scripts contains syntax errors. You have to send {tab}s, too. Same for {end}, {backspace} etc. Thus, this script won't run, but should produce an error message:

Code: Select all

Error at line 4.

Line Text: tab}
Error: This line does not contain a recognized action.

The program will exit.
It sounds that the script is blocked from running on your computer. There should a trayicon and an Autohotkey.exe process in taskmanager. Have you looked at the logs of your anti-virus?
On the other hand, did you use the installer-exe or the portable zip version of AHK? The first will make sure, that files with ahk-extension will automatically be run by autohotkey.exe (but I guess, security settings for the registry could prevent that). The portable version won't do that.
What happens when you run this "script"?

Code: Select all

msgbox
Edit: I see, you amended the syntax errors. What happens now?
rtuite
Posts: 3
Joined: 20 Feb 2018, 15:43

Re: Unable to trigger scripts

21 Feb 2018, 08:34

Yeah, I re-checked the syntax and realized I needed the "Send" on each line. It still isn't working, though, and I suspect it's because the EXE isn't running. I installed the full version of AHK, but when I launch the program all I get is the help file. No tray icon, no EXE in task manager.
rtuite
Posts: 3
Joined: 20 Feb 2018, 15:43

Re: Unable to trigger scripts

21 Feb 2018, 08:47

I downloaded the portable version, and that does seem to be working. I can run the generic Windows-Z and script, but mine still isn't working.
gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Unable to trigger scripts

21 Feb 2018, 09:24

rtuite wrote:...but when I launch the program all I get is the help file...

Don't run autohotkey.exe, run your ahk-script!! autohotkey.exe is just an interpreter...
Doubleclick the actual script file you created, to run it.

Code: Select all

the generic Windows-Z and script
I have to admit, I don't know what that is or means. What about a script just containing msgbox.
are you sure you are following what is described in the tutorial? https://autohotkey.com/docs/Tutorial.htm#s12

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Google [Bot], jameswrightesq and 282 guests