surfersilver Posted July 24, 2018 Posted July 24, 2018 When I hover over the exclamation icon i get a text.How can I capture this text.It is a windows based application and the message shows only if the icon is hovered over.
Moderators JLogan3o13 Posted July 24, 2018 Moderators Posted July 24, 2018 Moved to the appropriate forum. Moderation Team "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
BrewManNH Posted July 24, 2018 Posted July 24, 2018 Have you looked at the _GUITooltip* UDF? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
surfersilver Posted July 25, 2018 Author Posted July 25, 2018 17 hours ago, BrewManNH said: Have you looked at the _GUITooltip* UDF? Yes.I think that works only if you have created the GUI.Over here I am not creating the GUI..I am using a pre-created GUI.I have tried gettext() gettitle().None of them seems to work.
BrewManNH Posted July 25, 2018 Posted July 25, 2018 Look at the second example of _GUIToolTip_GetText. The UDF works for non-AutoIt tooltips as well. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
surfersilver Posted July 25, 2018 Author Posted July 25, 2018 #include <GUIConstantsEx.au3> #include <GUIToolTip.au3> #include <MsgBoxConstants.au3> Global $g_iPID ; Hover over one of the characters in the Charmap app to get a tooltip to display, then press 'g' to ; retrieve its text information. HotKeySet('g', "_Read_Tip") Example() Func Example() ; Run character map program $g_iPID = Run("charmap.exe") ; Wait for it to become the active window WinWaitActive("Character Map", "", 10) While ProcessExists($g_iPID) Sleep(100) WEnd EndFunc ;==>Example Func _Read_Tip() ; Get list of tooltips Local $aTipList = WinList("[CLASS:tooltips_class32]") Local $aRet ; See which belong to your app For $i = 1 To $aTipList[0][0] If WinGetProcess($aTipList[$i][1]) = $g_iPID Then ; See which one is active $aRet = _GUIToolTip_GetCurrentTool($aTipList[$i][1]) ; If one is active then display it If $aRet[8] <> "" Then MsgBox(0, "Visible Tip", $aRet[8]) EndIf Next EndFunc ;==>_Read_Tip _______________________________________________________________________________________________________________________________________________________________________________ I have taken this from the documentation site of autoIT.This too does not show a messaebox for the required tooltip.
BrewManNH Posted July 25, 2018 Posted July 25, 2018 Did you press the G key? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
surfersilver Posted July 26, 2018 Author Posted July 26, 2018 22 hours ago, BrewManNH said: Did you press the G key? This works with charmap but it does not work with my application is there any way you could help me out I changed the processId and title according to my application But still it does not work.i just copy pasted this code into my code at the appropriate places. Global $g_iPID $g_iPID = Run("D:\DemoApplication.exe") and the rest of the code MouseMove("1320","413") HotKeySet('g', "_Read_Tip") and then i have have pasted the above code in my application Could you help me out Thanks.
BrewManNH Posted July 26, 2018 Posted July 26, 2018 Try inserting this line into your script. Local $aTipList = WinList("[CLASS:tooltips_class32]") _ArrayDisplay($aTipList) ; <<<<<<<<<<<<<<<<<<<< insert this line Local $aRet While the tooltip is active, and you press the hotkey, if there are any tooltips that can be read the _ArrayDisplay function should list them. If there's no _ArrayDisplay, then it either can't read from that program, or there's another issue. BTW, to use _ArrayDisplay, you will need to add the include Array.au3. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator
careca Posted July 26, 2018 Posted July 26, 2018 $g_iPID = Run("charmap.exe") Did you run the other application this way? You know, the script uses it to retrieve process id, and works with PID from there on. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe
pixelsearch Posted July 26, 2018 Posted July 26, 2018 (edited) Hi everybody, Could this script be helpful to list tooltips hovered upon, from any application, in an Edit field ? It is based on what you wrote in this thread, plus another thread from 2010, found here : https://www.autoitscript.com/forum/topic/108960-get-tooltips_class32-word/ #Include <Array.au3> #include <GuiConstantsEx.au3> #include <GuiEdit.au3> #include <GuiToolTip.au3> #include <WindowsConstants.au3> Global $aTipText[0], $iWidth = 300, $iHeight = 300 $hGui = GUICreate("Tooltips", $iWidth, $iHeight, -1, -1, _ $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX + $WS_SIZEBOX, $WS_EX_TOPMOST) $idEdit = GUICtrlCreateEdit("", 0, 0, $iWidth -2, $iHeight -28) GUISetState(@SW_SHOW) While GUIGetMsg() <> $GUI_EVENT_CLOSE _Read_Tip() Sleep(100) WEnd GUIDelete($hGui) Func _Read_Tip() $aTipList = WinList("[CLASS:tooltips_class32]") $iNumber_Windows = $aTipList[0][0] For $i = 1 To $iNumber_Windows $aTipInfo = _GUIToolTip_GetCurrentTool($aTipList[$i][1]) If Not $aTipInfo[8] = "" Then If _ArrayFindAll($aTipText, $aTipInfo[8]) = -1 Then _ArrayAdd($aTipText, $aTipInfo[8]) _GUICtrlEdit_AppendText($idEdit, $aTipInfo[8] & @CRLF & "*****" & @CRLF) EndIf EndIf Next EndFunc ; ==> _Read_Tip In the next image, 4 first tooltips come from charmap.exe, 5th from Windows Explorer (hovering a folder name), 6th & 7th from hovering Tabs in Windows Taskbar etc... Hope it helps Edited August 11, 2018 by pixelsearch
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