
TOOD
-
Posts
5 -
Joined
-
Last visited
Reputation Activity
-
TOOD reacted to mikell in How to WinExist('[CLASS:#32770]') with Button1?
You might check both if class is #32770 and if the word "error" exists in the title, or the text of the button in the text, or all together
WinExists("[CLASS:#32770; REGEXPTITLE:(?i)(.*error.*)]", "OK")
-
TOOD reacted to kcvinu in How to WinExist('[CLASS:#32770]') with Button1?
Thanks a lot @mikell
This single line code saved me. After hours of failed attempts, at last, i can click on message box button. I didn't knew that we can use reg exp title inside a string this.
-
TOOD reacted to AutoBert in How to WinExist('[CLASS:#32770]') with Button1?
Study this small script:
; Open a browser with the basic example page, insert an ; event script into the head of the document that creates ; a JavaScript alert when someone clicks on the document #include <IE.au3> Local $oIE = _IE_Example("basic") _IEHeadInsertEventScript($oIE, "document", "onclick", "alert('Someone clicked the document!');") AdlibRegister('CloseAlert', 1000) $tdStart = TimerInit() While TimerDiff($tdStart) < 60000 Sleep(1000) WEnd _IEQuit($oIE) Func CloseAlert () Sleep(3000) ControlClick('[CLASS:#32770]', 'Someone clicked the document!', 2) EndFunc ;==>CloseAlert after example is shown ckick into brower document. 3 sec's later the shown alert is closed.
-
TOOD reacted to Davidowicza in Hotkey function then send the same hotkey
This worked for me:
#include <Date.au3> #include <ScreenCapture.au3> HotKeySet("1", "one") HotKeySet("{ESC}","leave") While 1 Sleep(50) WEnd Func one() _ScreenCapture_Capture(@DesktopDir & "\" & StringRegExpReplace(_Now(), '[/ :]', '-') & ".jpg") HotKeySet("1") Send("1") Sleep(200) HotKeySet("1", "one") EndFunc Func leave() Exit EndFunc
-
TOOD reacted to therks in Hotkey function then send the same hotkey
This can't be the entire script obviously, cus this would just run and exit. Not sure why you're using DllOpen without using the open handle in anything, perhaps you misunderstand what that function is for?
Anyway, I wrote this up:
#include <Date.au3> #include <Misc.au3> #include <ScreenCapture.au3> Global $hUser32 = DllOpen('user32.dll') OnAutoItExitRegister(_Exit) While 1 If _IsPressed('2E', $hUser32) Then _ScreenCapture_Capture(@DesktopDir & "\" & StringRegExpReplace(_Now(), '[/ :]', '-') & ".jpg") Sleep(100) EndIf WEnd Func _Exit() DllClose($hUser32) EndFunc
-
TOOD got a reaction from therks in Hotkey function then send the same hotkey
This also worked perfectly. Thank you guys so much!