AutoHotkey Community

It is currently May 27th, 2012, 12:21 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: start up
PostPosted: September 3rd, 2005, 5:51 am 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2005, 6:07 am 
Offline

Joined: November 6th, 2004, 11:03 am
Posts: 170
Location: Salt Lake City, UT
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 3rd, 2005, 7:03 am 
Offline

Joined: March 2nd, 2004, 3:36 pm
Posts: 10720
Another reason the script might launch twice if it's in both the all-users Startup folder and your own user's Startup folder.


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Solution
PostPosted: December 12th, 2005, 6:11 am 
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. :mrgreen:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: January 7th, 2006, 10:14 pm 
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:
Image

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


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot], Leef_me, Pulover, rjgatito, Scratch, XstatyK, Yahoo [Bot] and 23 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group