Hypertrophy Posted June 29, 2009 Posted June 29, 2009 (edited) is there a command for this? Edited July 17, 2009 by Hypertrophy
dantay9 Posted June 29, 2009 Posted June 29, 2009 (edited) I do not think so, but you should say whether it is a gui tooltip or a windows tooltip in case I am wrong. That will help the next person in line. Edited June 29, 2009 by dantay9
Hypertrophy Posted June 29, 2009 Author Posted June 29, 2009 Don't know what the difference is dantay but I used GUICtrlSetTip to create the tip.
bogQ Posted June 30, 2009 Posted June 30, 2009 Don't know what the difference is dantay but I used GUICtrlSetTip to create the tip.try with _GUIToolTip_GetText() TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
Hypertrophy Posted July 1, 2009 Author Posted July 1, 2009 (edited) what is the point of $htool and $iId? and i dont think it will work with GUICtrlSetTip(). Edited July 1, 2009 by Hypertrophy
bogQ Posted July 1, 2009 Posted July 1, 2009 (edited) what is the point of $htool and $iId? and i dont think it will work with GUICtrlSetTip(). you only need to hit search button on right uper corrner of forum to finde almost anything you need from topic Question about tooltips, How to get text from tooltips I think the $ID is the id you used when you created the toolbar component as in _GUICtrlToolbar_AddButton ($hToolbar, $ID, $STD_FILENEW) So if the first id you used was 1000 then the id's are 1000, 1001,1002,.. 1007 I haven't tried it the way you showed so I could be wrong. You can read the text of a displayed tooltip, so for your testing you could move the mouse over the control and check that the tooltip text is correct. #include <array.au3> #include <windowsconstants.au3> $lastList = '' $gui = GUICreate("test tool tip reading") $but1 = GUICtrlCreateButton("sample button",50,50,120,22) GUICtrlSetTip(-1,"this is the tooltip for $But1") $but2 = GUICtrlCreateButton("Another one",50,150,120,22) GUICtrlSetTip(-1,"Tooltip for $but2, but try controls in any other app too.") GUISetState() While GUIGetMsg() <> -3 $List = '' $wl = WinList("[class:tooltips_class32]");get all th etooltips For $n = 1 To $wl[0][0] If BitAND(WinGetState($wl[$n][1]), 2) Then;if visible $List &= WinGetTitle($wl[$n][1]) & '; '; read the title, which for a tooltip is the text EndIf Next If $List <> $lastList And $List <> '' Then ConsoleWrite($List & "Previous = " & $lastlist & @CRLF) $lastList = $List EndIf WEnd Edited July 1, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
Hypertrophy Posted July 1, 2009 Author Posted July 1, 2009 thanks. trying to make this into a function. no luck #include <array.au3> #include <windowsconstants.au3> #include <GUIConstantsEx.au3> $lastList = '' $gui = GUICreate("test tool tip reading") $but1 = GUICtrlCreateButton("sample button",50,50,120,22) GUICtrlSetTip(-1,"this is the tooltip for $But1") $but2 = GUICtrlCreateButton("Another one",50,150,120,22) GUICtrlSetTip(-1,"Tooltip for $but2, but try controls in any other app too.") $button3 = GUICtrlCreateButton("Show me the tooltip text", 100, 20, 150) GUISetState() While 1 $msg = GUIGetMsg(1) Switch $msg[0] Case $GUI_EVENT_CLOSE Exit 0 Case $button3 GetTipText() EndSwitch WEnd Func GetTipText() $List = '' $wl = WinList("[class:tooltips_class32]");get all th etooltips For $n = 1 To $wl[0][0] If BitAND(WinGetState($wl[$n][1]), 2) Then;if visible $List &= WinGetTitle($wl[$n][1]) & '; '; read the title, which for a tooltip is the text EndIf Next If $List <> $lastList And $List <> '' Then ConsoleWrite($List & "Previous = " & $lastlist & @CRLF) $lastList = $List EndIf EndFunc
bogQ Posted July 1, 2009 Posted July 1, 2009 (edited) thanks. trying to make this into a function. no luck #include <array.au3> #include <windowsconstants.au3> #include <GUIConstantsEx.au3> $lastList = '' $data = '' $gui = GUICreate("test tool tip reading") $but1 = GUICtrlCreateButton("sample button",50,50,120,22) GUICtrlSetTip(-1,"this is the tooltip for $But1") $but2 = GUICtrlCreateButton("Another one",50,150,120,22) GUICtrlSetTip(-1,"Tooltip for $but2, but try controls in any other app too.") $but3 = GUICtrlCreateButton("Show me last the tooltip text",50,100,150,22) GUISetState() Do $msg = GUIGetMsg() $List = '' $wl = WinList("[class:tooltips_class32]");get all th etooltips For $n = 1 To $wl[0][0] If BitAND(WinGetState($wl[$n][1]), 2) Then;if visible $List &= WinGetTitle($wl[$n][1]) & '; '; read the title, which for a tooltip is the text EndIf Next If $List <> $lastList And $List <> '' Then ConsoleWrite($List & "Previous = " & $lastlist & @CRLF) If $List <> "" Then $data = $lastlist $lastList = $List EndIf If $msg = $but3 Then MsgBox(0,"Last tooltip active",$data) Until $msg = $GUI_EVENT_CLOSE Edited July 1, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
Hypertrophy Posted July 1, 2009 Author Posted July 1, 2009 thanks but i cant use it this way in my code. i need to be able to call it in a function whenever i need.
bogQ Posted July 1, 2009 Posted July 1, 2009 thanks but i cant use it this way in my code. i need to be able to call it in a function whenever i need.then youl probably need hotkey() command something like this #include <array.au3> #include <windowsconstants.au3> #include <GUIConstantsEx.au3> HotKeySet("{F11}","tooltips") Global $lastList = '',$data = '',$List = '' $gui = GUICreate("test tool tip reading") $but1 = GUICtrlCreateButton("sample button",50,50,120,22) GUICtrlSetTip(-1,"this is the tooltip for $But1") $but2 = GUICtrlCreateButton("Another one",50,150,120,22) GUICtrlSetTip(-1,"Tooltip for $but2, but try controls in any other app too.") GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE Func tooltips() $wl = WinList("[class:tooltips_class32]");get all th etooltips For $n = 1 To $wl[0][0] If BitAND(WinGetState($wl[$n][1]), 2) Then;if visible $List = WinGetTitle($wl[$n][1]); read the title, which for a tooltip is the text EndIf Next If $List <> $lastList And $List <> '' Then MsgBox(0,"Active ToolTip",$List) Else MsgBox(0,"Sry","There arnt any tooltips in this Gui at the moment") EndIf EndFunc TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.
Hypertrophy Posted July 1, 2009 Author Posted July 1, 2009 thank you bogQ. this has really helped me understand the concept of using this method.
Hypertrophy Posted July 17, 2009 Author Posted July 17, 2009 (edited) there any way to call this function besides using a hotkey? like a button or context menu? Fixed: Instead of using tooltips I just used the GUI's title. Edited July 17, 2009 by Hypertrophy
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now