Jump to content

Recommended Posts

Posted

#NoTrayIcon

Sleep(15000)

while 1

AutoItSetOption("WinTitleMatchMode", 4)

WinWait( "classname=#32770", "", 5 )

ControlFocus ( "classname=#32770","" , "Button2" )

ControlClick ( "classname=#32770", "" , "Button2","left" )

wend

Hi

I have 2 problems:

1) It clicks on all windows with 2 buttons

Is there a way to be more focus on the actual window that I want.

It is a SAVE AS window of a program. Which part of it is Unique to that program?

2) Can I make it ACTIVATE the window into the foreground first as I find that the program sometimes hangs and does not click when the window is in the background. Not too sure why

Posted

Just a few questions:

when you use Window Info on your program window, the classname is "32770" ? Could you post a screenshot of the window and the info out of the window-info tool?

The AutoItSetOption("WinTitleMatchMode", 4) should not be in the While - whend loop since it only needs to be set once.

There is an WinActivate ( "title" [, "text"] ) command. Have a look at the helpfile for that.

Thanks, E.

Posted

#NoTrayIcon

Sleep(15000)

while 1

AutoItSetOption("WinTitleMatchMode", 4)

WinWait( "classname=#32770", "", 5 )

ControlFocus ( "classname=#32770","" , "Button2" )

ControlClick ( "classname=#32770", "" , "Button2","left" )

wend

Hi

I have 2 problems:

1) It clicks on all windows with 2 buttons

Is there a way to be more focus on the actual window that I want.

It is a SAVE AS window of a program. Which part of it is Unique to that program?

2) Can I make it ACTIVATE the window into the foreground first as I find that the program sometimes hangs and does not click when the window is in the background. Not too sure why

See;

WinSetOnTop ( "title", "text", flag )

WinActivate ( "title" [, "text"] )

and even If WinActive ( "title" [, "text"] ) Then.................

Also I would consider changing

AutoItSetOption("WinTitleMatchMode", 4)

to

AutoItSetOption("WinTitleMatchMode", 2) or AutoItSetOption("WinTitleMatchMode", 4) or maybe even AutoItSetOption("WinTitleMatchMode", 3) if it becomes critical,

and then make sure that the title matches

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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
×
×
  • Create New...