Jump to content

click on button when page is not maximised?


Recommended Posts

In my code I have the line that does a mouse click over a button. As shown below. This works fine if the page is maximised from the previous use.

However if the page has not been set to its maximum size from its previous use then the button is in a different place. How can I allow for the fact that the page not be set to it maximum size?

mouseclick("left",174,334)

thanks

Russ

Link to comment
Share on other sites

Now, when you say "page" do you mean a webpage? ifso, you can use various functions in IE.au3 to help you, specifically _IEAction() and a few others, however if its not, then I can't help you, I know nothing in that area elsewise

[center]"When you look at old, classic games like Snake, you often put it off because it's such a simple game, but it's only when you actually try and create your own unique game from scratch, do you finally appreciate those games."[/center][center]Don't ask for answers if you haven't TRIED yet![/center][center]Most answers can be answered in the help file! Use it![/center]

Link to comment
Share on other sites

Now, when you say "page" do you mean a webpage? ifso, you can use various functions in IE.au3 to help you, specifically _IEAction() and a few others, however if its not, then I can't help you, I know nothing in that area elsewise

No. its not a not a web page. It's the page that opens after the lotus notes password is typed in. The "page" is called the "welcome page options".

It has five selection buttons on it.

Link to comment
Share on other sites

No. its not a not a web page. It's the page that opens after the lotus notes password is typed in. The "page" is called the "welcome page options".

It has five selection buttons on it.

i would try to get the controlid of the button then use controlclick() helpfile is your friend

edit forgot to mention that to get the controlid goto your autoit3 folder and look for au3info.exe use that...

Edited by EagleClaw

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

I have had a look at the help file - but I can't make it work

I have a the line:

ControlClick("Welcome - Lotus Notes", "" , "left" , "1")????

From the active window info:

Title: Welcome - Lotus Notes

Class: NOTES

Size: X: 94 Y: 56 W: 1025 H: 847

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

Screen: X: 114 Y: 208

Cursor ID: 0

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

RGB: Hex: 0xFFFFC2 Dec: 16777154

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

Size: X: 5 Y: 102 W: 16 H: 16

Control ID: 1

ClassNameNN: IRIS.bmpbutton20

Text: Pin/unpin bookmarks

Style: 0x50030000

ExStyle: 0x00000000

Link to comment
Share on other sites

I have had a look at the help file - but I can't make it work

I have a the line:

ControlClick("Welcome - Lotus Notes", "" , "left" , "1")????

From the active window info:

Title: Welcome - Lotus Notes

Class: NOTES

Size: X: 94 Y: 56 W: 1025 H: 847

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

Screen: X: 114 Y: 208

Cursor ID: 0

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

RGB: Hex: 0xFFFFC2 Dec: 16777154

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

Size: X: 5 Y: 102 W: 16 H: 16

Control ID: 1

ClassNameNN: IRIS.bmpbutton20

Text: Pin/unpin bookmarks

Style: 0x50030000

ExStyle: 0x00000000

im assuming its in the window title part theres always little capital letters that i miss so check that first if not im not really sure

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

Get controlID of that button from Autoit Window Info (by activating Control or Summary tab and then dragging the Finder Tool onto that button, while at it taking note of Window title too).

Then do a

ControlClick("title", "", controlID, "left")

as documented in the helpfile. It's easier than it looks :whistle:

Edited by Siao

"be smart, drink your wine"

Link to comment
Share on other sites

Get controlID of that button from Autoit Window Info (by activating Control or Summary tab and then dragging the Finder Tool onto that button, while at it taking note of Window title too).

Then do a

ControlClick("title", "", controlID, "left")

as documented in the helpfile. It's easier than it looks :whistle:

I am not sure why you are saying I have to activate control or summary tab?. I thought this was the same as "active window Info" which I already posted. I have already looked in the help file, but it isn't obvious to me. I am new to this kind of programming.

You will see in my active window paste I have:

'Tiltle' as: Welcome - Lotus Notes

controlID as 1

so why doesn't

the line

ControlClick("Welcome - Lotus Notes", "", 1, "left")

work?

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...