Jump to content
Sign in to follow this  

Mouseclick from Array

Recommended Posts

I have a small program for automated document coding and I'm now trying to clean up the code. If possible, I want the mouseclicks used mapped to arrays, but I can't seem to figure out how to properly format what I'm trying to do.

The mouseclicks are in static spots. For instance, say I want to click into the "Company" field at coordinates 111,111. I want to create an array called $Company and pass the coordinates from the array, so in the code, it's clear what's happening.

I tried writing it out as a global variable, but it keeps telling me "Missing subscript dimensions in DIM statement." However, I'm not using a DIM Statement. How would I properly format this?

I was trying:

Global $Company[1][1] = (111,111)

Mouseclick (left,$Company[1][0],$Company[0][1])

Which I'm sure is laughably wrong.

Edited by Sinaptics

Share this post

Link to post
Share on other sites

Is this a gui application, or internet browser? There are much better ways to click on objects in both.

to just answer your question, you would need this for one click:

Global $Company[2] = [111,111]
Mouseclick ("primary",$Company[0],$Company[1])

for multiple clicks (this example is 3, but may be expanded)

Global $Company[3][2] = [[111,111],[101,101],[11,11]]
For $i = 0 To UBound($Company)-1
 Mouseclick ("primary",$Company[$i][0],$Company[$i][1])
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...