Jump to content

JohnSte

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by JohnSte

  1. Thank you, everyone. That is exactly what I needed.
  2. Sorry, that was poorly worded. What I meant is, is it possible to run the script from somewhere other than C:Windows?
  3. Thanks, JohnOne - I was wondering why it's running and I'm not seeing any results Is there a way to get it to look at the directory from elsewhere, as opposed to needing to be in the path? and I need the $iflag option with FLTA_FOLDERS to exclude the files, it appears.
  4. Thanks for the sample. Yes, I think you understand what I'm trying to do. I'll give this a whirl!
  5. so it should be DirCreate($filelist) in C:Test ?
  6. Greetings, Thanks to some very helpful previous advice I have made some headway with my script. But I'm either missing something obvious (likely) or not coding the script correctly (also likely). When I compile and run this, I get an error "Line 2789, Error: Error parsing function call." The script: #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> $FileListArray = _FileListToArray ("C:Windows") $FileListTArray= _FileListToArray ("C:Test") For $FileList in $FileListArray; If Not FileExist($FileList) in $FileListTArray Then DirCreate($FileList) in $FileListTArray) EndIf Next Basically all I want to do is check if each file (directory) in the first directory exists in the second, and if not, create it, running through the list of files (directories) in the first array. Any help greatly appreciated!
  7. sahsanu, thank you! Unfortunately the approach here is to have a third machine running the script, with access to both machine 1 and machine 2. JohnOne, thank you too that is exactly what I needed. Ideally what I want to happen is to create an array of the directories on machine 1 under a specific directory, then do the same on machine 2. Then, for each entry on machine 1's array, check to see if the entry exists on machine 2. If it does, copy the files to machine 2; if it does not, create the directory on machine 2, then copy the files. When all this is done, I am now told, I *do* need to delete the files from machine 1.
  8. Thank you, that is the function I need. What I would like to do to test is actually display the array - what is the best way to do that? I do not need to remove any folders, fortunately
  9. Greetings, I am trying to do the following: On Machine #1, read a list of subdirectories under a root directory On Machine #2, confirm the subdirectories from Machine #1 exist On Machine #2, if a subdirectory does *not* exist, create it I know how to create an array (and have done that, as this task actually encompasses more than two machines) but I don't know how to get a list where I don't know the members (the subdirectory list changes frequently) and I don't know how to then confirm the machines' directory listings match. Thanks in advance for any ideas, or please feel free to point me to a resource I missed. Thanks! John
  10. I tried that too and the behavior was as if it thought it was an Alt-Tab sequence. The other open window on the system was the AutoIt editor, and the text was created at the cursor point in the editor.
  11. Right, sorry! ; First we create the log file. $logfile = FileOpen("c:AutoItInstall.log", 2) If $logfile = -1 Then MsgBox(0, "AutoIt3 Error", "Unable to open log file.") Exit EndIf ; Now we include the current time, then write that to the log. #include <Date.au3> LogWriteLineAndFlush ("Logging started " & _NowDate() & " " & _NowTime()) ; Next we check to see if any variables were set. Otherwise we use the defaults. $password = "@Password" $installFile = "c:autoitsdsMobility_server_9.50_WinSvr2008r2_x64.exe" If $CmdLine[0] Then For $i = 1 to UBound($CmdLine)-1 $arg = $CmdLine[$i] If StringInStr($arg, "=") Then $splitArg = StringSplit($arg, '=') $argKey = $splitArg[1] $argValue = $splitArg[2] If $argKey == "/password" Then $password = $argValue EndIf If $argKey == "/installFile" Then $installFile = $argValue EndIf EndIf Next EndIf ; Next we log that we've started the process. LogWriteLineAndFlush (@CRLF & "SDS Golden Path Install Started.") ; Now we select SDS from the splash screen and go through the Warehouse portion of the install. Run ($installfile) WinWaitActive ("NetMotion Mobility XE Server Installation", "Small &Deployment Server") LogWriteLineAndFlush (@CRLF & "Selecting Small Deployment Server option from server install splash screen.") If Not Send ("!D") Then MsgBox (0, "AutoIt3 Error", "Unable to select Small Deployment Server option from server install splash screen.") LogWriteErrorAndFlush () Exit EndIf LogWriteLineAndFlush ("Selected Small Deployment Server option from server install splash screen.") WinWaitActive ("Mobility Warehouse Installation Wizard", "In addition to the primary warehouse") LogWriteLineAndFlush (@CRLF & "Clicking Next button on the Warehouse intro page.") If Not Send ("!N") Then MsgBox (0, "AutoIt3 Error", "Unable to click Next on the Warehouse intro page.") LogWriteErrorAndFlush () Exit EndIf LogWriteLineAndFlush ("Clicked Next button on the Warehouse intro page.") WinWaitActive ("Mobility Warehouse Installation Wizard", "END USER LICENSE AGREEMENT") LogWriteLineAndFlush (@CRLF & "Accepting EULA terms and clicking Next button in Warehouse Installation Wizard.") If Not Send ("!a") Then MsgBox (0, "AutoIt3 Error", "Unable to accept EULA terms in Warehouse Installation Wizard.") LogWriteErrorAndFlush () Exit EndIf LogWriteLineAndFlush ("Accepted EULA terms in Warehouse Installation Wizard.") If Not Send ("!N") Then MsgBox (0, "AutoIt3 Error", "Unable to click Next button on EULA page in Warehouse Installation Wizard.") LogWriteErrorAndFlush () Exit EndIf LogWriteLineAndFlush ("Clicked Next button on EULA page in Warehouse Installation Wizard.") LogWriteLineAndFlush ("Accepted EULA terms and clicked Next button in Warehouse Installation Wizard.") WinWaitActive ("Mobility Warehouse Installation Wizard", "Choose the Mobility warehouse install path.") LogWriteLineAndFlush (@CRLF & "Clicking Next button and taking default warehouse installation path.") If Not Send ("!N") Then MsgBox (0, "AutoIt3 Error", "Unable to click Next button and take default warehouse installation path.") LogWriteErrorAndFlush () Exit EndIf LogWriteLineAndFlush ("Clicked Next button and took default warehouse installation path.") WinWaitActive ("Mobility Warehouse Installation Wizard", "Create a Mobility warehouse password") LogWriteLineAndFlush (@CRLF & "Creating Mobility password and confirming and clicking Next button.") If Not Send ($password "{TAB}" $password) Then MsgBox (0, "AutoIt3 Error", "Unable to create Mobility warehouse password.") LogWriteErrorAndFlush () Exit ;EndIf LogWriteLineAndFlush ("Created Mobility warehouse password and confirmed password.") If Not Send ("!N") Then MsgBox (0, "AutoIt3 Error", "Unable to click Next button on Mobility warehouse password page.") LogWriteErrorAndFlush () Exit EndIf LogWriteLineAndFlush ("Clicked Next button on Mobility warehouse password page.") LogWriteLineAndFlush ("Created and confirmed Mobility password and clicked Next button.") FileWriteLine($logfile, @CRLF & "Finished at " &_NowDate () & " " & _NowTime ()) FileWriteLine($logfile, @CRLF & "Final Result:Pass") FileWriteLine($logfile, @CRLF & "Results File: c:AutoItInstall.log") FileClose($logfile) Func LogWriteLineAndFlush($line) FileWriteLine($logfile, $line) FileFlush($logfile) EndFunc Func LogWriteErrorAndFlush($line) FileWriteLine($logfile, @CRLF & "Final Result:Fail") FileWriteLine($logfile, @CRLF & "Logging Stopped " & _NowDate () & " " & _NowTime ()) FileWriteLine($logfile, @CRLF & "Results File: c:AutoItInstall.log") FileFlush ($logfile) EndFunc
  12. I'm trying to send a password into a control. I could not get that to work. Then I discovered the Recorder and so I was able to send a hard-coded password into this control using Send (). Then we decided it would be good to have an option to set the password as opposed to having it hard-coded. So I learned how to create a variable and accept input. So far so good. However, now when I try to send the password as a variable, I have a problem. This particular control is a password/password confirmation box. To get it to work, I had to use a line like: Send ("P@ssword{TAB}P@ssword") So I tried Send ($Password{TAB}$Password) but that wasn't liked. If I wrap the variable ($Password) in quotes, everything works fine but the password is always $Password I also tried setting the line to raw mode (by using the ,1 at the end of the line) but that also failed. Ideas?
  13. Yeah, you have to register as a potential customer to download it, and I didn't want to ask anyone to jump through that hoop. This didn't work for me, unfortunately - neither did running it with the text in the second parameter. But thanks for the idea!
  14. I have a control with two text boxes for password entry/confirmation. The control has the same name and instance number for both boxes, and I can't figure out which command to use to get it to work. I've attached a PNG of the control. I have tried ControlSend and ControlSetText, for example: ;ControlSetText ("Mobility Warehouse Installation Wizard", "Create a Mobility warehouse password", "[CLASS:#32770; INSTANCE:4]", "password") I have a feeling I'm missing something simple, but I've just started using AutoIt so that wouldn't be much of a surprise The Window Info Summary: >>>> Window <<<< Title: Mobility Warehouse Installation Wizard Class: #32770 Position: 99, 45 Size: 531, 431 Style: 0x94C80AC4 ExStyle: 0x00010101 Handle: 0x0024045E >>>> Control <<<< Class: #32770 Instance: 4 ClassnameNN: #327704 Name: Advanced (Class): [CLASS:#32770; INSTANCE:4] ID: Text: Position: 0, 0 Size: 522, 359 ControlClick Coords: 250, 253 Style: 0x50000444 ExStyle: 0x00010000 Handle: 0x001504D2 >>>> Mouse <<<< Position: 352, 320
×
×
  • Create New...