AutoHotkey Community

It is currently May 26th, 2012, 9:10 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 118 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7, 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: June 7th, 2009, 8:31 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
At the bottom of ToolTip() post you will find alternative function that requires RemoteBuf.ahk which can be found here: [module] RemoteBuffer 2.0.
Using this function you can show ToolTip at TrayIcon coordinates of your app.
For example:
Code:
ToolTip(1,"text","title","C1 O1 xTrayIcon yTrayIcon")

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 9th, 2009, 6:40 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Fix wrote:
- Fixed to display ToolTip correct when icon in tray is hidden
- Fixed Q option so now enabling usual ToolTip will work and colored ToolTips in Vista are possible (did nobody try it :?: :?)

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2009, 6:09 am 
Offline

Joined: October 27th, 2006, 10:12 am
Posts: 649
I would like to have a ToolTip which can also

- change the font size
- support physical effects (gravitation, swinging), especially e.g. to show visually which file/song was deleted or moved into a given directory
- auto-fade out


In short having some kind of ToolTip which does not distract the user but should look bigger and cooler. I am not sure if anything similar exists already?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 14th, 2009, 7:07 am 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
automaticman wrote:
I would like to have a ToolTip which can also

- change the font size
- support physical effects (gravitation, swinging), especially e.g. to show visually which file/song was deleted or moved into a given directory
- auto-fade out


In short having some kind of ToolTip which does not distract the user but should look bigger and cooler. I am not sure if anything similar exists already?


I have no idea how to change the size of font and font itself, if I find anything I will try to transcribe.
You can use E option to make it bigger.
All we have is Animatewindow
Fade out is done when you call:
Code:
ToolTip(1,"","","GTTM_POP")

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 20th, 2009, 4:26 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
Option J wrote:
Specify J1 to center the ToolTip on a control

Code:
Gui,Add,Button,,Button1
ToolTip(1,"A centered ToolTip","","J1 P1 AButton1")
Gui,Add,Button,,Button2
ToolTip(2,"A centered BalloonTip","Balloon","J1 O1 P1 AButton2")
Gui, Show
Return
GuiClose:
ToolTip()
ExitApp


Option XTrayIcon + YTrayIcon wrote:
RemoteBuf is now optional.
This means if you got it, the coordinates of TrayIcon will be found else not and controlpos will be used.


ToolTipClick wrote:
When option L1 is not used so your ToolTip has no Links you can still perform an action when your ToolTip is clicked or closed


Code:
OnMessage(0x201,"WM_LBUTTONDOWN") ;Will make ToolTip Click possible
WM_LBUTTONDOWN(wParam,lParam,msg,hWnd){
   If tt%hwnd% {
      MsgBox, 262148,ToolTip Clicked, Close ToolTip
      IfMsgBox Yes
         ToolTip(tt%hwnd%)
   }
}
OnMessage(0x4e,"WM_NOTIFY") ;Will make LinkClick and ToolTipClose possible
WM_NOTIFY(wParam, lParam, msg, hWnd){
   ToolTip("",lParam,"")
}
Sleep, 10
ToolTip(1,"<a>Click</a>`n<a>Onother one</a>`n"
. "<a This link is different`nit uses different text>Different</a>`n"
. "<a>ExitApp</a>","ClickMe","L1 P99 C1")
hwnd:=ToolTip(2,"Click me anywhere!","Click Me","P99 xTrayIcon yTrayIcon C1")
tt%hwnd%:= 1
Return

ToolTip:
link:=ErrorLevel
SetTimer, MsgBox, -10
Return

1ToolTipClose:
ExitApp

MsgBox:
If Link=ExitApp
   ExitApp
MsgBox % Link
Return

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Help with tooltip
PostPosted: July 1st, 2009, 1:55 pm 
I was trying to get diferent text tip depending on listview row behind the cursor.

I have a funtion that gets the info of the row, and can change de text of the tip, but I would like how to make the function was launched automatically as the tooltip() function.

Is there any option in tooltip() to make this (call a function that can change the content of the tip, just before it is showed)?

Thanks.


Report this post
Top
  
Reply with quote  
 Post subject: Re: Help with tooltip
