| View previous topic :: View next topic |
| Author |
Message |
ansu832001
Joined: 05 May 2008 Posts: 18
|
Posted: Wed May 07, 2008 11:56 am Post subject: How can we tell whether all scripts line have executed?? |
|
|
Hi All,
I have a script with few lines of code when i run this script because of some reasons all the line of script doesn't execute,so how can i know how many line has been executed and when script fails executing all lines i should be able to handle it by executing other script.
Best Regards. |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 139
|
Posted: Wed May 07, 2008 1:09 pm Post subject: |
|
|
Either double-click on the Authotkey icon in the tray and select View -> Key History & Script Info and View -> Lines Most Recently Executed to see what the script has executed.
You can also post your code here in the forum so we can take a look at it and let you know if there's something that may not be set to execute correctly. |
|
| Back to top |
|
 |
ansu832001
Joined: 05 May 2008 Posts: 18
|
Posted: Wed May 07, 2008 1:41 pm Post subject: |
|
|
Hi sinkfaze,
firstly thanks for your reply , my question is something like this
In my Application i have a textbox, when we enter value in it it checks in database whether this entered value is unique or not(like Code number).if unique i continue with further operations.
Now,I record a script,
I enter a value in it(which is unique) then i perform other operations.
and when i rerun this script i takes the same value and enters in the textbox,this time it is duplicate so in this case i get a Validation,from here iam unable to go further,so my basic flow of script is disturbed .
I want to handle this scenario and log some message saying script failed.
I hope you get me.
Best Regards, |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 139
|
Posted: Wed May 07, 2008 1:57 pm Post subject: |
|
|
| ansu832001 wrote: | In my Application i have a textbox, when we enter value in it it checks in database whether this entered value is unique or not(like Code number).if unique i continue with further operations.
Now,I record a script, I enter a value in it(which is unique) then i perform other operations and when i rerun this script i takes the same value and enters in the textbox. this time it is duplicate so in this case i get a Validation,from here i am unable to go further,so my basic flow of script is disturbed.
I want to handle this scenario and log some message saying script failed.
I hope you get me.
Best Regards, |
Since I can't see your script I can't see what exactly is occurring so all I can do is give you ideas on where to look.
Is the textbox in its own separate window? Or is it a textbox emdedded in the program? If it's in a separate window that disappears when you've successfully entered a unique entry you can add a line like WinWaitClose to your script and tell the script wait for that window to close before proceeding.
If the Validation warning is its own separate window you can use IfWinExist to search for the window after you've input the text and do a loop like this:
| Code: | Send [whatever your text is]{ENTER}
Sleep, 1000 ; you can optionally create a delay before entering the loop in order to give the window time to appear
Loop
IfWinExist Validation Error
{
continue
}
else
{
[the rest of your script here]
return
} |
|
|
| Back to top |
|
 |
ansu832001
Joined: 05 May 2008 Posts: 18
|
Posted: Thu May 08, 2008 4:53 am Post subject: |
|
|
Thanks Sinkfaze,
With your suggestion i atleast got some idea on how to deal with it
Best Regards. |
|
| Back to top |
|
 |
|