AutoHotkey Community

It is currently May 27th, 2012, 5:04 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: October 14th, 2005, 4:06 pm 
Offline

Joined: June 1st, 2005, 12:36 pm
Posts: 174
Hi,

I'm using these lines in my AHK script that's loaded when Windows starts up. It allows me to just click the tray icon with the left mouse button once to reload the script:

Code:
#Persistent  ; Keep this script running until the user selects Exit.
Menu, Tray, Click, 1  ; Remove this line if you prefer double-click vs. single-click.
Menu, Tray, Add  ; Separator
Menu, Tray, Add, &Reload, Reload
Menu, Tray, Default, &Reload ; what you define as default is bolded
return


Problem: sometimes it not only reloads the script but clicks 'through' the refreshed tray icon (that's moved to the last position in the tray) on the icon that replaces its old position, wich results in unwanted behaviour.
:?

I heard there's a way to automatically reload the script whenever I save the file? Possible? CPU consuming? Any ideas?

Thanks!

_________________
DonationCoder.com brings AHK to the newbies!
Fan of AutoHotkey? Consider an occasional donation to its developer, Chris Mallett.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2005, 4:50 pm 
Offline
User avatar

Joined: August 11th, 2004, 1:47 am
Posts: 5347
Location: UK
Try this:
Code:
#Persistent
Menu, Tray, Click, 1
Menu, Tray, Add
Menu, Tray, Add, &Reload, Reload
Menu, Tray, Default, &Reload
Return

Reload:
Reload

When it reload, the tray icon might be in a different position but I think this is normal.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2005, 8:47 pm 
err brotherS...

are you sure ahk@tampabay.rr.com belongs to Chris?

just checking...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: October 14th, 2005, 9:11 pm 
Offline

Joined: June 1st, 2005, 12:36 pm
Posts: 174
Well, after I donated I got a response from AutoHotkey Support <support@autohotkey.com> - so I believe it's ok :D

But you are right, that only supports http://www.autohotkey.com/forum/viewtopic.php?t=5810 - there should be an official "Donate" button on top of http://www.autohotkey.com/ and http://www.autohotkey.com/forum/

_________________
DonationCoder.com brings AHK to the newbies!
Fan of AutoHotkey? Consider an occasional donation to its developer, Chris Mallett.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 15th, 2005, 5:07 am 
Offline

Joined: September 14th, 2005, 5:21 am
Posts: 21
Just do a search in this forum.

http://www.autohotkey.com/forum/viewtop ... uto+reload


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 15th, 2005, 9:15 am 
Offline

Joined: June 1st, 2005, 12:36 pm
Posts: 174
Thanks! I did a search before asking but did not find that nice post!

_________________
DonationCoder.com brings AHK to the newbies!
Fan of AutoHotkey? Consider an occasional donation to its developer, Chris Mallett.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 77 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