Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/06/2021 in all areas

  1. As the WebDriver UDF - Help & Support thread has grown too big, I started a new one. The prior thread can be found here.
    1 point
  2. Never declare Global or Local in a loop as this may override the previous assignment. Always declare variables outside any embedded statement (While, Do, If, etc.)
    1 point
  3. As mentioned above the _DataInput_AddElements is adding multiple input controls on top of each other, replace rows 217 - 221 with the following, now re-run your test and you'll see what I mean. $ArrElement[UBound($ArrElement) - 1][1] = GUICtrlCreateInput('First Control' , 8, 35 + $Move_Top, 161, 21) if GUICtrlRead($Gui_DataInput_EditRadio) = 1 Then $ArrElement[UBound($ArrElement) - 1][2] = GUICtrlCreateButton('Input by Edit' , 170, 33 + $Move_Top, 80, 25, $BS_MULTILINE) Else $ArrElement[UBound($ArrElement) - 1][1] = GUICtrlCreateInput('Second Control' , 8, 35 + $Move_Top, 161, 21) EndIf
    1 point
  4. Professor_Bernd, The offer was to help you get my UDFs integrated in your script if you were having problems - not to write the whole thing for you. M23
    1 point
  5. JFee

    Delete Empty Folders

    This is a script I made a while ago when someone was asking about something similar on the forums, so I figured I'd post the code and maybe someone will have a use for it. This goes through a directory of your choosing and deletes all empty directories inside it. It starts at the lowest folder in the hierarchy and works its way out to delete empty folders to ensure folders that only contain other empty folders get deleted as well. Here is the code... only 14 lines #Include <File.au3> $startDir = FileSelectFolder("Choose Directory", @HomeDrive, 2, @ScriptDir) If $startDir Then _delEmpty($startDir) Exit Func _delEmpty($dir) $folderList = _FileListToArray($dir, "*", 2) If @error <> 4 Then For $i = 1 to $folderList[0] _delEmpty($dir & "\" & $folderList[$i]) Next EndIf $fileList = _FileListToArray($dir, -1, 0) If @error = 4 Then DirRemove($dir) EndFunc Hope you enjoy
    1 point
  6. Thanks, it all makes sense now. I just modified the line (see below), and it now worked! _WD_GetShadowRoot($sSession, $_WD_LOCATOR_ByCSSSelector, "test-accordion[accordion-list='[""name"":'test"",""label"":""testname""}]']", $test2)
    1 point
  7. Have you tried == rather than just =? Or try using StringStripWs to compare strings? Also noticed you were using an "or" this will return true if either expression is correct? StringStripWS example (untested): ;~ StringStripWS flag 7 ;~ $STR_STRIPLEADING (1) = strip leading white space ;~ $STR_STRIPTRAILING (2) = strip trailing white space ;~ $STR_STRIPSPACES (4) = strip double (or more) spaces between words Local $sData = StringStripWS($lines[1],7) If $sData<>"" And $sData<>$f then MsgBox($MB_TOPMOST, "KEY FOUND:", $sData, 2) MsgBox($MB_TOPMOST, $sData, $f, 2) ClipPut($sData) $f=$sData EndIf
    1 point
  8. Compare the line below to your original line to see the differences. Then read the Help file's section on strings to understand why the line below is able to be parsed correctly. _WD_GetShadowRoot($sSession, $_WD_LOCATOR_ByCSSSelector, "test-accordion[accordion-list=""[{'name':'test','label':'testname'}]""]", $test2)
    1 point
  9. PsaltyDS

    stdoutread problems

    Do it this way to get ALL the output: $foo = Run(@ComSpec & " /c c:\temp\runner.bat", "C:\temp\", @SW_HIDE, 2+4) ; handles to STDOUT and STDERR $OutLine = "" $ErrLine = "" While 1 $OutLine &= StdOutRead($foo) If @error Then ExitLoop $ErrLine &= StdErrRead($foo) If @error Then ExitLoop sleep(10) Wend msgbox(0,"Results","STDOUT: " & $OutLine & @CRLF & "ERROUT: " & $ErrLine)
    1 point
×
×
  • Create New...