Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/07/2022 in all areas

  1. Alright, I was able to reproduce your flickering by slowing down the display of each frame. The culprit is the erasure of each frame. I should have thought of it sooner, sigh. Anyway, so I need to introduce the well-know feature of back buffer with GDI+. Now flickering completely disappears. Could you test it ? Thanks Cached GIF Animation.au3
    2 points
  2. Nine

    GIF Animation (cached)

    New version available
    1 point
  3. Zvend, No problem - thanks for bringing it to our attention. M23
    1 point
  4. I removed the solution mark and rather comment here, that I did open a ticket. If the ticket got accepted and fixed I will mark this as solved. Thanks for the advice, I absolutely did not see the ticket section.
    1 point
  5. Hi, Please open a bug report in Trac - that way the Devs will be sure to see it. M23
    1 point
  6. Ok, seems I have found the problem. Your gif suppose erasable frames. So we need to clear the previous image before showing the next. Try this patch.Cached GIF Animation.au3 Using the line : Local $valEixtBit = _GUICtrlCreateAnimGIF("Up3a.gif", 039, 307, 106, 90, -1, $GUI_WS_EX_PARENTDRAG, False, 0xdadbdd) Works for me.
    1 point
  7. pixelsearch

    stringregexp issue

    This reminds me the old Foxpro days (with the following example just found in this link) where replacing several characters at a time was doable like this : ? CHRTRAN("ABCDE", "ACE", "XYZ") && yields "XBYDZ" Memories, memories...
    1 point
  8. Here is better example showing how to attach to firstly opened FireFox session/instance: #include "wd_helper.au3" #include "wd_capabilities.au3" # HOW TO TEST: ; At first run choose [Yes] to create new session FireFox running instance ; At second run choose [No] to attach to active FireFox running instance # TODO: ; https://github.com/operasoftware/operachromiumdriver/blob/master/docs/desktop.md --remote-debugging-port=port Global $_MY__WD_SESSION Global $__g_sDownloadDir = @ScriptDir & '\Testing_Download' _Test() Exit Func _Test() Local $s_FireFox_Binary = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" If $s_FireFox_Binary And FileExists($s_FireFox_Binary) = 0 Then $s_FireFox_Binary = '' Local $iAnswer = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON2, "Question", _ "Open new sesion ?" & @CRLF & "[ NO ] = Try attach to active FireFox instance") If $iAnswer = $IDYES Then _Testing_CreateSession($s_FireFox_Binary) ;~ _Testing_WD_Navigate() Return ; do not process next functions Else _Testing_AttachSession($s_FireFox_Binary) _WD_Navigate($_MY__WD_SESSION, 'https://www.google.com/') EndIf $iAnswer = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON2, "Question", _ "Do you want to test ?" & @CRLF & "[ NO ] = Refresh - prevent expiration") If $iAnswer = $IDYES Then _Testing_WD_Navigate() Else _Testing_Refreshing() EndIf ; CleanUp _WD_DeleteSession($_MY__WD_SESSION) _WD_Shutdown() EndFunc ;==>_Test Func _Testing_CreateSession($s_FireFox_Binary) $_MY__WD_SESSION = _MY__WD_SetupFireFox(False, $__g_sDownloadDir, $s_FireFox_Binary, False) EndFunc ;==>_Testing_CreateSession Func _Testing_AttachSession($s_FireFox_Binary) $_MY__WD_SESSION = _MY__WD_SetupFireFox(False, $__g_sDownloadDir, $s_FireFox_Binary, True) EndFunc ;==>_Testing_AttachSession Func _Testing_Refreshing() While 1 ;~ _WD_Navigate($_MY__WD_SESSION, '') _WD_Action($_MY__WD_SESSION, 'REFRESH') Local $iAnswer = MsgBox($MB_YESNO + $MB_TOPMOST + $MB_ICONQUESTION + $MB_DEFBUTTON2, "Question", "Finish refreshing?" & @CRLF & "[No] = Refresh - prevent expiration", 60) If $iAnswer = $IDYES Then Return WEnd EndFunc ;==>_Testing_Refreshing Func _MY__WD_SetupFireFox($b_Headless, $s_Download_dir = Default, $s_FireFox_Binary = Default, $bTryAttach = False) If $s_Download_dir = Default Then $s_Download_dir = '' ElseIf $s_Download_dir Then If FileExists($s_Download_dir) = 0 Then $s_Download_dir = '' EndIf Local $s_Capabilities = Default Local $s_Profile_Dir = @LocalAppDataDir & '\Mozilla\Firefox\Profiles\WD_Testing_Profile' DirCreate($s_Download_dir) ; MUST EXIST !! DirCreate($s_Profile_Dir) ; MUST EXIST !! _WD_UpdateDriver('firefox') If @error Then Return SetError(@error, @extended, '') #WARRNING DO NOT USE '--log-path=' BECAUSE OF RODO / GDPR _WD_Option('Driver', 'geckodriver.exe') _WD_Option('Port', 4444) _WD_Option('DefaultTimeout', 1000) If $bTryAttach Then _WD_Option('DriverParams', '--log trace --marionette-port 2828 --connect-existing') Else _WD_Option('DriverParams', '--log trace --marionette-port 2828') _WD_CapabilitiesStartup() _WD_CapabilitiesAdd('alwaysMatch') _WD_CapabilitiesAdd('acceptInsecureCerts', True) _WD_CapabilitiesAdd('firstMatch', 'firefox') _WD_CapabilitiesAdd('args', '-profile') _WD_CapabilitiesAdd('args', $s_Profile_Dir) ; CHANGE TO PROPER DIRECTORY PATH If $s_FireFox_Binary Then _WD_CapabilitiesAdd('binary', $s_FireFox_Binary) If $b_Headless Then _ _WD_CapabilitiesAdd('args', '--headless') _WD_CapabilitiesDump(@ScriptLineNumber & ' :WebDriver:Capabilities:') $s_Capabilities = _WD_CapabilitiesGet() EndIf _WD_Startup() If @error Then Return SetError(@error, @extended, '') Local $WD_SESSION = _WD_CreateSession($s_Capabilities) Return SetError(@error, @extended, $WD_SESSION) EndFunc ;==>_MY__WD_SetupFireFox Func _Testing_WD_Navigate() _WD_Navigate($_MY__WD_SESSION, 'https://www.autoitscript.com/forum') EndFunc ;==>_Testing_WD_Navigate REMARK: It turned out to be very useful when implementing the automation of websites for which login is required (especially with OTP send via SMS ), or in a situation where you need to repeatedly test one selected aspect of automation.
    1 point
×
×
  • Create New...