PostPosted: July 2nd, 2009, 9:12 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
New Feature - Dynamic Text wrote:
You can change ToolTip text, title, color and much more before a ToolTip is shown now.
Usage is simmilar to LinkClick but instead launching a function,
ToolTip("",lParam) returns your control id.
ErrorLevel contains toolId that you need to specify using A option.
For example:
Code:
...
WM_NOTIFY(wParam,lParam){
 If (control:=ToolTip("",lparam)){
     ToolTip(control,"newtext","","G1 A" . ErrorLevel)
...


Here are 2 examples that I used for testing.
This one is included in function help:
Code:
OnMessage(0x4e,"WM_NOTIFY")
Gui,Add,Button,,Time
Gui,Add,Button,,Username
Gui,Add,Button,,User is Admin?
Gui,Add,Button,,IP addresses
Loop 4
   ToolTip("Button1"," ","","p1 aButton" . A_Index)
gui,show
Return

WM_NOTIFY(wParam,lParam){
   If (control:=ToolTip("",lparam)){
      Tool:=ErrorLevel
      MouseGetPos,,,,ClassNN
      If (ClassNN="Button1"){
         FormatTime,text,%A_Now%,HH:mm:ss
         Title:="Time"
      } else if (ClassNN="Button2"){
         text:=A_UserName,title:="UserName"
      } else if (ClassNN="Button3"){
         text:=(A_ISAdmin ? "Yes" : "No"),title:="User is Admin?"
      } else if (ClassNN="Button4"){
         text:= "1: " A_IPAddress1 "`n2: " A_IPAddress2 "`n3: " A_IPAddress3 "`n4: " A_IPAddress4
         title:="IP Addresses"
      }
      ToolTip(control,text,title,"G1 A" . Tool . " I" (InStr("Button1Button2",ClassNN) ? "2" : "1"))
   }
}

GuiClose:
ExitApp


@ segalion, thanks for your request, this might help you, enjoy ;)
Code:
OnMessage(0x4e,"WM_NOTIFY")
Gui,Add,ListView,r20 AltSubmit Checked gFocus hwndLVhWnd vListView,Test
Gui,+LastFound
hwnd:=WinExist()
ToolTip("ListView","default","","P1 aSysListView321")
Loop 20
   LV_Add("",A_Index)
gui,show
Return

WM_NOTIFY(wParam,lParam){
   global
   If (control:=ToolTip("",lparam)){
      Tool:=ErrorLevel
      If (control="ListView" and row>0){
         LV_GetText(text,row,1)
         ToolTip(control,"Row Text: " text,action,"G1 A" . Tool)
      } else
         ToolTip(control,"check or select an item`nthen move mouse away and back to list","","G1 A" . Tool)
   }
}

Focus:
   If InStr(ErrorLevel,"F",1){
      row:=A_EventInfo
      action:="Focused"
   } else If InStr(ErrorLevel,"C",1){
      row:=A_EventInfo
      action:="Checked"
   }
SetTimer,PostMessage,-10
Return

PostMessage:
KeyWait,LButton
PostMessage,0x200,1,,,ahk_id %hwnd%
MouseGetPos,x,y
MouseMove,% x+1,% y
Return

GuiClose:
ExitApp

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2009, 1:06 pm 
Thanks a lot HotKeyIt.

I have reached that with WM_NOTIFY(wParam,lParam)
Inside I make things to discover options about content list behind listbox, and then call ToolTip("MyList", Tip, "G1")

But the problem now is that havent the correct working tooltip. I was searching somethig like explorer tooltip over files (it show you information if you stop the mouse over the files), but you dont need to get outside listbox to get info of other file row.

Thanks for this great function...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2009, 1:26 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
I found this great example made by PhiLho, you do not need ToolTip() function to use it, check it out.
http://www.autohotkey.com/forum/viewtopic.php?t=17349

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 3rd, 2009, 1:48 pm 
HotKeyIt wrote:
I found this great example made by PhiLho, you do not need ToolTip() function to use it, check it out.
http://www.autohotkey.com/forum/viewtopic.php?t=17349



Thanks thanks a lot...
Seems tha this was exactly was I trying...


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2009, 5:55 pm 
Offline

Joined: October 27th, 2006, 10:12 am
Posts: 649
automaticman wrote:
In short having some kind of ToolTip which does not distract the user but should look bigger and cooler. I am not sure if anything similar exists already?
Snarl seems to be just that. http://www.fullphat.net


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2009, 7:30 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
This program does not use ToolTips.

As far as I understand it is using GDI to draw that windows.

automaticman wrote:
In short having some kind of ToolTip which does not distract the user but should look bigger and cooler. I am not sure if anything similar exists already?


Does ToolTip distract the user :?
I think it was created to not distract the user :!:

You can change the color of it and you can use WinSet, Transparent...

You can do something like USB Detection

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2009, 9:37 pm 
Offline

Joined: February 2nd, 2009, 2:03 pm
Posts: 112
First thanks alot for this..
3 things:
I looked into the script code but couldn't find out the following:

-Why can't I get it to be transparent when using D (Delay)?
-How can I not have the arrow at the corner of the tooltip?
-How can I change the font and font size?

Code:
{
ToolTip(99,"Drive D Is Mounted:`n`n"
      . "`n`n"
      , "TrueCrypt"
      , "D5 Q1 O1 T180 E0.0.100.50 BWhite FBlack I" . GetAssociatedIcon("C:\Program Files\TrueCrypt\TrueCrypt.exe")
      . " P99 X" 1590 . " Y" . 1196)
Return
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2009, 10:21 pm 
Offline

Joined: June 18th, 2008, 8:36 am
Posts: 4923
Location: AHK Forum
ballyhairs wrote:
I looked into the script code but couldn't find out the following:

-Why can't I get it to be transparent when using D (Delay)?


Because there is no way to make it acceptable as it flickers:
Code:
Sleep, 100
hwnd:=ToolTip(1,"test","","e60.60.60.60")
Loop
{
   ToolTip(1,"","","GTTM_TRACKPOSITION.TTMTRACKACTIVATE")
   WinSet,Transparent,100,ahk_id %hwnd%
}

Escape::ExitApp


ballyhairs wrote:
-How can I not have the arrow at the corner of the tooltip?


You can have a square ToolTip (remove o1) or BallonTip (use o1). http://msdn.microsoft.com/en-us/library/bb760248.aspx

ballyhairs wrote:
-How can I change the font and font size?


As far as I understand this is not possible :(

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: August 25th, 2009, 10:53 pm 
Offline

Joined: February 2nd, 2009, 2:03 pm
Posts: 112
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?


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, 6, 7, 8  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: iBob35555VR 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