AutoHotkey Community

It is currently May 26th, 2012, 7:55 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: July 6th, 2009, 6:43 pm 
Offline

Joined: March 8th, 2008, 11:36 am
Posts: 64
Location: Santa Barbara
Why does this work at a command prompt:
Code:
>autohotkey.exe MyScript.ahk

Usually I can't run programs unless their directory is in the PATH environment, otherwise the computer doesn't know where the program is. Autohotkey is not in the PATH, so how does the computer know where it is?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 6th, 2009, 9:13 pm 
Offline

Joined: November 7th, 2006, 9:47 pm
Posts: 1934
Location: Germany
If i try to call autohotkey.exe on my command line, it does say me that the program is not found, unless I am in same directory. So why do you think your computer knows about autohotkeys path? If it is not in PATH variable ... so you cannot execute it.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: July 6th, 2009, 9:20 pm 
Offline
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
deleyd wrote:
Autohotkey is not in the PATH, so how does the computer know where it is?

It could be in registry.. Check the following:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 7th, 2009, 6:23 pm 
Offline

Joined: March 8th, 2008, 11:36 am
Posts: 64
Location: Santa Barbara
Yup there it is:
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AutoHotkey.exe]
@="C:\\Program Files\\AutoHotkey\\AutoHotkey.exe"

The instructions say to call an autohotkey script use:
Code:
AutoHotkey.exe [Switches] [Script Filename] [Script Parameters]

http://www.autohotkey.com/docs/Scripts.htm#cmd


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, joetazz, perlsmith, Retro Gamer and 70 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group