Variable changes regardless that it has been set
Posted 19 April 2004 - 01:53 PM
To run that script (from a path like this C:\FB\_FBPROCESS) I've created a shortcut on the desktop.
With the upgrade to 1.0.08 something has changed.
The INI file can't be found/read if the script has been started via the desktop shortcut. Based on that, the vars which should hold the login details are empty and have been set by AutoHotkey with its root path.
If the script is started directly everything is fine. :? :?:
Posted 19 April 2004 - 02:10 PM
Posted 19 April 2004 - 02:17 PM
Check the properties of the shortcut, especially the "Start In" (working directory) field. Make sure it is set to be the directory where your INI file resides.
If you discover the exact nature of the change that happened in 1.0.08 vs. the other version, please post it here and I'll try to address it.
Also, the built-in variables %A_ScriptDir% and %A_WorkingDir% may be of use in this case.
Posted 19 April 2004 - 02:56 PM
IniRead, PW, FB.INI, Frontend, PW
IniRead, USER, FB.INI, Frontend, USER
USER = myusername
PW = mypassword
The format of the INI (tab/tab/key/tab/equal/tab/keyval) hasn't changed.
Posted 19 April 2004 - 07:21 PM
1) Installed using the latest Installer.
2) Created the .ahk file and .ini file the way you described.
3) Created a shortcut on the desktop via copy & paste.
4) Ran the shortcut from the desktop.
The values .ini files are correctly read (as shown by "msgbox, pw=%pw%`nuser=%user%").
Perhaps you adding the following line to your script to find out what the working directory is:
The working directory should be the same as the shortcut's "Start In" field. If it isn't, perhaps we can investigate further.