Jump to content
Sign in to follow this  
Skyhawk32807

Stop Script if Status bar = "****"

Recommended Posts

Skyhawk32807

Hi All,

I'm still very new to AutoIt, but loving it so far! I'm using the Send() command to pull some data from an AS400 client, (the silly clients doen't have any visible text). Basically my script copies the data from the client from AS400 and dumps it into Excel for VBA to clean the file up.

The problem is I don't always know when to stop pulling data from the AS400 clients, as somedays we have 1 page of data, some times is 7+. It there a way to tell AutoIt, if the status bar equals "Function key not allowed.", to stop pulling data, go back to the Excel window? It would then have to Excel it was done (I have been using Send("{CTRLDOWN}v{CTRLUP}") for example, so Excel can run the next the next script). a

I used teh AutoIt Window Info and copied the data displayed in the status bar, when I would like the script to stop running...

>>>> StatusBar <<<<

1: Function key not allowed.

Thanks for anyhelp you can provide!!

Skyhawk

Share this post


Link to post
Share on other sites
Skyhawk32807

i think they made a UDF for this... try searching a little.

Hi Zibit, thanks for the reply. I've been looing around these forums and Googling but haven't found a result yet. I'll keep looking around.

Thanks!

Share this post


Link to post
Share on other sites
SmOke_N

Post the entire AutoInfo tool output.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
NinjaGeek

I would think easiest way to do it would be to compare the outputs from the AS400, and if the current one is the same as the last one, then assume you've reached the last page and stop the loop. BTW, you don't need to do

Send("{CTRLDOWN}v{CTRLUP}")
you can just use
Send("^v")
- see Send in the helpfile for more details on ALT, CTRL, SHIFT, and WIN keys.

Share this post


Link to post
Share on other sites
Skyhawk32807

I would think easiest way to do it would be to compare the outputs from the AS400, and if the current one is the same as the last one, then assume you've reached the last page and stop the loop. BTW, you don't need to do

Send("{CTRLDOWN}v{CTRLUP}")
you can just use
Send("^v")
- see Send in the helpfile for more details on ALT, CTRL, SHIFT, and WIN keys.

Hi NinjaGeek,

Thanks for the responce. Do you know of where I can find some sample code to help me get into this? Or a function (I guess).

Thanks for the heads up on the Send() correction!!!

Skyhawk

Share this post


Link to post
Share on other sites
Skyhawk32807

Per the recommandation of one of the mods I posting the info from my AutoIt Window Info. The status bar propertys are the ones I need to moniter. If the status bar = "Function key not allowed.", I would need to stop the correct script, and run some send() commands.

>>>> Window <<<<
Title:  AS400H
Class:  PCSWS:Main:00400000
Position:   401, -13
Size:   648, 319
Style:  0x14CF0000
ExStyle:    0x00000100
Handle: 0x000700EC

>>>> Control <<<<
Class:  PCSWS:Pres:00400000
Instance:   1
ClassnameNN:    PCSWS:Pres:004000001
Name:   
Advanced (Class):   [CLASS:PCSWS:Pres:00400000; INSTANCE:1]
ID: 2
Text:   
Position:   0, 43
Size:   640, 192
ControlClick Coords:    184, 137
Style:  0x50000000
ExStyle:    0x00000000
Handle: 0x000405BA

>>>> Mouse <<<<
Position:   589, 217
Cursor ID:  0
Color:  0x000000

>>>> StatusBar <<<<
1:  Function key not allowed.                                                      

>>>> ToolsBar <<<<
1:  1   
2:  2   
3:  3   
4:  4   
5:  5   
6:  6   
7:  7   
8:  8   
9:  9   
10: 10  

>>>> Visible Text <<<<


>>>> Hidden Text <<<<

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.