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 

auto-reload default script on "save"

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
brotherS



Joined: 01 Jun 2005
Posts: 174

PostPosted: Fri Oct 14, 2005 3:06 pm    Post subject: auto-reload default script on "save" Reply with quote

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

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.
Back to top
View user's profile Send private message
polyethene



Joined: 11 Aug 2004
Posts: 5248
Location: UK

PostPosted: Fri Oct 14, 2005 3:50 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
justchecking
Guest





PostPosted: Fri Oct 14, 2005 7:47 pm    Post subject: Reply with quote

err brotherS...

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

just checking...
Back to top
brotherS



Joined: 01 Jun 2005
Posts: 174

PostPosted: Fri Oct 14, 2005 8:11 pm    Post subject: Reply with quote

Well, after I donated I got a response from AutoHotkey Support <support@autohotkey.com> - so I believe it's ok Very Happy

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.
Back to top
View user's profile Send private message
Hotfoot



Joined: 14 Sep 2005
Posts: 21

PostPosted: Sat Oct 15, 2005 4:07 am    Post subject: Reply with quote

Just do a search in this forum.

http://www.autohotkey.com/forum/viewtopic.php?t=135&highlight=auto+reload
Back to top
View user's profile Send private message
brotherS



Joined: 01 Jun 2005
Posts: 174

PostPosted: Sat Oct 15, 2005 8:15 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
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