Sign in to follow this  
Followers 0
Heracles

Noob Question - Please Help

6 posts in this topic

#1 ·  Posted (edited)

Hi!

What I want my script to do:

Nothing until a certain window appears

Then click the right of two buttons

Then do noting again, waiting for the same thing.

using AU3info I gathered this info

Press CTRL-ALT-F to pause the display.

>>>>>>>>>>>> Window Details <<<<<<<<<<<<<

Title: Testprog

Class: #32770

Size: X: 449 Y: 460 W: 389 H: 119

>>>>>>>>>>> Mouse Details <<<<<<<<<<<

Screen: X: 570 Y: 528

Cursor ID: 2

>>>>>>>>>>> Pixel Color Under Mouse <<<<<<<<<<<

RGB: Hex: 0xD4D0C8 Dec: 13947080

>>>>>>>>>>> Control Under Mouse <<<<<<<<<<<

Size:

Control ID:

ClassNameNN:

Text:

>>>>>>>>>>> Status Bar Text <<<<<<<<<<<

>>>>>>>>>>> Visible Window Text <<<<<<<<<<<

&Yes

&No

Would you like to proceed?

>>>>>>>>>>> Hidden Window Text <<<<<<<<<<<

my first attempt :think: looked something like this:

#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1) ; Change to OnEvent mode

WinWaitActive ( "Testprog", ["&Yes &No"], [timeout] )

ControlClick ( "Testprog", "&Yes &No", controlID [, "right"] [, clicks]] )

but obviously missing a lot :( , can you please help me?

Thanks

Eric

Edited by Heracles

Share this post


Link to post
Share on other sites



per info

Title: Testprog

per your script

WinWaitActive ( "YaTBoT v2.7.1"

?????

any chance this is on-line??

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Don´t know what you´re talking about :think:

Any help would be appreciated

Share this post


Link to post
Share on other sites

A lot of nice tips there!

Figured out a much easier approach:

#include <GUIConstants.au3>

$i = 0

Do

WinWaitActive ("Testprog")

send("{TAB}")

send("{ENTER}")

Until $i = 1

And it works like a charm! :think:

Thanks a lot!

Share this post


Link to post
Share on other sites

A lot of nice tips there!

Figured out a much easier approach:

#include <GUIConstants.au3>

$i = 0

Do

WinWaitActive ("Testprog")

send("{TAB}")

send("{ENTER}")

Until $i = 1

And it works like a charm! :think:

Thanks a lot!

Your loop never stops... Might try this:
HotKeySet('{ESC}', 'ExitNow')

While 1
    WinWaitActive('Testprog')
    Send('{Tab}')
    Send('{ENTER}')
    Sleep(10)
WEnd

Func ExitNow()
    Exit
EndFunc
The Hotkey will let you press Esc to exit the script, so at least you have some control over it.

[center]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.[/center]

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  
Followers 0