Ravel Posted January 29, 2006 Share Posted January 29, 2006 I am in the process of moving a large number of files from my main computer to my network storage point. I have a script that i put together, but I cant seem to get the if then else functions to work properly. I am trying to have it cycle from one window to another. Basically if the first window doesnt exist them move to the next part of the script and see if that exists. That way i dont have to check my pc every five mins to see if there was a message up there asking me for confirmation. Here is the script as it is written right now: opt ("WinTitleMatchMode",2) HotKeySet('{ESC}', 'Terminate') If <"Confirm File Move"> then WinWaitActive("Confirm File Move") WinActive("Confirm File Move") [Elseif "Confirm File Replace" Then WinWaitActive("Confirm File Replace") WinActive("Confirm File Replace") While 1 MouseClick("left", 188, 111,);yes to confirm Sleep(8000) MouseClick("left", 194, 232,);yes to confirm Sleep(8000) WEnd Func Terminate() Exit EndFunc;==>Terminates script Please let me know what corrections that i need to make. Thanks in advance!!! Link to comment Share on other sites More sharing options...
Ravel Posted January 29, 2006 Author Share Posted January 29, 2006 Any takers? Link to comment Share on other sites More sharing options...
Ravel Posted January 29, 2006 Author Share Posted January 29, 2006 I take it there isnt anyone on atm that knows the way to set this script up correctly. Well I guess ill continue to play around with it and check back here to see if someone answers. Link to comment Share on other sites More sharing options...
ChrisL Posted January 29, 2006 Share Posted January 29, 2006 (edited) I dont really understand the while loop you have with the ,ouse clicks, it will just keep doing the mouse clicks every 8 seconds. If WinExists ("Confirm File Move") then WinActive("Confirm File Move") ;put the rest of stuff here for this option Elseif WinExists ("Confirm File Replace") Then WinActive("Confirm File Replace") ;put other stuff here for this option EndIf I wondered if this was what you meant to do? While 1 If WinExists ("Confirm File Move") then WinActive("Confirm File Move") ;put the rest of stuff here for this option MouseClick("left", 188, 111,);yes to confirm Sleep(8000) Elseif WinExists ("Confirm File Replace") Then WinActive("Confirm File Replace") ;put other stuff here for this option MouseClick("left", 194, 232,);yes to confirm Sleep(8000) EndIf Sleep (500) Wend Edited January 29, 2006 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Ravel Posted January 30, 2006 Author Share Posted January 30, 2006 I dont really understand the while loop you have with the ,ouse clicks, it will just keep doing the mouse clicks every 8 seconds. If WinExists ("Confirm File Move") then WinActive("Confirm File Move") ;put the rest of stuff here for this option Elseif WinExists ("Confirm File Replace") Then WinActive("Confirm File Replace") ;put other stuff here for this option EndIf I wondered if this was what you meant to do? While 1 If WinExists ("Confirm File Move") then WinActive("Confirm File Move") ;put the rest of stuff here for this option MouseClick("left", 188, 111,);yes to confirm Sleep(8000) Elseif WinExists ("Confirm File Replace") Then WinActive("Confirm File Replace") ;put other stuff here for this option MouseClick("left", 194, 232,);yes to confirm Sleep(8000) EndIf Sleep (500) Wend Yea that looks like it. I am at work now, but I will have to check into that when i get home. Thanks for the reply and the help. 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