AutoHotkey Community

It is currently May 26th, 2012, 7:46 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 118 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next

Do you think AutoHotkey should have that features/function internally?
Poll ended at August 26th, 2009, 5:23 pm
Yes 33%  33%  [ 4 ]
Yes, even more ToolTip features please 33%  33%  [ 4 ]
No, I don't need them 0%  0%  [ 0 ]
No, to complex to use 25%  25%  [ 3 ]
No 8%  8%  [ 1 ]
Total votes : 12
Author Message
 Post subject:
PostPosted: May 5th, 2009, 10:33 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
I thought I could turn all tooltips into balloons sistem-wide but that wouldn't enlarge maximum text size anyway, neither would it offer any other advantages without applications' support, so better forget that idea. :)

In the example, the coordinates are read relative to the screen but tooltip processes them relative to the window so there's a discrepancy (at least that's what I recall from the test before I posted).

Thanks for considering my reports.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 10th, 2009, 9:04 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
New Options, Many Thanks to Superfraggle for Add ToolTips to controls.

Quote:
phwnd - Parent window hwnd (necessary for addtool below)
ahwnd - ControlId to show ToolTip for, can be class=(Static1,Edit1), can be empty=(If P="" show for parent window only)


Example script: See top post.

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Last edited by HotKeyIt on May 13th, 2009, 7:04 am, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 11th, 2009, 11:23 pm 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Looks useful. Thanks for sharing. 8)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 12th, 2009, 12:28 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
Question: What is the purpose of the following code in your example:
Code:
OnMessage(0x4E,"test")

Just curious...

Edit: Also, I can't figure out what the _tool_tip_id_ parameter is used other than if it is blank or zero, all tooltip windows are deleted. In your example, I changed the value of _tool_tip_id_ parameter for all the examples to an arbitrary number (42) and it worked the same as before. Once again, just curious.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 12th, 2009, 7:23 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Thanks jballi, I've removed OnMessage, this was not necessary.

_tool_tip_id_ is used for ToolTip number, it is stored in static variable like an array:
Code:
_tt_hwnd_list_.= "|" . _tool_tip_id_ . "." . hWnd . "|"

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 12th, 2009, 11:25 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
A few bug fixes:

- Reset control works now. (Set new text and Title and Icon and ...)
- ToolTip displayed better and faster.
- All in one function now ToolTip(), using sub routines.
- Delay option works for ToolTip assosiated with GUI or Control as well.

Enjoy ;)

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Last edited by HotKeyIt on May 13th, 2009, 7:04 am, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2009, 12:15 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
HotKeyIt wrote:
A few bug fixes:

Nice changes. I just started playing with it but I had couple of comments...

1) Your example kills all Tooltips too quickly (3 seconds) after the GUI is displayed. It makes it look like your example works for a couple of tooltips and then stops working entirely. You might add a warning dialog (OK) or attach the "Clear All ToolTips" action to one of the buttons (better). Just a thought...

2) You might want to put your example in the first post. That way folks don't have to search through the thread for a latest example. Just a thought...

3) Whatever code you put in to make "ToolTip displayed better and faster" makes the balloon tooltips appear jumpy if moving the cursor from one balloon tooltip to another balloon tooltip. This is not a big deal for me since I don't plan to use many balloon tooltips but I thought I would point it out.

Addendum:
4) The "Click to Change" example doesn't work (at least for me). A new tooltip appears briefly but then when the cursor is moved away and then back, no tooltip is displayed for the two "ToolTip 1" buttons.

Keep up the good work! :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2009, 7:06 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
jballi wrote:
HotKeyIt wrote:
A few bug fixes:

Nice changes. I just started playing with it but I had couple of comments...

1) Your example kills all Tooltips too quickly (3 seconds) after the GUI is displayed. It makes it look like your example works for a couple of tooltips and then stops working entirely. You might add a warning dialog (OK) or attach the "Clear All ToolTips" action to one of the buttons (better). Just a thought...

2) You might want to put your example in the first post. That way folks don't have to search through the thread for a latest example. Just a thought...

3) Whatever code you put in to make "ToolTip displayed better and faster" makes the balloon tooltips appear jumpy if moving the cursor from one balloon tooltip to another balloon tooltip. This is not a big deal for me since I don't plan to use many balloon tooltips but I thought I would point it out.

Addendum:
4) The "Click to Change" example doesn't work (at least for me). A new tooltip appears briefly but then when the cursor is moved away and then back, no tooltip is displayed for the two "ToolTip 1" buttons.

Keep up the good work! :)


