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 

Pre-1.0.13 Changes
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Announcements
View previous topic :: View next topic  
Author Message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Wed Jun 02, 2004 6:38 pm    Post subject: Pre-1.0.13 Changes Reply with quote

I've applied the following changes to the Installer at http://www.autohotkey.com/download/

Added built-in variable %A_ThisMenuItem% which is the name of the user-defined item most recently launched from the tray menu.

Added command OnExit, which specifies a subroutine to run when the script exits.

The above were added to support the following script. If you have any interest in uncluttering your task bar or hiding seldom-used windows, please give it a try and post any improvements or corrections here.

http://www.autohotkey.com/docs/scripts/MinimizeToTrayMenu.ahk
This script assigns a hotkey of your choice to hide any window so that it becomes an entry at the bottom of the script's tray menu. Hidden windows can then be restored individually or all at once by selecting the corresponding item on the menu. If the script exits for any reason, all the windows that it hid will be restored automatically.

To use the above script, you will need to re-download v1.0.12 if your 1.0.12 was downloaded earlier than the timestamp of this message. Thanks.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Wed Jun 02, 2004 8:58 pm    Post subject: Reply with quote

Quote:
Added command OnExit, which specifies a subroutine to run when the script exits.

Very nice addition. I had a script that needed something similar so I removed all the Standard Menu tray options and added my own pause and exit.

Code:
menu, tray, NoStandard
menu, tray, add, Administrator Code, AdminCode
menu, tray, add, Date Format - %format%, DFormat
menu, tray, add ; separator
menu, tray, add, Pause Script, PScript
menu, tray, add, Exit, MenuExit

MenuExit:
FileDelete, c:\winnt\system32\admin.log
ExitApp

PScript:
menu, tray, ToggleCheck, Pause Script
Pause, Toggle
return


Quote:
The OnExit subroutine is called when the script exits by any means.

I know this probably isn't possible, but if you End Task in Windows NT/2000/XP OnExit doesn't run. Might want to put that in the Help File.

Also if you have a MsgBox in the OnExit section and you do a reload you get the error "Could not close the previous instance of this script." And once you click ok on the MsgBox the script closes and does not reload.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Thu Jun 03, 2004 12:42 am    Post subject: Reply with quote

Quote:
I had a script that needed something similar so I removed all the Standard Menu tray options and added my own pause and exit.

Very creative. I thought of that too, but only in conjunction with working on OnExit.

Quote:
I know this probably isn't possible, but if you End Task in Windows NT/2000/XP OnExit doesn't run

I've added it to the help file, thanks. If End Task first tried a polite closure of the window (WM_CLOSE), the OnExit subroutine would run. However, it apparently just kills the process, so I guess there's nothing that can be done. I just tried end-tasking a calculator and Spy++ said it didn't receive any messages prior to being killed.

Quote:
Also if you have a MsgBox in the OnExit section and you do a reload you get the error "Could not close the previous instance of this script." And once you click ok on the MsgBox the script closes and does not reload.

Thanks, I think I've resolved this by having the previous instance's OnExit subroutine retain control over whether it actually exits (in case the MsgBox is important). I've also changed the other prompt to be "Could not close the previous instance of this script. Keep waiting?" Let me know if you can think any improvements.
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Jun 04, 2004 12:09 am    Post subject: Reply with quote

A few more changes have been applied to the installer at http://www.autohotkey.com/download/

Fixed hook hotkeys that used a keyboard prefix but a mouse button suffix when the prefix was also a suffix (broken in v1.0.12) as in this example [thanks jamestr]:
$a::send, a
a & lbutton::

Improved SplashTextOn so that its text is updated more quickly. [thanks Sds]

Improved the Menu command to optionally use ErrorLevel instead of displaying runtime errors.

Added the ability to display the tray menu at the current position of the mouse cursor. Among other things, this allows a custom popup menu to be shown in response to pressing a hotkey or "hot mouse button". Use Menu, Tray, Show

Added the ability to change the script's icon while it's running. This affects both the tray and InputBox icons. Use Menu, Tray, Icon, Filename [, IconNumber].

(the changes to OnExit mentioned above are also in this version)
Back to top
View user's profile Send private message Send e-mail
Atomhrt
Guest





PostPosted: Fri Jun 04, 2004 1:25 am    Post subject: Reply with quote

cmallett wrote:
A few more changes have been applied to the installer at http://www.autohotkey.com/download/
Added the ability to display the tray menu at the current position of the mouse cursor. Among other things, this allows a custom popup menu to be shown in response to pressing a hotkey or "hot mouse button". Use Menu, Tray, Show

WFM! Nice!! Very Happy
Back to top
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Fri Jun 04, 2004 6:41 am    Post subject: Reply with quote

Very nice additions as always.

What do you think of adding variables like:

%A_IconState%
Store whether or not the tray icon exists.

%A_Icon%
A variable to check which Icon is currently being displayed.

thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Fri Jun 04, 2004 8:33 am    Post subject: Reply with quote

this might benefit someone:
Code:
mbutton::
        menu, tray, NoStandard
        menu, tray, show
        menu, tray, Standard
