Sign in to follow this  
Followers 0
RonnieK

Controlclick vs mouseclick

4 posts in this topic

Hi,

new to autoit, love the ability to automate tasks.

here is the issue:

I have an excel spreadsheet that copies / pastes data into an application

then deletes the row and repeats the process.

I can use mouse click fine IF the screen resolution doesn't change or the mouse doesn't move.

If either are changed the script runs off.

Is it possible to use control click to specify specific coordinates in excel (regardless of mouse location or screen resolution)?

for example right click and delete a row

here is what i'm writing:

ControlClick ("Microsoft Excel - Allocated Spending Plan [Compatibility Mode]"),"","","left",19,14,1")

this should click the edit class instance 2 to select the row

then eventually a right click select ("D") to delete it.

here is the autoit window info

>>>> Window <<<<

Title: Microsoft Excel - Allocated Spending Plan [Compatibility Mode]

Class: XLMAIN

Position: -12, -12

Size: 1944, 1064

Style: 0x15CF0000

ExStyle: 0x00000110

Handle: 0x0000000000140384

>>>> Control <<<<

Class: NetUIHWND

Instance: 2

ClassnameNN: NetUIHWND2

Name:

Advanced (Class): [CLASS:NetUIHWND; INSTANCE:2]

ID:

Text:

Position: 0, 238

Size: 1920, 56

ControlClick Coords: 19, 14

Style: 0x56000000

ExStyle: 0x00000000

Handle: 0x00000000000204E0

>>>> Mouse <<<<

Position: 19, 240

Cursor ID: 0

Color: 0xF9ECA6

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<

Status Bar

Status Bar

Ribbon

Ribbon

Calibri

11

General

Allocated Spending Plan [Compatibility Mode]

Vertical

Horizontal

>>>> Hidden Text <<<<

Vertical

MsoWorkPane

post-67123-0-27977400-1315064343_thumb.j

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Is it possible to use control click to specify specific coordinates

Mouseclick clicks on coordinates, ControlClick clicks on controls, like buttons and whatnot. Edited by somdcomputerguy

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Look at excel.au3. It is built into AutoIt. You can find the information for it in the helpfile

Mouseclick clicks on coordinates, ControlClick clicks on controls, like buttons and whatnot.

Thank both of you very much. As awesome as Autoit is, it can be a little overwhelming.

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