Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/15/2024 in all areas

  1. with deletion from ConsoleWrite("_RegExist=" & _RegKeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\FabFilter\Volcano") & @CRLF) to _RegKeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\FabFilter\Volcano") is Parameters (The parameters are set by you. in the function ) https://www.autoitscript.com/autoit3/docs/keywords/Func.htm from _RegKeyExist("HKEY_LOCAL_MACHINE\SOFTWARE\FabFilter\Volcano") Func _RegKeyExist($sKeyname) RegRead($sKeyname, "") ... ... https://www.autoitscript.com/autoit3/docs/functions/RegRead.htm look above at here's how it could be https://www.autoitscript.com/forum/topic/212277-detemine-if-reg-key-exists/#comment-1536847
    1 point
  2. Thanks for your use case example. I understand and would agree in case I would not know about WebDriver 😅 - but yes, fair enough. Not really, no. Sorry. Neither I would have the time nor I am interested in. Anyways best of luck @fraizor 🤝 . Best regards Sven
    1 point
  3. Thank you for your review dear SOLVE-SMART 1- Sure will take a look at the recommended UDF methods later , thanks 2- Yes it is not very suitable for complex browser automation, I would say the best use case for the UDF is doing simple tasks, like filling/submitting forms and doing bulk changes for a group of pages ... in fact i had multiple annoying tasks before that i need to do a simple checkbox click on a page then save the page (i had 100 pages) the task was stuck in the middle as it was not worth the trouble to install and learn about wedrivers and yet i cannot do them manually ... 3- Yes i agree that ControlSend is not the most reliable function, i believe that ControlSetText will be faster and more efficient , however i was not able to find the developer tool input box ControlID can you help me with that ?
    1 point
  4. Hi @fraizor 👋 , first of all, thanks for sharing your approach. Second of all, there is a recommended way to write UDFs (see here) - maybe you could improve your UDF to be more standardized. In aspects of what your _AF* UDF can do and how it handles possible requirements for the browser (firefox) I have to say it's not very promising, sorry. I mean the approach use ControlSend which can not as much as it should do. Also the user have to understand javascript in depth in case of more complex tasks which he probably wants to achieve. Frameworks like Selenium, WebdriverIO or the AutoIt variant "au3WebDriver" communicate with the " JSON Wire Protocol" and use several abstractions to avoid deep intervention for the browser communication. So please let us know which use cases you think of would be the best for your UDF. But: Please don't be sad about this sober assessment. Every beginning is difficult and it's good that you found a way and took it 👌 . Best regards Sven
    1 point
  5. Nine

    StdoutRead freezes

    As per help file of ProcessWaitClose : If 250 ms is too long for you then simply use this : #include <Constants.au3> Local $hTimer = TimerInit() Local $iPID = Run(@ComSpec & " /c powercfg -list", "", @SW_HIDE, $STDERR_MERGED) While ProcessExists($iPID) WEnd Local $line = StdoutRead($iPID) ConsoleWrite(TimerDiff($hTimer) & @CRLF) ConsoleWrite($line & @CRLF) 42ms instead of 295ms with ProcessWaitClose
    1 point
  6. ticks per second #include <TrayConstants.au3> Opt("TrayAutoPause", 0) Opt("TrayMenuMode", 2) $key = "0" $tray1 = TrayCreateItem('Set key') Local $Tick TraySetState($TRAY_ICONSTATE_SHOW) While True If $Tick <> @SEC Then ConsoleWrite (@HOUR & ":" & @MIN & ":" & @SEC & @CRLF & @CRLF ) $Tick = @SEC EndIf $msg = TrayGetMsg() Switch ($msg) Case $tray1 If Not IsDeclared("sInputBoxAnswer") Then Local $sInputBoxAnswer $sInputBoxAnswer = InputBox("Input key", "Which character?") If @error = 0 Then $key = $sInputBoxAnswer EndIf EndSwitch ;~ Sleep(1000) WEnd
    1 point
×
×
  • Create New...