Sign in to follow this  
Followers 0
kwarizmi

AutoIt eguivalent of Java's out.print?

4 posts in this topic

I am trying to use AutoIt to automate a console program (MPlayer). In Java, commands are sent to the program (MPlayer) using out.print. Does anyone know how to do the equivalent using AutoIt.

Cheers!

Share this post


Link to post
Share on other sites



I am trying to use AutoIt to automate a console program (MPlayer). In Java, commands are sent to the program (MPlayer) using out.print. Does anyone know how to do the equivalent using AutoIt.

Cheers!

Try Send.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Try Send.

Using Send is an option, but it has undesirable results in that (as far as i can tell) I need to make the mplayer window active before using Send and then make the previously active window active again. This is a problem in that if i happen to be typing in another program at the time the Send command is executed, i sometimes get the keystrokes in the wrong window. I have looked at several threads here in the forum and concluded that there is no way to use send with an unactive window. In other threads ControlSend was suggested, but for me it only works if the mplayer window is active.

Mplayer has a slave mode where commands can be sent to it with stdin. So I tried launching mplayer with the $STDIN_CHILD flag and then sending commands to it with StdinWrite. This also does not work as in Windows the stdin does not work with mplayer, but in Java (in Windows), the solution is to use out.print (commands are sent to mplayer without it needing to be the active window).

With the $STDIN_CHILD flag set, Send also stops working with mplayer.

Any ideas?

Cheers!

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