Micahs wrote:
When you use another computer, chances are that it does not have autohotkey installed, and these env vars are not set.
Nope, AutoHotkey doesn't use environment variables (unless you specifically tell it to.)
AHK help file wrote:
The name "SetEnv" is misleading and is used only for backward compatibility with AutoIt v2. Unlike AutoIt v2, AutoHotkey does not store its variables in the environment. This is because performance would be worse and also because the OS limits such variables to 32K. Use EnvSet instead of SetEnv to write to an environment variable.
USERPROFILE is a standard Windows environment variable (on XP at least), which points to the user's folder (usually C:\Documents and Settings\Username). Unless you use a computer where USERPROFILE has specifically been cleared, it'll be there. Typing "set USERPROFILE" into a command prompt will show you the current value.
If you don't want to unnecessarily set SciTE_Home, you could do this:
Code:
EnvGet, up, USERPROFILE
if up
EnvSet, SciTE_HOME, %sPath%
However, I believe
this would be unnecessary, in light of:
AHK help file wrote:
An environment variable created or changed with this command will be accessible only to programs the script launches via Run or RunWait.
I tend to leave the default options in SciTEGlobal.properties, AHK-specific stuff in ahk.properties, and use SciTEUser.properties for my personal preferences. (It
is blank by default, however I went through the SciTE docs and customized everything to my liking.) In any case, there are only a few computers I edit ahk scripts on, and all of them now have a local copy of SciTE.
