
NoobieAutoitUser
Active Members-
Posts
57 -
Joined
-
Last visited
Content Type
Forums
Downloads
Forum Articles
Events
Everything posted by NoobieAutoitUser
-
@subz. Thanks a lot , with a few tweaks it works perfectly. Also I should be able to use this elsewhere, so many doors have opened. Though, strangely, I was getting error message on the line '$aMaintenance[4] = [3, "vacum", "reindex", "analyze"]'. Now I can move on in my script, thanks again $aMaintenance[4] = [3, "vacum", "reindex", "analyze"] <-- Error 'possibly used before declaration.' Local $aMaintenance[4] = [3, "vacum", "reindex", "analyze"] <-- works, I have no idea why.
-
I would like to do the exact same code - except changing the line 'Local $param19 = $a1' to 'Local $param19 = $a2, for the 2nd run, and for the 3rd run to 'Local $param19 = $a3'. I'm getting stumped on how to use the changing variables. $a1 = "vacum" $a2 = "reindex" $a3 = "analyze" Local $param19 = $a1 ; 1st run loop Local $param19 = $a2 , 2nd run loop Local $param19 = $a3 , 3rd run exit loop
-
Hi everybody. Trying to learn some Autoit and move form an old batch file that did back ups, and had served me well. I'm trying to use 'SQlite' to do some file maintenance on files in back up location (then back them up). 'Vacuum' , 'reindex' and 'analyze', are the three things I'm trying to 'run' on each of the SQlite files the script finds. I have the script written, and it works great. Except I cannot figure out how to loop it? I'm not even sure that is the right word to use. I'm stuck and would appreciate any help or ideas to get past this hurdle. Thanks for looking and offering any input. #include <File.au3> #include <Array.au3> $FileList = _FileListToArray(@AppDataDir & "\Moonchild Productions\Pale Moon\Profiles\od3oy6iu.default", "*.sqlite") If @error = 1 Then MsgBox(0, "", "0 Files found.") Exit EndIf if isarray($FileList) then ConsoleWrite('Number of files returned = ' & $FileList[0] & @LF) ; ConsoleWrite($FileList & @LF) _ArrayDisplay($FileList, "$FileList") ; Debug $a1 = "vacum" $a2 = "reindex" $a3 = "analyze" For $i = 1 To $FileList[0] Local $param01 = "D:\[[Command]\sqlite3.exe" Local $param05 = " " Local $param10 = $FileList[$i] Local $param15 = " " Local $param19 = $a1 ; Run SQLite Local $sRun = $param01&$param05&$param10&$param15&$param19 ConsoleWrite(' $sRun >'&$sRun&'<'&@CRLF) ; ..this way you can see what is gonna execute ; RunWait($sRun, "", @SW_MAXIMIZE) Next Number of files returned = 7 $sRun >D:\[[Command]\sqlite3.exe content-prefs.sqlite vacum< $sRun >D:\[[Command]\sqlite3.exe cookies.sqlite vacum< $sRun >D:\[[Command]\sqlite3.exe formhistory.sqlite vacum< $sRun >D:\[[Command]\sqlite3.exe permissions.sqlite vacum< $sRun >D:\[[Command]\sqlite3.exe places.sqlite vacum< $sRun >D:\[[Command]\sqlite3.exe storage.sqlite vacum< $sRun >D:\[[Command]\sqlite3.exe webappsstore.sqlite vacum<
-
Hi folks, I am moving away from Windows 'batch' to Autoit. A lot more power with Autoit, and flexibility. Also a lot more to learn I wrote a script that automatically backups something. It makes a back up every time I launch the script. It then deletes all backups except three. That is the problem. Everything works great till the deletion part. If there are files to delete, it works great. If there are not files to delete I get this error 'Array variable has incorrect number of subscripts or subscript dimension range exceeded'. I'm fairly sure that is has something to do with the 'Ubound' part. From what I read, do I need to resize the array? Or how do I move past the error. I am new to this, and not sure how do error checking. Thanks for any input. #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Dim $szDrive, $szDir, $szFName, $szExt $openfile = 'D:\Z-Users\Last-Time\AppData\Roaming\Something\Saves' $foldertoworkin = 'G:\Temp_D1\' $filename = _PathSplit($openfile, $szDrive, $szDir, $szFName, $szExt) _ArrayDisplay ($filename,"") $Filenamevalue = _ArrayToString($filename,'',3,3) ; MsgBox(0, "Test", $szFName) FileChangeDir($openfile) Local $param01 = "C:\Program Files\7-Zip\7z.exe" Local $param02 = " a -mx1 -r " Local $param03 = $foldertoworkin ; Local $param04 = $szFName Local $param04 = 'Something--' Local $param05 = ".zip" ;Create zip Local $sRun = $param01&$param02&$param03&$param04 &"-"& @MON &"-"& @MDAY &"-"& @YEAR &"_"& @HOUR &"-"& @MIN &"-"& @SEC&$param05 ConsoleWrite(' $sRun >'&$sRun&'<'&@CRLF) ; ..this way you can see what is gonna execute RunWait($sRun, "", @SW_HIDE) ;############################################################################################## Local $sFilePath = $foldertoworkin Local $aFilePath = _FileListToArrayRec($sFilePath, "*", 1,0,0,2) Local $aFileTime[1][2] ;============================================================================= _ArrayColInsert($aFilePath, 1) ; insert a second column For $i = 1 To $aFilePath[0][0] ; now it's [0][0] - row index 0, column index 0 $aFilePath[$i][1] = FileGetTime($aFilePath[$i][0], 1, 1) ; in column 1 (remember 0-indexed - if you start counting by one it's your second) Next ;============================================================================= _ArrayDelete($aFilePath, 0) ; delete number of indexes - there is no filepath inside _ArraySort ($aFilePath,1, 0, 0, 1) ;sort by date _ArrayDisplay($aFilePath) ;============================================================================= For $m = 3 To UBound($aFilePath, 1) ; '3 to ubound' takes the first '3' off the top of the list returned form array (make sure what you want is on the top) ;ConsoleWrite("FileDelete: " & $aFilePath[$m][0] & @CRLF) ; instead of real deletion only saying what will be deleted - just for my security ;if _FileInUse($myfile[$n], 0) And MsgBox(0,"",@error) then continueloop; ADDED ;if $aFilePath[$m][0] And MsgBox(0,"",@error) then continueloop; ADDED FileDelete($aFilePath[$m][0]) ;if FileDelete($aFilePath[$m][0]) And @error = 1 then continueloop; ADDED Next ;############################################################################## ProcessSetPriority("Something.exe", 3)
-
Thanks to all of you that helped. I start to see writing the script the easy, its the debugging that is a PITA (pain in the azz). @ Simpel - Thanks for cleaning up my script and the pointers. What is a 1D array? As opposed to a 2D array? @ Danp2 - It was the top two (by creation date). Thanks for your post, as I was going nuts trying to figure how to make that work I changed to it to sort by 'creation date'. I will start to use the 'console write' more, as it really helps to see what it will do before it does it. Again thanks. #include <Array.au3> #include <File.au3> Local $sFilePath = "K:\zxzx" Local $aFilePath = _FileListToArrayRec($sFilePath, "*", 1,0,0,2) Local $aFileTime[1][2] ;============================================================================= _ArrayColInsert($aFilePath, 1) ; insert a second column For $i = 1 To $aFilePath[0][0] ; now it's [0][0] - row index 0, column index 0 $aFilePath[$i][1] = FileGetTime($aFilePath[$i][0], 1, 1) ; in column 1 (remember 0-indexed - if you start counting by one it's your second) Next ;============================================================================= _ArrayDelete($aFilePath, 0) ; delete number of indexes - there is no filepath inside _ArraySort ($aFilePath,1, 0, 0, 1) ;sort by date _ArrayDisplay($aFilePath) ;============================================================================= For $m = 2 To UBound($aFilePath, 1) ; you only want to delete the newest and second newest file (remember row index 0 and 1) ; ConsoleWrite("FileDelete: " & $aFilePath[$m][0] & @CRLF) ; instead of real deletion only saying what will be deleted - just for my security ; ConsoleWrite("FileDelete: " & $aFilePath[$m][0] & @CRLF) ; instead of real deletion only saying what will be deleted - just for my security FileDelete($aFilePath[$m][0]) Next
-
I understand how to sort by date now In the scrip their are two arrays, first is '$aFilePath' and second is '$aFileTime'. '$aFileTime' give me the correct things to delete, but the the script uses '$aFilePath' to delete the files. I try switching the arrays and I get a subscript error, or it does nothing. What can I do to use '$aFilePath' as the array the delete files? Thanks for all the input, I slowly learn my way around The below example deletes nothing. #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Local $sFilePath = "K:\zxzx" Local $aFilePath = _FileListToArrayRec($sFilePath, "*", 1,0,0,2) Local $aFileTime[1][2] ;============================================================================= For $i = 1 To $aFilePath[0] _ArrayAdd($aFileTime, $aFilePath[$i] & "|" & FileGetTime($aFilePath[$i], 0, 1)) Next ;============================================================================= ; _ArraySort ($aFileTime,1, 0, 0, 1) ;sort by date _ArraySort ($aFilePath,1, 0, 0, 1) ;sort by date ; _ArrayDisplay($aFileTime) _ArrayDisplay($aFilePath) ;============================================================================= For $m = 1 To $aFilePath[0]-2 FileDelete($aFilePath[$m]) Next ;=============================================================================
-
@ careca & @ Danp2 Thank you both for taking the time to assist. Unfortunately their are errors. Its '$aFilePath'. No matter what I do with this, it always returns an error. Not always the same error, but '$aFilePath' it is always something to do with this. After a few hours, I came here to for help lol Both arrays use '$i' as a variable? Might that that be the trouble ? Error "M:\xvcbvctyuiyt76.au3" (8) : ==> Subscript used on non-accessible variable.: For $i = 1 To $aFilePath[0] For $i = 1 To $aFilePath^ ERROR #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Local $sFilePath = "K:\zxzx" Local $aFilePath = _FileListToArrayRec($sFilePath, "*", 1,0,0,2) Local $aFileTime[1][2] ;============================================================================= For $i = 1 To $aFilePath[0] _ArrayAdd($aFileTime, $aFilePath[$i] & "|" & FileGetTime($aFilePath[$i], 0, 1)) Next ;============================================================================= _ArraySort ($aFileTime,1,1,"",1) ;sort by date ; _ArrayDelete($aFileTime, "1-2") _ArrayDisplay($aFileTime) ;============================================================================= For $i = 2 To UBound ($aFileTime, 1) FileDelete($aFileTime[$i][0]) Next ;=============================================================================
-
@careca This code looks real nice Unfortunately its deletes all (which you said it would). I would like to only delete the values that display in '_ArrayDisplay($aFileTime)'. This is where I get stuck, how do I use the values in '_ArrayDisplay($aFileTime)' to delete files? Thanks a lot for your help. #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Local $sFilePath = "K:\zxzx" Local $aFilePath = _FileListToArrayRec($sFilePath, "*", 1,0,0,2) Local $aFileTime[1][2] ;============================================================================= For $i = 1 To $aFilePath[0] _ArrayAdd($aFileTime, $aFilePath[$i] & "|" & FileGetTime($aFilePath[$i], 0, 1)) Next ;============================================================================= _ArraySort ($aFileTime,1,1,"",1) ;sort by date _ArrayDelete($aFileTime, "1-2") _ArrayDisplay($aFileTime) ;============================================================================= For $i = 1 To $aFilePath[0] FileDelete($aFilePath[$i]) Next ;============================================================================= @Danp2 Yes, my goal is to only delete the top two in the array display (the newest files). Then using what is left in the array (after deleting). This is for a auto delete 'batch'. I have used other scripts before, but if something goes wrong, and after a period of time, all your files get deleted. After this works, then it always keeps at least two files for backup. I hope this makes sense
-
Hi everybody. I'm trying to delete files I have read into an array. Everything works, other than the deleting. I have scoured the forums, and tried all kinds of thing. Most errors I get are 'Array variable has incorrect number of subscripts error'. I am not sure what I am doing with arrays, and am quite proud I got the delete lines to work Any pointers how to use the info form the array to delete these files found ? #include <Array.au3> #include <File.au3> #include <MsgBoxConstants.au3> Local $sFilePath = "K:\zxzx" Local $aFilePath = _FileListToArrayRec($sFilePath, "*", 1,0,0,2) ; If @error Then Exit ; _ArrayDisplay($aFilePath) Local $aFileTime[1][2] For $i = 1 To $aFilePath[0] _ArrayAdd($aFileTime, $aFilePath[$i] & "|" & FileGetTime($aFilePath[$i], 0, 1)) Next _ArraySort ($aFileTime,1,1,"",1) ;sort by date ; Deletes first two results (newest is ontop) _ArrayDelete($aFileTime, "1-2") _ArrayDisplay($aFileTime)
-
Hi, thanks for looking at my post. I have a script that does 'auto answering' for Pidgin (chat client, using XMPP). I use OTR (off the record - encrypts conversations) with Pidgin. Their is a pause when someones connects to you (some times it takes seconds, other minutes), as the OTR kicks in. I made a script that works with it and is so far is flawless. I am using an 'ini' to read from to get the info that is needed for each user (~10 users). I understand how to read the different sections on the ini. How do I tell the script what section to use based on who logged in? Example = !Mycell logs in and uses Buddy1 in the ini. Example = Webpage logs in and uses Buddy2 in the ini. How do I tell the script what part to use? I have one main script. Do I need to make a script for each ini? Thanks for any help. I feel so close to being done with this, and this part has me stumped. [Buddy1] Wname=!My-Cell-Q1 ClipWrite=!My-Cell-Q1ClipWrite.txt TextToRead=!My-Cell-Q1-Read-Text.txt Ran=Yes [Buddy2] Wname=Webpage ClipWrite=Webpage.txt TextToRead=Webpage-Read-Text.txt ; Maine script #include <File.au3> #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> ; sleep(5000000000000000000000000) $sIniFile = 'ini-begin.ini' ; S- Read the INI file for the values. Local $sReadIni0 = IniRead($sIniFile, "Buddy1", "Wname", "Default Value") Local $sReadIni1 = IniRead($sIniFile, "Buddy1", "ClipWrite", "Default Value") Local $sReadIni2 = IniRead($sIniFile, "Buddy1", "TextToRead", "Default Value") ; S-Delete File for 'clip write' , so file is blank on first use. ; FileDelete - Do not use quotes, with viariables. Use quotes with full name. FileDelete($sReadIni1) ; sleep(500000000000000000000000) ; E-Delete File for 'clip write' , so file is blank on first use. ; S- Read the INI file for the values. ; Display the value returned by IniRead. (Works) ; MsgBox($MB_SYSTEMMODAL, "", "The value of 'Buddy1' in the section labelled '$sReadIni0 ' is: " & $sReadIni0) ; MsgBox($MB_SYSTEMMODAL, "", "The value of 'Buddy1' in the section labelled 'ClpWrite' is: " & $sReadIni1) ; sleep(5000000000000) ; MsgBox($MB_SYSTEMMODAL, "", "The value of 'Buddy1' in the section labelled 'TextToRead' is: " & $sReadIni2) ; Write the values to an INI file (Works). ; IniWrite($sIniFile, "Buddy1", "Ran", "Yes") ; E- Read the INI file for the values. ; S - Wait for message window to appear. ; The 10 is in seconds (not milliseconds) ; WinWait($sReadIni0 , "", 10) If WinExists($sReadIni0 ) Then ;MsgBox(0, "", "Window exists") Else ;MsgBox(0, "", "Window does not exist") Exit EndIf ; E - Wait for message window to appear. $counter = 0 While $counter <= 5 Sleep(10) ;MsgBox(0, "Value of $counter is:", $counter) winactivate($sReadIni0) Send("^l") winactivate($sReadIni0) Sleep(1500) Send("!c") winactivate($sReadIni0) Sleep(1500) Send("{RIGHT}") winactivate($sReadIni0) Sleep(1500) Send("{RIGHT}") winactivate($sReadIni0) Sleep(1500) send("{ENTER}") winactivate($sReadIni0) Sleep(1500) Send("{F6}") winactivate($sReadIni0) Sleep(1500) Send("^a") winactivate($sReadIni0) Sleep(1500) Send("^c") winactivate($sReadIni0) Sleep(1500) Send("^l") winactivate($sReadIni0) Sleep(1500) ; S - Write Clipboard to a file ; the & '@CRLF' adds a line break afer paste form clipboard filewrite($sReadIni1,clipget() & @CRLF) ; E - Send keys to pidgin to copy text and send to ClipWrite. ; S - Look for matching text in file.) Sleep(1500) $textToFind = ("successfully refreshed") $AllText = FileRead($sReadIni1) If StringInStr($AllText ,$textToFind) <> 0 then ;it's there ;MsgBox($MB_OK, "Crap", "Yes") exitloop else ;it isn't there ;MsgBox($MB_OK, "Crap", "No") Sleep(100) endif ; E - Look for matching text in file. $counter = $counter + 1 WEnd For $i = 1 to _FileCountLines($sReadIni2) $line = FileReadLine($sReadIni2, $i) ;Send($line & @CRLF) Send($line) Send("{ENTER}") Sleep(5000) Next ; FileClose($file) ; end read form text fiel and send to pidgin
-
[Solved] Winwait (strange behavior?)
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
Hi. I have been messing with this for a few days now. My head feels like scrambled eggs The 'code' finally works I think it was a combination of a few things, and that the window name has an exclamation point in it. Notice I used ' instead of " around !My-Cell. Now it waits for 5 seconds, if window does not appear, it exits the script. Thanks to all for help, and for having patience. $hWnd = WinWait('!My-Cell', "", 5) sleep(5000) If WinExists($hWnd) Then MsgBox(0, "", "Window exists") Else MsgBox(0, "", "Window does not exist") Exit EndIf -
[Solved] Winwait (strange behavior?)
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
Finally I understand now. I thought it paused until the window existed, and timed out the script. I was pulling my hair out Thanks so much. How do I make a script wait for a window and exit if not ? Winwait does not work like I thought it did, so how to do this ? I'm thinking a loop (x seconds). If 'winexsits' ? -
[Solved] Winwait (strange behavior?)
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
WinWait Pauses execution of the script until the requested window exists. WinWait ( "title" [, "text" [, timeout = 0]] ) Parameters title The title/hWnd/class of the window to check. See Title special definition. text [optional] The text of the window to check. Default is an empty string. See Text special definition. timeout [optional] Timeout in seconds if the window does not exist. Default is 0 (no timeout). Winwait is to 'pause' until said 'notepad' exists, and it waits till the time out? Winwait gives notepad 10 seconds to come into existence? What happens if 'notepad' does not exist within the timeout? I feel very stupid with this -
[Solved] Winwait (strange behavior?)
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
@Jos I am thinking I don't understand the concept of Winwait. ; Wait 10 seconds for the Notepad window to appear. WinWait("[CLASS:Notepad]", "", 10) Why does/can/should it wait for 10 seconds? From the Scite timer, it does not wait. What am I missing? -
Hello to all, and thanks for looking at this questions. Where this questions comes from. I am trying to use Winwait to (wait for it) wait for a window to appear. I use this example form the help file. Example() Func Example() ; Run Notepad Run("notepad.exe") ; Wait 10 seconds for the Notepad window to appear. WinWait("[CLASS:Notepad]", "", 10) ; Wait for 2 seconds to display the Notepad window. Sleep(2000) ; Close the Notepad window using the classname of Notepad. WinClose("[CLASS:Notepad]") EndFunc ;==>Example WinWait("[CLASS:Notepad]", "", 10) ^ That is is set to time out in 10 seconds? I run this script in Scite. >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "Q:\!Autoit\5678.au3" /UserParams +>13:36:33 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:Q:\!Autoit\5678.au3 +>13:36:33 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "Q:\!Autoit\5678.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop +>13:36:36 AutoIt3.exe ended.rc:0 +>13:36:36 AutoIt3Wrapper Finished. >Exit code: 0 Time: 2.89 Notice the time is at 2.89 (seconds?). It should wait (close to) 10 seconds before doing any (waiting for window to appear)? Please help as I am so confused with this, I made the rest work, and I am getting stuck on waiting for a window!!
-
[Solved] Loops and exit loops.
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
Thanks -
[Solved] Loops and exit loops.
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
Very good, I feel shamed as I did not catch that. I have been messing with this for days, and coping, pasting, and tweaking. I assumed (no need to say what it stand for ) , that all is in Milli seconds. Thanks so much for your patience. I feel a as fool, but i know why now lol. Works below. ; S - Wait for window to apear $rc=WinWait("!My-Cell", "", 10) If not $rc Then exit ; E - Wait for window to apear run("notepad") Edit : Can/how do I mark subject as solved? -
[Solved] Loops and exit loops.
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
'forcing abrupt termination' - that is me stopping the script? I learn something new every day Now this new version is stopped at 53 seconds, it should have stopped at 10 (give or take, and exited)? I am trying to use SCite, to see console errors, and maybe solve this. So far the time out appears to do nothing, and notepad runs (not in SCite). In Scite nothing happens. '!My-Cell' is not open at any time. I am trying to loop within Auotit and wait for a window to appear '!My-Cell'. Than run 'notepad'. Never is '!My-Cell' window open, as I test the script to see what it does if the window is not there. I need it to time out (and not execute 'notepad' if '!My-Cell' does not appear. Again thanks for trying. I am at these forums, as I am at my wits end. I have used example scripts form help, and used stuff form forums, but I am stuck. >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "Q:\!Autoit\hjhfdjhgjuytuytuntgdnjngh.au3" /UserParams +>09:40:57 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:Q:\!Autoit\hjhfdjhgjuytuytuntgdnjngh.au3 +>09:40:57 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "Q:\!Autoit\hjhfdjhgjuytuytuntgdnjngh.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop >Process failed to respond; forcing abrupt termination... >Exit code: 1 Time: 53.79 -
[Solved] Loops and exit loops.
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
Hi, and again thanks for your help, I pasted the code into Scite, and ran the script. This is the output. I am lost as to what is not correct. I have tried so many 'For/if, Do/Until, Else' and I don't understand what is wrong. Again, my goal is to (loop?) and wait for a window to appear, and then if it does not in 'x' seconds, exit script. >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "Q:\!Autoit\yjukukjjkl.au3" /UserParams +>20:37:08 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0 Keyboard:00000409 OS:WIN_10/ CPU:X64 OS:X64 Environment(Language:0409) CodePage:0 utf8.auto.check:4 +> SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE UserDir => C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper >Running AU3Check (3.3.14.2) from:C:\Program Files (x86)\AutoIt3 input:Q:\!Autoit\yjukukjjkl.au3 +>20:37:08 AU3Check ended.rc:0 >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "Q:\!Autoit\yjukukjjkl.au3" --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop >Process failed to respond; forcing abrupt termination... >Exit code: 1 Time: 5.385 ; S - Wait for window to apear $rc=WinWait("!My-Cell", "", 10000) If not $rc Then exit ; E - Wait for window to apear run("notepad") -
[Solved] Loops and exit loops.
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
Yes , still problems. It just launches notepad and that is it. Does not pause or wait. I was/am thanking you for your help, as this has me worn out I thought the rest would be hardest, and this is by far the hardest to solve. -
[Solved] Loops and exit loops.
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
When I run this, it launches Notepad. Does not pause for any amount of time. Thanks for the input. I have been messing with this for a few days now, and my eyes are starting to hurt ; S - Wait for window to apear $rc=WinWait("!My-Cell", "", 10000) If not $rc Then exit ; E - Wait for window to apear run("notepad") -
[Solved] Loops and exit loops.
NoobieAutoitUser replied to NoobieAutoitUser's topic in AutoIt General Help and Support
; S - Wait for window to apear WinWait("!My-Cell", "", 10000) If @error Then exit If not @error Then exit ; E - Wait for window to apear run("notepad") This is testing for errors? WinWait("!My-Cell", "", 10000) Wait until '!My-Cell' appears, "" blank, and wait 10 seconds for window? What am I missing?