| View previous topic :: View next topic |
| Author |
Message |
arpat Guest
|
Posted: Sat Sep 03, 2005 5:51 am Post subject: start up |
|
|
Here's a very simple question, for which I could not find answer in help files or the in the forum..
I want to include an ahk file in the startup folder; however, eachtime the windows xp restarts, a dialog box pops out and asks if I want to replace the current script with the already running one. Following the help, I found that I can automate this replacement. However, I do not see any reason why it should load the script twice. Any ideas?
Arpat |
|
| Back to top |
|
 |
ranomore
Joined: 06 Nov 2004 Posts: 178 Location: Salt Lake City, UT
|
Posted: Sat Sep 03, 2005 6:07 am Post subject: |
|
|
I've seen this issue too, but not necessarily with AHK. I think it's a discrepancy between the programs that start via registry settings at startup, and the ones that run because they are in the startup folder. I haven't pinpointed the problem yet on my own pc, but you could start by looking in the following registry key for entries that are both in the registry and in the startup folder.
HKLM\Software\Microsoft\Windows\CurrentVersion\Run |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Sat Sep 03, 2005 7:03 am Post subject: |
|
|
| Another reason the script might launch twice if it's in both the all-users Startup folder and your own user's Startup folder. |
|
| Back to top |
|
 |
N00B Guest
|
Posted: Mon Dec 12, 2005 6:11 am Post subject: Solution |
|
|
Try adding the code:
| Code: |
#SingleInstance ignore
|
This stops the script from reloading or having the msgbox
with the '#single instance' error.
Hope it helps.  |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Jan 07, 2006 10:14 pm Post subject: |
|
|
Run msconfig, look at the Startup tab, and if you see entries for Autohotkey (and other Startup folder items) duplicated with location listed as both "Startup" and "Common Startup" like this:
then the probable cause is that you deleted the startup folder in your individual user startup menu. (This is a known bug in Windows XP.) Take a look at C:\Documents and Settings\%username\Start Menu\Programs (where %username is the username that you log on to Windows with). If there is no Startup folder there, then you need to create a new empty folder named 'Startup'.
You may also need to edit the registry to undo the bit of Windows stupidity that happens when the user Startup folder gets deleted. Look for key name:
| Code: | | HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders |
and check that the 'Startup' data has the following value:
| Code: | | %USERPROFILE%\Start Menu\Programs\Startup |
(that is to say, it should say %USERPROFILE% to match the other entries there). |
|
| Back to top |
|
 |
|