Hi All,
Can anyone please help me out here?
I have created Macro to copy text from excel and entered into IE. Now, I know how to find text on the screen and wait macro to stop until particular text found on screen with "WaitScreenText" function.
BUT, when my macro copying from excel and paste into IE it will search record from database and then it displayed 4 types of text on the base of search like record duplicated, record not found, record empty and invalid record id. all these errors have particular ID.
Now, my question is;
-How can I set my macro to stop until any of the text appear on the screen (because if i put "WaitScreenText>id5412458?" then if anyother error comes up then still my macro wait for particular ID)
-if particular text appear on the screen then, how can i move my mouse onto that text (not an image).
What I am trying to do is, I want to set loop for the macro that work with anyof the errors,
wait for screen text id5412458? but if screen text is id5415124? then go to another loop and then if screen text is id5454187? then go to this loop.
Is there anyway to do this one?
Thanks.
How to set mouse cursor on found text !!!
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 12
- Joined: Mon Dec 01, 2008 10:46 am
when you use waitscreentext you can set a timeout in seconds i would just do like 5 second per text you wish to detect or how ever long you need to wait depending on script and window explorer loads and what not
so something like this
label>1
Let>WST_TIMEOUT=5
WaitScreenText>screentext1
if>WST_RESULT=true
do this
if>WST_RESULT=FALSE
goto>2
label>2
Let>WST_TIMEOUT=5
WaitScreenText>screentext2
if>WST_RESULT=true
do this
if>WST_RESULT=FALSE
goto>3
label>3
Let>WST_TIMEOUT=5
WaitScreenText>screentexti l
if>WST_RESULT=true
do this
if>WST_RESULT=FALSE
goto>1
so something like this
label>1
Let>WST_TIMEOUT=5
WaitScreenText>screentext1
if>WST_RESULT=true
do this
if>WST_RESULT=FALSE
goto>2
label>2
Let>WST_TIMEOUT=5
WaitScreenText>screentext2
if>WST_RESULT=true
do this
if>WST_RESULT=FALSE
goto>3
label>3
Let>WST_TIMEOUT=5
WaitScreenText>screentexti l
if>WST_RESULT=true
do this
if>WST_RESULT=FALSE
goto>1
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
-
- Newbie
- Posts: 12
- Joined: Mon Dec 01, 2008 10:46 am
How to set mouse cursor on found text !!!
Hi mate,
Thanks for your help here.
It works now.
but the problem is, how can i move my mouse to particular text. like, if text found on the screen and mouse course is somewhere else then how can i move it on to that found text and click on it. Any idea. Thanks.
Thanks for your help here.
It works now.
but the problem is, how can i move my mouse to particular text. like, if text found on the screen and mouse course is somewhere else then how can i move it on to that found text and click on it. Any idea. Thanks.
Is the error message displayed in a window?
Hi hardik_228,
You may want to check whether the error message ID###### is displayed in a window or object is recognized by GetActiveWindow and the other window commands. If the ID number is the window title, GetActiveWindow will return the ID number and the coordinates of the window. If the title is something else GetWindowText might retrieve the ID number.
Gale
You may want to check whether the error message ID###### is displayed in a window or object is recognized by GetActiveWindow and the other window commands. If the ID number is the window title, GetActiveWindow will return the ID number and the coordinates of the window. If the title is something else GetWindowText might retrieve the ID number.
Gale