Sign in to follow this  
Followers 0
Ravel

confirm options

5 posts in this topic

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!!!

Share this post


Link to post
Share on other sites



Any takers?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by ChrisL

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0