1 removed
2 gone
3 je I know, will check if possible to fix, looks like it is being redrawn.
4 should work now

Thank you ;)

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Last edited by HotKeyIt on May 13th, 2009, 10:21 am, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2009, 8:04 am 
Offline

Joined: June 17th, 2008, 7:51 am
Posts: 243
Nice job. :P
Das kann ich gut gebrauchen. Danke dafür.

_________________
Greetings
Rog


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2009, 3:36 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
Observations on the latest version:
- the timeout popup flickers like mad (happened in previous version too)
- the GUI tooltip appears even when hovering titlebar or min/max/close buttons (happened in previous version too)
- tooltip for button ToolTip1 (after change - the blue one) remains on screen until clicking the button again and then won't show up anymore
- inconsistent spelling throughout the script; correct is balloon and associated. :oops:
- close button won't show up in tooltips (Win9x issue, reported only for whoever wonders if it works)

Everything else works fine. Thanks for the continuous improvements. 8)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2009, 4:57 pm 
It seems, as If X and Y don't work any more. When I include them, no tooltip is shown. When I delete them, ToolTip is shown near mousepointer.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2009, 6:27 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Drugwash wrote:
Observations on the latest version:
1 the timeout popup flickers like mad (happened in previous version too)
2 the GUI tooltip appears even when hovering titlebar or min/max/close buttons (happened in previous version too)
3 tooltip for button ToolTip1 (after change - the blue one) remains on screen until clicking the button again and then won't show up anymore
4 inconsistent spelling throughout the script; correct is balloon and associated. :oops:
5 close button won't show up in tooltips (Win9x issue, reported only for whoever wonders if it works)

Everything else works fine. Thanks for the continuous improvements. 8)

Many thanks for testing and feedback
1. Can you try again, hope it is better now
2. Not sure how to get rid of that.
- Possibly it is better to associate the ToolTip to a GroupBox!?!
3. should work now
4. :oops:
5. Thank you, I will add to top post.

ruespe nli wrote:
Posted: Wed May 13, 2009 5:57 pm Post subject:
It seems, as If X and Y don't work any more. When I include them, no tooltip is shown. When I delete them, ToolTip is shown near mousepointer.

Should work now ;)

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2009, 8:03 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
New functions, see top post ;)
Code:
hIcon:= GetAssociatedIcon(A_AhkPath)
ToolTip(1,"Test","AutoHotkey","I" . hIcon)

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 13th, 2009, 8:36 pm 
Offline
User avatar

Joined: September 8th, 2008, 12:26 am
Posts: 1048
Location: Ploieşti, RO
Flickering still not fixed, but the rest looks good. :)

Incidentally, few days ago I stumbled into an interesting couple of functions that I needed for one of my toys - hopefully you find them useful:
Code:
; http://msdn.microsoft.com/en-us/library/bb776414(VS.85).aspx
; shell32.dll
; Extracts the associated icon's index for the file specified in path
; Requires path and icon index
; Icon must be destroyed when no longer needed (see below)

ExtractAssociatedIcon(ByRef ipath, ByRef idx)
{
hInst=0   ; reserved, must be zero
hIcon := DllCall("ExtractAssociatedIcon", "UInt", hInst, "UInt", &ipath, "UShortP", idx)
return ErrorLevel
}

; http://msdn.microsoft.com/en-us/library/bb776415(VS.85).aspx
; shell32.dll
; Extracts the associated icon's index and ID for the file specified in path
; Requires path, icon index and ID
; Icon must be destroyed when no longer needed (see below)

ExtractAssociatedIconEx(ByRef ipath, ByRef idx, ByRef iID)
{
hInst=0   ; reserved, must be zero
hIcon := DllCall("ExtractAssociatedIconEx", "UInt", hInst, "UInt", &ipath, "UShortP", idx, "UShortP", iID)
return ErrorLevel
}

DestroyIcon(hIcon)
{
DllCall("DestroyIcon", UInt, hIcon)
}


Report this post
Top
 Profile  
Reply with quote  
PostPosted: May 14th, 2009, 7:09 am 
Offline
User avatar

Joined: January 25th, 2006, 8:08 am
Posts: 225
Location: Froschtümpel
Could you please give an example to add a tooltip to the traybar?

I already tried the following, but didn't succeed
Code:
ControlGet, Tray_hWnd, hWnd,, TrayNotifyWnd1  , ahk_class Shell_TrayWnd
ToolTip(6,"This is a ToolTip with Title and close button","Welcome","C1 D5 P" . Tray_hWnd)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 118 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 8  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Xx7 and 13 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