Re: How to send commands (2017-10-12 11:53, handmusician, #80339)
[Répondre à un message #79919]
> [Répondre à un message #79918]
> > I'm already using AutoIt for others aspects of the application.
> > But i never used this type of commands (controlsend) juste simulating keyboard entry.
> > I'll have to work in this direction.
> > To be sure, is it possible in the ^r command to specifiy the path and the name of the midi file ?
> > controlsend("[CLASS:Sekaiju4.9]","","ToolbarWindow322","^r")
> In fact my question about the name of the file is of course for commands ^o and ^s
> Where could read documentation about these commands. I looked in the user guide but no success
^o, ^s are keystrokes control+o, control+s sent to sekaiju window (in File menu you can see these shortcuts). You can look "Send" in the user guide for keystrokes, Send is used for sending only to the active window, while controlsend is for a specified control of a specified window not only the active one.
So the command ^o just say to Sekaiju to launch the window "Open" while ^s launch "Save As" if it's a new file and resave if it's an already opened or saved file.
To do what you want you can add winwait then controlsend again and to finish controlclick :
controlsend("Open","","[CLASS:Edit; INSTANCE:1]","the full path to the file")
controlsend("Save As","","[CLASS:Edit; INSTANCE:1]","the full path to the new file")
controlclick("Save As","","[CLASS:Button; INSTANCE:2]")