Jump to content

Moving the mouse, and some other newbie concerns


Recommended Posts

Hi, newbie to the product. W10, the script editor is the Scite 4.x.

I've noticed a couple of peculiarities. hoping someone here might shed some light.  I'm not beyond thinking the software that the script is manipulating could be the problem (Hitachi Pentaho Report Designer)

1)  AIT help says I can:

Send("{RIGHT 5}")  ; THIS IS ACCEPTED syntax, but doesn't work (in PRD?)

ok, so I code five Send("Right")s

 

...
Send("{DOWN}")  ; COUNTER INTUITIVE, but this moves over.  AND ASSUMes the desired is listed first
Send("{Enter}")
; its open, active is the create new empty report option
; Send("{RIGHT 5}")  THIS IS ACCEPTED syntax, but doesn't work (in PRD?)
Send("{RIGHT}")
Sleep(500)
Send("{RIGHT}")
Sleep(500)
Send("{RIGHT}")
Sleep(500)
Send("{RIGHT}")
Sleep(500)
Send("{RIGHT}")  ; move 5 right to the run option
Sleep(500)
Send("{Enter}")  ; kick it off

what's happening is: I've opened a "Recent files" option from the Alt-F(ile) menu ribbon option.  Then I want to move the focus to a "Run" glyph and "Enter". I'd insert an image but don't see an option.  The glyph menu is  tiny icons, rather than, say, a traditional text menu ribbon.

As I said PRD is a somewhat primitively implemented package (it doesn't use a heck of a lot of COM in its dialogs) . So, I suspect there's going to be other _different_ , basic, functions that work, but not in all the assumed ways.

I couldn't get the serial Send()s to work without the Sleep()s  inbetween.          PRDRibbon.jpg.25b529d56804290ab9b1ee27a1a8f11a.jpg

Now I'm ready kick off the report. Send Enter or Down does nothing. which makes me think about the user-experience again:  those tiny glyphs only respond to mice. (If I personally press enter nothing happens either).

So, now I'm into AutoIT mouseworld. 

Window sizes/dimensions can be fluid.  A clickable location isn't necessarily always in the same place.   How does one _know_ the coordinates to which one wishes to apply a click?  Even if a window is certain to be fixed, how do you ascertain the coordinates of the desired click-spot?

thanks.

 

 

 

 

 

Link to comment
Share on other sites

Send 5 times does work, but is probably done to fast for the receiving program. There is a setting for that delay between keypresses.  You can use a for loop to send the key 5 times.

To get the coordinates for mouse you can use the Au3info.exe tool. See the manual for details. If the program you are using allows this run the program maximized, that will make it easier to program the mouse clicks.

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...