6 posts in this topic
This is pretty useful to me at least, I hope to others. Whenever you need to poke a button or such on a GUI, you can just make calls to this UDF and instruct it how long to wait, 0 is forever, anyway, let the code to the explaining. Feel free to help expand this UDF. I plan to create new ones as I go along that support all the Win32 and .NET Controls. Ultimately, I would like to be able to fully control any type of control, this works well with most. Just an example of what you can do.
The test installs and can uninstall 7-Zip 15.14 (x64) Setup.exe
NOTE: Logger Author(s) .....: Michael Mims (zorphnog)
; the logging script can be obtained here
Good morning everyone
I worked a bit on a little project of mine, and I managed to do what I was trying to do, or, automate a quiz in AutoIt.
Now, everything works fine but, in order to achieve what I'm trying to achive, I'd like to make this script run faster.
I'll attach a portion of the code in order to let you understand what my script does.
$objIE_h1 = _IETagNameGetCollection($objIE, "h1") ; Take the text of the answer If @error Then ConsoleWrite("Errore durante la lettura degli h1 nella pagina. - Errore: " & @error & @CRLF) Else For $objElement In $objIE_h1 $strInnerText = $objElement.innerText Next Select Case StringInStr($strInnerText, "QUESTION") ; Here is the question ; PS4 PRO $objSpans = _IETagNameGetCollection($objIE, "span") ; Answers are stored here For $objElement In $objSpans If $i >= 4 Then $strAnswer = $objElement.innerText ; Take the text of the answer n° 0, 1, 2, 3 If StringInStr($strAnswer, "CORRECT ANSWER") Then ; If I match the correct answer, then, I have to click on the input with answer id = answer_i $j = $i - 4 $objInput = _IEGetObjById($objIE, "answer_" & $j) If @error Then ConsoleWrite("Errore durante la lettura della risposta #" & $i & " - Errore: " & @error & @CRLF) Else _IEAction($objInput, "click") If @error Then ConsoleWrite("Errore durante il click sull'elemento. - Errore: " & @error) Else ConsoleWrite($j & ") Risposta: " & $strAnswer & @CRLF) ExitLoop EndIf EndIf EndIf $i+=1 Else $i+=1 EndIf Next $i = 0 $j = 0 This is what my script does.
Questions are 20, in which I have 15 multiple choice question, 2 images ( on which I use _IEImgClick() ), and 3 text inputs ( a simple send with the text I have to enter ).
How can I make all of these, faster?
If I reach this goal, I've probably done one of my best goals in life, and I'd like to share my happiness with you, giving a huge donation to this fantastic community!
Thanks for your help
How can i add sleep command using internet speed.
If my internet speed is 40-50Kbps then sleep for 5 seconds,
If my internet speed is 30-40Kbps then sleep for 4 seconds,
If my internet speed is 20-30Kbps then sleep for 3 seconds.
*Sleep command used bitween my costom script, Example,
RunWait("rasdial /disconnect", "", @SW_HIDE) ; Stop connect from start
RunWait("rasdial Internet", "", @SW_HIDE) ; Connect again
Please Somebody Help me i am trying to create new script but, i don't know how to create it.
I am Creating script like this :
; My script here [First Script]
Check the internet connection, if internet connected then
; My Script here [Second Script]
If internet not connected, wait for connect, after connected run my second script
If Control id/windows/title matched do nothing and end/exit autoit script
If Control id/windows/title not matched repeat my first and second script again until control id/windows/tittle not matched
match with :
>>>> Window <<<<
Title: PS :: Version - 18.104.22.168 - [PS Bill]
Position: -8, -8
Size: 1382, 744
>>>> Control <<<<
Advanced (Class): [NAME:BillPrint]
Position: 39, 310
Size: 1221, 306
ControlClick Coords: 745, 20
How can i stop/pause my internet connection for only 7 seconds, after 7 seconds automaticaly resume my internet.
Please give me scripte