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 

ToolTip() - Advanced ToolTip features + Unicode
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  

Do you think AutoHotkey should have that features/function internally?
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
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Wed Aug 26, 2009 4:45 am    Post subject: Reply with quote

Check out here Wink
_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
ruespe



Joined: 17 Jun 2008
Posts: 243

PostPosted: Wed Aug 26, 2009 6:27 am    Post subject: Reply with quote

ballyhairs wrote:
Thanks for the reply.. Now one question my friend..
How do I get special color code, this was your example
Quote:
- this can be 0x00FF00 or 00FF00 or Blue, Lime, Black, White...


I use Colorpix.exe to pick a color on the screen and get its code, but its different, for example, if Colorpix.exe points at a color as RGB 237.237.237, now how do I translate that to your script?
Just use Windows Spy. You find by right-clicking any running AHK-Icon in SystemTray. But have a look, it shows you BGR instead of RGB.
Back to top
View user's profile Send private message
ballyhairs



Joined: 02 Feb 2009
Posts: 112

PostPosted: Wed Aug 26, 2009 6:44 am    Post subject: Reply with quote

Thanks Guys Very Happy
Back to top
View user's profile Send private message
Guest






PostPosted: Fri Sep 04, 2009 10:39 pm    Post subject: Reply with quote

I love this tooltip, the thing is that I trimmed it down because I don't need the rest of the functions, I can't figure the rest out... I need your help in few things since Im a noob..

Can you help me trim it down even more? I know that there are few things left that are not necessary.
How can I get rid of that tail thing while keeping it rounded at the corners and keep it at the corner of the screen no matter what resolution I have without the need to set position in numbers?
Is there a way that when I click on the tooltip no matter where it will disappear and take me to (D:\Download)?

Help appreciated guys

Here is my script:


Code:
OnMessage(0x4e,"WM_NOTIFY") ;Will make LinkClick and ToolTipClose possible

Restart:
hwndtt:=ToolTip(99,"Please click a link:`n`n`n`n`n"
      , "Welcome to ToolTip Control                          "
      , "Q1 L1 O1 T188 E10.10.50.40 BWhite FBlack I" . GetAssociatedIcon(A_ProgramFiles . "\Internet Explorer\iexplore.exe")
      . " P99 X" A_ScreenWidth . " Y" . A_ScreenHeight)
Sleep, 4000
Reload
Return


99ToolTip:
If InStr(link:=ErrorLevel,"http://")
   Run iexplore.exe %link%
else if IsLabel(link:=RegExReplace(link,"[^\w\.]","_"))
   SetTimer % link,-150
else if link
{
   Run % link
   SetTimer, Restart, -100
}
Return



WM_NOTIFY(wParam, lParam, msg, hWnd){
   ToolTip("",lParam,"")
}
Back to top
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Sat Sep 05, 2009 10:56 am    Post subject: Reply with quote

Anonymous wrote:
How can I get rid of that tail thing while keeping it rounded at the corners

As far as I know its not possible, but below you will find a workaround Smile
Anonymous wrote:
keep it at the corner of the screen no matter what resolution I have without the need to set position in numbers?

Insteat numbers you can use xTrayIcon yTrayIcon.
What is wrong with A_ScreenWidth + A_ScreenHight?
Anonymous wrote:
Is there a way that when I click on the tooltip no matter where it will disappear and take me to (D:\Download)?


Sure, I am not sure if this is the easiest way but it works Wink

Code:
Sleep, 100
gui,+LastFound
guihwnd:=WinExist()
OnMessage(0x1C,"WM_ACTIVATEAPP") ;Will make Click possible
Restart:
hwndtt:=ToolTip(99,"Please click`n`n`n`n`n"
      , "Welcome to ToolTip Control                          "
      , "Q1 O1 T188 E10.10.50.40 BWhite FBlack I" . GetAssociatedIcon(A_ProgramFiles . "\Internet Explorer\iexplore.exe")
      . " P99 XTrayIcon YTrayIcon")
Return



