Time_Out for an Input Window?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
edauthier
Pro Scripter
Posts: 84
Joined: Sun Apr 13, 2003 1:26 pm
Location: USA

Time_Out for an Input Window?

Post by edauthier » Tue Jun 03, 2003 2:43 pm

Hello,
I am having a brain cramp for macro that at times I would like to interact with and other times let run on it's own; based on lack of input.

So the input window would appear and if in 'x' amount of time there's no entry into the window it would continue on it's path.

Hope that makes sense.

Thanks, Ed
Massachusetts, USA

Lumumba

Post by Lumumba » Tue Jun 03, 2003 4:15 pm

Code: Select all

Macro>ask.scp
Wait>10
IfWindowOpen>Confirm,CloseWindow

Label>Answer
GetClipboard>var
Message>Answer was: %var%
Goto>End

Label>CloseWindow
SetFocus>Confirm
WindowAction>3,Confirm
Message>There was no answer!

Label>End
Message>Done
ask.scp

Code: Select all

Ask>Anything new?,var
PutClipboard>%var%
OK. Here's quite the same with the input> command ...

Code: Select all

Macro>input.scp
Wait>10
IfWindowOpen>Macro Scheduler Input,CheckInput
Goto>GetTheInput

Label>CheckInput
SetFocus>Macro Scheduler Input
PushButton>Macro Scheduler Input,OK
If>var=NO, End
If>var=, End
Message>The input made: %var%
Goto>End

Label>GetTheInput
GetClipboard>%var%

Label>End


input.scp

Code: Select all

Input>var,Do you realy like G.W.Bush ?, NO
PutClipboard>%var%

Lumumba

Post by Lumumba » Tue Jun 03, 2003 4:18 pm

Replace this:
Input>var,Do you realy like G.W.Bush ?, NO

with that:
Input>var,Do you realy like G.W.Bush ?,NO

-> get rid of the additional space in the default variable

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts