Unlearned as I am I can't figure out how to do this right. Can someone straighten me out?
TIA...
//the open error window Costing Utilities text is what I'm trying to confirm
SetFocus>Costing Utilities
Press CTRL
Send>c
Release CTRL
Wait>1
GetClipBoard>"clipboard"
Wait>1
//this is what actually is on the clipboard
If>"clipboard"="---------------------------
Costing Utilities
---------------------------
Accounting period is closed - posting to this period is not allowed
---------------------------
OK
---------------------------"
Let>MSG_STAYONTOP=1
MessageModal>"Yep"
else
Let>MSG_STAYONTOP=1
MessageModal>"Nope"
endif
beginner question
Moderators: Dorian (MJT support), JRL
-
- Automation Wizard
- Posts: 1101
- Joined: Fri Jan 07, 2005 5:55 pm
- Location: Somewhere else on the planet
#1 forget using quotes, macroscheduler doesn't use them. e.g.
GetClipBoard>"clipboard"
should be
GetClipBoard>clipboard
and
MDL>"yep" will display "yep" not yep
#2 the If> can't run over multiple lines like that. I don't have that screen to play with, but for example if I capture
First Line
Second Line
to the clipboard from notepad this If> will work:
If>clipboard=First LineSecond Line
But it has to have exactly the right number of spaces etc.
#3 I would do this differently by looking for a key word, e.g. closed, in that window:
GetClipBoard>clipboard
Pos>closed,clipboard,1,itsclosed
MDL>itsclosed
If the clipboard contains closed then itsclosed will return a value other than 0, if it doesn't then itsclosed will be 0. You can do your If> based on the value of itsclosed.
GetClipBoard>"clipboard"
should be
GetClipBoard>clipboard
and
MDL>"yep" will display "yep" not yep
#2 the If> can't run over multiple lines like that. I don't have that screen to play with, but for example if I capture
First Line
Second Line
to the clipboard from notepad this If> will work:
If>clipboard=First LineSecond Line
But it has to have exactly the right number of spaces etc.
#3 I would do this differently by looking for a key word, e.g. closed, in that window:
GetClipBoard>clipboard
Pos>closed,clipboard,1,itsclosed
MDL>itsclosed
If the clipboard contains closed then itsclosed will return a value other than 0, if it doesn't then itsclosed will be 0. You can do your If> based on the value of itsclosed.