WM_ACTIVATEAPP(wParam, lParam, msg, hWnd){
   global hwndtt,guihwnd
   MouseGetPos,,,win
   If (wParam=1 and hwnd=guihwnd and win=hwndtt)
      Run % "explorer.exe /e`, /n`,D:\Downloads"
}


Possibly this workaround will help you since you want to display it in a corner, here the tail is shown outside screen:
Code:
Sleep, 100
gui,+LastFound
guihwnd:=WinExist()
OnMessage(0x1C,"WM_ACTIVATEAPP") ;Will make LinkClick and ToolTipClose possible
Restart:
hwndtt:=ToolTip(99,"Please click`n`n`n`n`n"
      , "Welcome to ToolTip Control                          "
      , "Q1 O1 T188 E10.10.50.40 BWhite FBlack I" . GetAssociatedIcon(A_ProgramFiles . "\Internet Explorer\iexplore.exe")
      . " P99 X" A_ScreenWidth . " Y" . A_ScreenHeight+21)
Return



WM_ACTIVATEAPP(wParam, lParam, msg, hWnd){
   global hwndtt,guihwnd
   MouseGetPos,,,win
   If (wParam=1 and hwnd=guihwnd and win=hwndtt)
      Run % "explorer.exe /e`, /n`,D:\Downloads"
}


