 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
brotherS
Joined: 01 Jun 2005 Posts: 174
|
Posted: Fri Oct 14, 2005 3:06 pm Post subject: auto-reload default script on "save" |
|
|
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. |
|
| Back to top |
|
 |
polyethene
Joined: 11 Aug 2004 Posts: 5248 Location: UK
|
Posted: Fri Oct 14, 2005 3:50 pm Post subject: |
|
|
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 |
|
 |
justchecking Guest
|
Posted: Fri Oct 14, 2005 7:47 pm Post subject: |
|
|
err brotherS...
are you sure ahk@tampabay.rr.com belongs to Chris?
just checking... |
|
| Back to top |
|
 |
brotherS
Joined: 01 Jun 2005 Posts: 174
|
|
| Back to top |
|
 |
Hotfoot
Joined: 14 Sep 2005 Posts: 21
|
|
| Back to top |
|
 |
brotherS
Joined: 01 Jun 2005 Posts: 174
|
Posted: Sat Oct 15, 2005 8:15 am Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|