JonM Posted January 14, 2008 Share Posted January 14, 2008 My script: For $i = 90 to 1 Step -1 WinWaitActive("JPEG Option") SEND("8{ENTER}") Next Needs a counter at least twice as big as the number of times I want it to run. In above example this script only runs on 43 files and not all 90. If it is meaningful this script is when I am running a photoshop automate action. Tried a few searches of forum but probably using wrong keywords as didn't find anything. Any help appreciated. Link to comment Share on other sites More sharing options...
BrettF Posted January 14, 2008 Share Posted January 14, 2008 My script:For $i = 90 to 1 Step -1 WinWaitActive("JPEG Option") SEND("8{ENTER}")NextNeeds a counter at least twice as big as the number of times I want it to run. In above example this script only runs on 43 files and not all 90.If it is meaningful this script is when I am running a photoshop automate action.Tried a few searches of forum but probably using wrong keywords as didn't find anything.Any help appreciated.Is that your whole script? I'm thinking its the program that is having a problem. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
therks Posted January 14, 2008 Share Posted January 14, 2008 I would guess that perhaps the window does not disappear or become inactive fast enough after the Send, so what's happening is it loops twice before the window disappears. Try adding something to check if the window has closed, or changed somehow before continuing the loop. Maybe something like For $i = 90 to 1 Step -1 WinWaitActive("JPEG Option") SEND("8{ENTER}") WinWaitClose("JPEG Option") Next My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
JonM Posted January 14, 2008 Author Share Posted January 14, 2008 I would guess that perhaps the window does not disappear or become inactive fast enough after the Send, so what's happening is it loops twice before the window disappears. Try adding something to check if the window has closed, or changed somehow before continuing the loop. Maybe something like For $i = 90 to 1 Step -1 WinWaitActive("JPEG Option") SEND("8{ENTER}") WinWaitClose("JPEG Option") Next Many thanks, the WinWaitClose has solved my problem. I had assumed the WinWaitActive needed a new instance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now