Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/25/2019 in all areas

  1. I've read, downloaded, analyzed, found correct way, provided example code and alternate solution. Enough for me.
    1 point
  2. You seem to love complicated life.
    1 point
  3. Sure. Start with FileReadToArray or _FileReadToArray (see the Help file for details), then loop through the array to run the copy operations on each machine. #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Example() Func Example() ; Define a variable to pass to _FileReadToArray. Local $aArray = 0 ; Read the current script file into an array using the variable defined previously. ; $iFlag is specified as 0 in which the array count will not be defined. Use UBound() to find the size of the array. If Not _FileReadToArray(@ScriptFullPath, $aArray, 0) Then MsgBox($MB_SYSTEMMODAL, "", "There was an error reading the file. @error: " & @error) ; An error occurred reading the current script file. EndIf ; Display the array in _ArrayDisplay. _ArrayDisplay($aArray) ; Loop through the array and do your file copy operations For $i = 1 to Ubound($aArray) -1 FileCopy(@TempDir & "\*.au3", @TempDir & "\Au3Files\", $FC_OVERWRITE + $FC_CREATEPATH) Next EndFunc ;==>Example
    1 point
  4. CommanderTaco, I see you did not read those rules to which you were linked very carefully - you missed the part that says: Do not ask for help with AutoIt scripts, [...] on the following subjects: [...] Launching, automation or script interaction with games or game servers, regardless of the game Please do NOT start another game-related thread - our patience has limits. M23
    1 point
  5. @_leo_ When you use "contains()" in your xpath, you need a comma instead of the equal sign.
    1 point
  6. You also might use Curl (command line way) to authenticate, manage the cookie if needed and get the infos
    1 point
  7. BrewManNH

    First time GUI Problem

    Something like this is how I'd do it. #include <GUIConstants.au3> #include <Constants.au3> #include <GUIConstantsEx.au3> #include <ButtonConstants.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> Opt("GUIOnEventMode", 1) Global $g_idExit _Main() Func _Main() Global $GUI1 = GUICreate("Template", 450, 150) $idPM11031 = GUICtrlCreateButton("CTE", 10, 30, 100, 30) GUICtrlSetOnEvent($idPM11031, "PM11031") $g_idExit = GUICtrlCreateButton("Exit", 120, 90, 100, 30) GUICtrlSetOnEvent($g_idExit, "OnExit") GUISetOnEvent($GUI_EVENT_CLOSE, "OnExit") GUISetState() ; display the GUI While 1 Sleep(10) WEnd Exit EndFunc ;==>_Main Func PM11031() $UserData = _InputBox("Enter Data") Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("data 1 is: " & $UserData[0] & "data 2 is: " & $UserData[1] & "data 3 is: " & $UserData[2] & "data 4 is: " & $UserData[3] & ".") Send("{ENTER}") EndFunc ;==>PM11031 Func _InputBox($Title) Dim $data[4] Local $GUI2 = GUICreate($Title, 256, 509, 314, 374) Local $Input1 = GUICtrlCreateInput("", 19, 40, 213, 21) Local $Input2 = GUICtrlCreateInput("", 19, 102, 213, 21) Local $Input3 = GUICtrlCreateInput("", 19, 164, 213, 21) Local $Input4 = GUICtrlCreateInput("", 19, 228, 213, 21) GUICtrlCreateLabel("Data1", 18, 18, 180, 17) GUICtrlCreateLabel("Data2", 20, 80, 150, 17) GUICtrlCreateLabel("Data3", 20, 142, 150, 17) GUICtrlCreateLabel("Data4 ", 20, 204, 200, 17) $Button1 = GUICtrlCreateButton("OK", 18, 458, 101, 29, $BS_DEFPUSHBUTTON) $Button2 = GUICtrlCreateButton("Cancel", 126, 458, 101, 29, 0) GUISetState(@SW_SHOW) Opt("GUIOnEventMode", 0) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ;~ Exit ;SetError(1) ExitLoop Case $Button1 $data[0] = GUICtrlRead($Input1) $data[1] = GUICtrlRead($Input2) $data[2] = GUICtrlRead($Input3) $data[3] = GUICtrlRead($Input4) ExitLoop Case $Button2 ;~ Exit ;SetError(1) ExitLoop EndSwitch WEnd Opt("GUIOnEventMode", 1) GUIDelete($GUI2) If Not @error Then Return $data EndFunc ;==>_InputBox Func OnExit() Exit EndFunc ;==>OnExit
    1 point
  8. I don't understand why you're being so difficult. I'm not great at programming, but I know that c# and c++ don't just stop working when they're coded to click a button on a website and a javascript alert dialog opens up. What I'm saying isn't very hard to understand. And no where did I say I tried them all, you even quoted me and still failed to understand what I said, which was No other programming language I know has this issue. No where does that mean I know and have tried every single programming language. So instead of arguing with me publicly, feel free to PM me or stop distracting from this thread.
    1 point
  9. jftuga

    UDF: _ini_to_dict

    OK, that one was not too good either. Once again... -John func _ini_to_dict($fname_ini_config) local $ini_list = IniReadSectionNames( $fname_ini_config ) if @error then MsgBox(0, "Error", "Could not read ini file: " & $fname_ini_config ) return -1 endif local $i, $j local $name, $dict local $slots local $key, $val for $i=1 to $ini_list[0] $slots = IniReadSection( $fname_ini_config, $ini_list[$i] ) $name = "dict_" & StringStripWS($ini_list[$i],3) If StringInStr($name,Chr(32)) then $name = StringReplace($name, chr(32), chr(95) ) endif $dict = ObjCreate("Scripting.Dictionary") if ubound($slots) > 0 then for $j = 1 to $slots[0][0] $key = $slots[$j][0] $val = $slots[$j][1] $dict.Add( $key, $val ) next endif Assign($name, $dict, 2) next return $i-1 endfunc
    1 point
×
×
  • Create New...