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 

start up

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





PostPosted: Sat Sep 03, 2005 5:51 am    Post subject: start up Reply with quote

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

PostPosted: Sat Sep 03, 2005 6:07 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Sep 03, 2005 7:03 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
N00B
Guest





PostPosted: Mon Dec 12, 2005 6:11 am    Post subject: Solution Reply with quote

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. Mr. Green
Back to top
Guest






PostPosted: Sat Jan 07, 2006 10:14 pm    Post subject: Reply with quote

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
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