AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

something like a system32 folder for ahk

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
imapow



Joined: 13 Mar 2008
Posts: 162
Location: Trøndelag, Norway

PostPosted: Wed May 14, 2008 7:08 am    Post subject: something like a system32 folder for ahk Reply with quote

one of the forst program coding i lernd war CMD batsh programing. some thing i found wery neet with cmd was the system32 folder. put any program, script ore function in the system32 folder and it becoms a code in cmd. is there eny sutsh folder in ahk??
_________________
-._.-¨¯¨-._.-IM@PΩW-._.-¨¯¨-._.-
Back to top
View user's profile Send private message
n-l-i-d
Guest





PostPosted: Wed May 14, 2008 9:42 am    Post subject: Reply with quote

This is related to the Windows PATH variable. Windows itself has global variables too, they are also called environment variables (shortened by me to: env-vars).

You can find them "by hand" (Control Panels -> System -> Advanced system settings)
You can get them on the command line in a DOS box (setting them is more difficult)
You can get/set them directly in AutoHotkey with EnvGet/EnvSet.

AutoHotkey has most env-vars already built-in, prefixed with A_ (like: A_WinDir, A_ProgramFiles, etcet. You can compare them with the Wikipedia list).

The PATH env-var is a semi-colon delimited list of full paths to the directories in which executables look for dependencies. So, you can set your own "system32" directory, by adding it to the PATH env-var.

Changing system env-vars requires admin rights. User env-vars can be changed however. No restart required, but any programs that are already running will need to be relaunched for them to recognize the change.

To make it permanent, you can use Windows (Control Panel), if you want to automate it you'd might have to edit some file (autoexec.bat/config.sys, autoexec.nt/config.nt) depending on your system and/or the registry, and possibly restart.

HTH
Back to top
Lexikos



Joined: 17 Oct 2006
Posts: 2558
Location: Australia, Qld

PostPosted: Wed May 14, 2008 9:59 am    Post subject: Reply with quote

Use Run.
Run wrote:
If Target is a local file and no path was specified with it, A_WorkingDir will be searched first. If no matching file is found there, the system will search for and launch the file if it is integrated ("known"), e.g. by being contained in one of the PATH folders.
Back to top
View user's profile Send private message
imapow



Joined: 13 Mar 2008
Posts: 162
Location: Trøndelag, Norway

PostPosted: Wed May 14, 2008 1:46 pm    Post subject: Reply with quote

k. thanks
_________________
-._.-¨¯¨-._.-IM@PΩW-._.-¨¯¨-._.-
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group