grinch Posted July 14, 2022 Share Posted July 14, 2022 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. 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 More sharing options...
OJBakker Posted July 15, 2022 Share Posted July 15, 2022 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 More sharing options...
grinch Posted July 20, 2022 Author Share Posted July 20, 2022 Big help there OJBakker, thank you. Link to comment Share on other sites More sharing options...
Luke94 Posted July 20, 2022 Share Posted July 20, 2022 You can alter the delay between keystrokes using: AutoItSetOption('SendKeyDelay', #) ; # been the delay in milliseconds The default delay is 5 ms. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now