Return



Chris, can it b done that if the user clicks outside the menu then it exits by itself?
(like the tray menu or the tooltip menu)
_________________
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Jun 04, 2004 1:18 pm    Post subject: Reply with quote

Quote:
can it b done that if the user clicks outside the menu then it exits by itself? (like the tray menu or the tooltip menu)

It already does that, at least on my XP and 98 systems here. If you click outside the menu, the menu vanishes.

I plan to add support for at least one additional menu so that you don't have to "sacrifice" the tray menu to get a custom popup menu.

Quote:
What do you think of adding variables like:

%A_IconState%
Store whether or not the tray icon exists.

%A_Icon%
A variable to check which Icon is currently being displayed.

Since the above are rarely used features (comparatively), and since it's possible to track the state yourself using a variable, historically I've not added them out of concern that the help file gets too cluttered. However, I've thought about it and I think if they're mentioned only in the relevant section of the Menu command, the clutter to the built-in variables section is reduced. So I'll put those in.

It's probably even more useful to have things like A_KeyDelay and A_WinDelay. Thanks for the ideas.
Back to top
View user's profile Send private message Send e-mail
beardboy



Joined: 02 Mar 2004
Posts: 444
Location: SLC, Utah

PostPosted: Fri Jun 04, 2004 4:15 pm    Post subject: Reply with quote

Code:
menu, tray, tooltip, VPN connected ; Change system tray icon's tool tip


thanks,
beardboy
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Fri Jun 04, 2004 6:26 pm    Post subject: Reply with quote

Nice one, that certainly belongs in there too.
Back to top
View user's profile Send private message Send e-mail
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Fri Jun 04, 2004 8:07 pm    Post subject: Reply with quote

Quote:
I plan to add support for at least one additional menu so that you don't have to "sacrifice" the tray menu to get a custom popup menu.


i wished for that too, but thought that'd b too much to ask... u already did the mouse menu hours after my suggesting it!
_________________
Back to top
View user's profile Send private message
jamestr



Joined: 05 Apr 2004
Posts: 96
Location: Connecticut USA

PostPosted: Sat Jun 05, 2004 10:09 pm    Post subject: Reply with quote

Quote:
I plan to add support for at least one additional menu so that you don't have to "sacrifice" the tray menu to get a custom popup menu.


That would be real nice.
Could the primary menu, contain entries that call secondary menus? a 2 level hierarchy.

I also prefer popup menus that are dark text on a light background, like the tooltip color scheme.

Maybe the menu,tray,show command could have an option to select the tooltip color scheme.


as always, AHK is an outstanding program Razz
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Sat Jun 05, 2004 11:25 pm    Post subject: Reply with quote

Quote:
Could the primary menu, contain entries that call secondary menus? a 2 level hierarchy.

If you're talking about sub-menus -- which appear when you select a menu item that has an arrow on its right side -- that's definitely planned.

Quote:
I also prefer popup menus that are dark text on a light background, like the tooltip color scheme. Maybe the menu,tray,show command could have an option to select the tooltip color scheme.

I'm not aware of any way to change that without painting the menu items as graphics rather than text. However, it might be possible to change the colors of all menus on your own system by using Control Panel > Display Properties > Advanced > Menu
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Jun 07, 2004 7:03 am    Post subject: Reply with quote

Partially in response to recent requests, more changes have been applied to the installer at http://www.autohotkey.com/download/

Fixed Send {Asc nnnn} so that it allows codes beyond 255 (Unicode) to be sent. [thanks Anandajoti Bhikkhu]

Fixed interference among multiple scripts using the hooks simultaneously.

Changed: A script will only assume CONTROL/ALT/SHIFT/WIN are permanently down if it put them that way. [thanks jamestr & Jon]

Improved the Send command's support for non-English letters, symbols and keyboards. If this applies to you and you notice any problems with this version, please let me know.

Improved the Send command by further limiting its ability to interfere with hotkeys that are being held down by the user to auto-repeat them (only helps hook hotkeys). [thanks jamestr & Jon]

Added the ability to change the tray icon's tooltip via Menu, Tray, Tip [thanks beardboy]

Added the following built-in variables, which contain the current states of their associated commands: A_TitleMatchMode, A_TitleMatchModeSpeed, A_DetectHiddenWindows, A_DetectHiddenText, A_AutoTrim, A_StringCaseSense, A_FormatInteger, A_FormatFloat, A_KeyDelay, A_WinDelay, A_ControlDelay, A_MouseDelay, A_DefaultMouseSpeed, A_IconHidden, A_IconTip, A_IconFile, and A_IconNumber.

Added the built-in variable A_ExitReason, which contains the reason the script is being asked to terminate (e.g. Logoff). [thanks beardboy]

Added command Sort, which arranges a variable's contents in alphabetical or numerical order.
Back to top
View user's profile Send private message Send e-mail
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Mon Jun 07, 2004 8:58 pm    Post subject: Reply with quote

Installer updated again so that compiled scripts also reflect the above changes [thanks beardboy].
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Announcements All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group