caramen Posted December 30, 2020 Share Posted December 30, 2020 Hello guys Hope you all doing well. Simple as that.... $SuccessText2 = $SuccessText2 & " https://xxxxxxxxxxxxxxxx/index.php?action=cons_view&consigne=49030 " Func _Tooltip ($SuccessText) $MyToolTip = 1 $SuccessText2 &= $SuccessText $MyToolTip = ToolTip ($SuccessText2,0,0 , "Checks results") $SuccessText2 = "" EndFunc Is it possible to make this link clickable on tool tip display ? Or I have to make my own GUI for this ? My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
pixelsearch Posted December 30, 2020 Share Posted December 30, 2020 Hi Caramen In this link, Nine helped me to retrieve the coords of a tooltip. Maybe it could help you to achieve your goal, for example by checking the mouse position during the $GUI_EVENT_PRIMARYDOWN event in the While... Wend loop of your main GUI ? caramen 1 Link to comment Share on other sites More sharing options...
Nine Posted December 30, 2020 Share Posted December 30, 2020 Here an example : #include <Constants.au3> #include <WinAPISysWin.au3> #include <Misc.au3> $sURL = "www.google.com" ToolTip($sURL, Default, Default, "Click on me") Local $bClick = _ClickToolTip(5) MsgBox ($MB_SYSTEMMODAL,"Is tool tip clicked ?", $bClick) Func _ClickToolTip($iTimeOut) Local $hWnd = WinGetHandle("[CLASS:tooltips_class32]") If Not $hWnd Then Return False Local $hTimer = TimerInit() While TimerDiff($hTimer) < $iTimeOut*1000 Local $tRect = _WinAPI_GetWindowRect($hWnd) If _IsPressed("01") Then Local $aPos = MouseGetPos() If $aPos[0] >= $tRect.left And $aPos[0] <= $tRect.right And $aPos[1] >= $tRect.top And $aPos[1] <= $tRect.bottom Then ToolTip("") Return True EndIf EndIf WEnd ToolTip("") Return False EndFunc caramen 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
caramen Posted December 30, 2020 Author Share Posted December 30, 2020 From what I understand after left mouseclick into the tooltip square before 5 seconds, it should return true. But anywhere I click it return false. I will have sometime 8 links for one result. It's not ideal for my case. I will try to work with this logic because she's nice. But if you have another way I take ! No way to create a real link into tooltip then...😕 My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted December 30, 2020 Author Share Posted December 30, 2020 expandcollapse popup#include <Constants.au3> #include <WinAPISysWin.au3> #include <Misc.au3> #include <Array.au3> $sURL = "www.google.com" $tool = ToolTip($sURL, 0, 0, "Click on me") Local $bClick = _ClickToolTip(15) MsgBox ($MB_SYSTEMMODAL,"Is tool tip clicked ?", $bClick) Func _ClickToolTip($iTimeOut) Local $hWnd = WinGetHandle("[CLASS:tooltips_class32]") Local $aToolTip = WinList("[CLASS:tooltips_class32]") _ArrayDisplay ($aToolTip) MsgBox ( 64 , 0 , $aToolTip[1][1] ) If Not $hWnd Then Return False Local $tRect = _WinAPI_GetWindowRect($aToolTip[1][1]) MsgBox (64 , 0 , $tRect.left ) MsgBox (64 , 0 , $tRect.right ) MsgBox (64 , 0 , $tRect.top ) MsgBox (64 , 0 , $tRect.bottom ) Local $hTimer = TimerInit() While TimerDiff($hTimer) < $iTimeOut*1000 If _IsPressed("01") Then ConsoleWrite ("RC+1"&@CRLF) Local $aPos = MouseGetPos() If $aPos[0] >= $tRect.left And $aPos[0] <= $tRect.right And $aPos[1] >= $tRect.top And $aPos[1] <= $tRect.bottom Then ToolTip("") Return True EndIf EndIf WEnd ToolTip("") Return False EndFunc Tool tip is at 0,0 Msg box are around 1400 800 is that normal ? Also, If I use [1][15] I got subscript error I expect the correct hwnd for me is [1] [15] but it return error. My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
caramen Posted December 30, 2020 Author Share Posted December 30, 2020 (edited) I think I will make a transparent GUI over tool tip with buttons. So complicated for this 😅 Edited December 30, 2020 by caramen My video tutorials : ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs:Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsPowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & SupportExcel - Example Scripts - WikiWord - Wiki Tutorials:ADO - Wiki Link to comment Share on other sites More sharing options...
Nine Posted December 30, 2020 Share Posted December 30, 2020 Oh, ya forgot about Win10 hidden tooltips. #include <Constants.au3> #include <WinAPISysWin.au3> #include <Misc.au3> #include <Array.au3> $sURL = "www.google.com" ToolTip($sURL, Default, Default, "Click on me") Local $bClick = _ClickToolTip($sURL, 5) MsgBox ($MB_SYSTEMMODAL,"Is tool tip clicked ?", $bClick) Func _ClickToolTip($sText, $iTimeOut) Local $hWnd = WinGetHandle("[TITLE:" & $sText & ";CLASS:tooltips_class32]") If Not $hWnd Then Return False Local $hTimer = TimerInit() While TimerDiff($hTimer) < $iTimeOut*1000 Local $tRect = _WinAPI_GetWindowRect($hWnd) If _IsPressed("01") Then Local $aPos = MouseGetPos() If $aPos[0] >= $tRect.left And $aPos[0] <= $tRect.right And $aPos[1] >= $tRect.top And $aPos[1] <= $tRect.bottom Then ToolTip("") Return True EndIf EndIf WEnd ToolTip("") Return False EndFunc pixelsearch 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
rudi Posted January 15, 2021 Share Posted January 15, 2021 Hello @Nine thx for the nice snippet. Works great. Well, I don't get what you mean with "... about Win10 hidden tooltips" ? Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Nine Posted January 15, 2021 Share Posted January 15, 2021 @rudi Thanks, glad you like it. I noticed on my Win10 machine a number (about 15) of untitled tooltips_class32 windows. So to get the right one, I need to specify also its title. That is not required on my Win7 box. “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
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