I have made a small fix to ToolTip() so you can now dispay a centered tail as well (you'll need to download the function again!)
Example:
Code:
Sleep, 100
gui,+LastFound
guihwnd:=WinExist()
OnMessage(0x1C,"WM_ACTIVATEAPP") ;Will make LinkClick and ToolTipClose possible
Restart:
hwndtt:=ToolTip(99,"Please click`n`n`n`n`n"
      , "Welcome to ToolTip Control                          "
      , "Q1 O1 T188 E10.10.50.40 J1 BWhite FBlack I" . GetAssociatedIcon(A_ProgramFiles . "\Internet Explorer\iexplore.exe")
      . " P99 X" A_ScreenWidth/2 . " Y" . A_ScreenHeight)
Return



WM_ACTIVATEAPP(wParam, lParam, msg, hWnd){
   global hwndtt,guihwnd
   MouseGetPos,,,win
   If (wParam=1 and hwnd=guihwnd and win=hwndtt)
      Run % "explorer.exe /e`, /n`,D:\Downloads"
}

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Sep 05, 2009 11:28 am    Post subject: Reply with quote

The only good thing in the new version is that its possible to click anywhere on the tooltip and have it do something


2 Bugs:
-It doesn't open (D:\Downloads), instead it always opens (C:\Users\Administrator\Documents) in exploring mode Sad
-clicking on it to have it open a location doesn't make it disappear.

Hope you fix these bugs

And I hope you can get rid of that tail in the future, instead of replacing it to the middle Very Happy
Back to top
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Sat Sep 05, 2009 11:43 am    Post subject: Reply with quote

Anonymous wrote:
-It doesn't open (D:\Downloads), instead it always opens (C:\Users\Administrator\Documents) in exploring mode Sad
-clicking on it to have it open a location doesn't make it disappear.

Let's try to open C:\Temp, it works fine for me Confused
You must hide it manually:
Code:
Sleep, 100
gui,+LastFound
guihwnd:=WinExist()
OnMessage(0x1C,"WM_ACTIVATEAPP") ;Will make LinkClick and ToolTipClose possible
Restart:
hwndtt:=ToolTip(99,"Please click`n`n`n`n`n"
      , "Welcome to ToolTip Control                          "
      , "Q1 O1 T188 E10.10.50.40 J1 BWhite FBlack I" . GetAssociatedIcon(A_ProgramFiles . "\Internet Explorer\iexplore.exe")
      . " P99 X" A_ScreenWidth/2 . " Y" . A_ScreenHeight)
Return



WM_ACTIVATEAPP(wParam, lParam, msg, hWnd){
   global hwndtt,guihwnd
   MouseGetPos,,,win
   If (wParam=1 and hwnd=guihwnd and win=hwndtt){
      Run % "explorer.exe /e`, /n`,C:\Temp"
      ToolTip(99,"","","GTTM_POP")
   }
}

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Sep 05, 2009 12:14 pm    Post subject: Reply with quote

Thanks HotKeyIt, I needed to change few things and now I have it working fine..

Code:
Sleep, 100
gui,+LastFound
guihwnd:=WinExist()
OnMessage(0x1C,"WM_ACTIVATEAPP") ;Will make LinkClick and ToolTipClose possible
Restart:
hwndtt:=ToolTip(99,"Please click`n`n`n`n`n"
      , "Welcome to ToolTip Control                          "
      , "Q1 O1 T188 E10.10.50.40 J1 BWhite FBlack I" . GetAssociatedIcon(A_ProgramFiles . "\Internet Explorer\iexplore.exe")
      . " P99 X" 15855 . " Y" . 1198) ;Changed this to get rid of the mouse tail
Sleep, 2000 ;And this to make it reload and so disappear
Reload
Return



WM_ACTIVATEAPP(wParam, lParam, msg, hWnd){
   global hwndtt,guihwnd
   MouseGetPos,,,win
   If (wParam=1 and hwnd=guihwnd and win=hwndtt){
      Run, E:\Music\ ;And this which opens explorer without treeview and the right location
      ToolTip(99,"","","GTTM_POP")
   }
}


One Req if possible, can you make it fade out? Would make my day


P.S. Will keep this page on my Bookmarks to see if you can get rid of that mouse tail Very Happy
Back to top
Guest






PostPosted: Sat Sep 05, 2009 12:36 pm    Post subject: Reply with quote

HotKeyIt:

Let me keep you busy today Wink

New Bug:
Im trying to make a new tooltip in the same script but for something else, I tried to make it do something else when clicked but then I get this error:



How can you make it function for other things and do other thing?
Back to top
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Sat Sep 05, 2009 4:14 pm    Post subject: Reply with quote

You must not include the function several times:!:
You need to check what hwnd you got when you click a ToolTip in WM_ACTIVATEAPP, post your script and I will help if you don't figure out your self.
_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Guest






PostPosted: Sat Sep 05, 2009 4:47 pm    Post subject: Reply with quote

Done, this part solved, thanks Smile
All I did was to give the other one a different name (WM_ACTIVATEAPP3), was that the right way? It did the trick though Very Happy
Back to top
Gauss



Joined: 10 Sep 2009
Posts: 203

PostPosted: Sun Feb 07, 2010 11:48 am    Post subject: Reply with quote

How can I make it display clipboard content?
I tried this but it wont work..

Code:
ToolTip(99,"%Clipboard%"
      , "Winamp"
      , "Q1 O1 T190 E2.2.50.25 J1 BWhite FBlack I" . GetAssociatedIcon("%ProgramFiles%\Winamp\winamp.exe")
      . " P99 X" (A_ScreenWidth-20) . " Y" . (A_ScreenHeight-125))
Sleep, 2000
Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Sun Feb 07, 2010 1:56 pm    Post subject: Reply with quote

Is should be:
Code:
ToolTip(99,Clipboard
...

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Gauss



Joined: 10 Sep 2009
Posts: 203

PostPosted: Sun Feb 07, 2010 2:42 pm    Post subject: Reply with quote

Thanks, it works fine now Smile

Just one thing, is it possible to get rid of the tail above tooltip?
Because in my case I want it to appear just above the system tray but without a tail, or at least get the tail to point to the corner.

Here is how it looks now..

Back to top
View user's profile Send private message
HotKeyIt



Joined: 18 Jun 2008
Posts: 4653
Location: AHK Forum

PostPosted: Sun Feb 07, 2010 5:04 pm    Post subject: Reply with quote

Try this
Code:
ToolTip(99,Clipboard
      , "Winamp"
      , "Q1 O1 T190 E2.2.50.25 J1 BWhite FBlack I1"
      . " P99 X" (A_ScreenWidth) . " Y" . (A_ScreenHeight+22))
Sleep, 2000
ExitApp

_________________
AHK_H (2alpha) AHF TT _Struct WatchDir Yaml _Input ObjTree RapidHotkey DynaRun Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 6 of 8

 
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