Oliberto Posted October 19, 2007 Share Posted October 19, 2007 Hi all, I just started using AutoIt and wonder if it is possible to send a command line message to an already active autoit exe. Regards; --Al Link to comment Share on other sites More sharing options...
herewasplato Posted October 19, 2007 Share Posted October 19, 2007 AutoItWinSetTitleRemarksThe AutoIt window is usually hidden. The purpose of changing the title is to allow other programs (or other AutoIt scripts) to interact with AutoIt. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Oliberto Posted October 19, 2007 Author Share Posted October 19, 2007 AutoItWinSetTitle Thanks herewasplato. Understood, but what I'm after is a way to send an autoit executable a message (say 1 or 0) while it is already running not from AutoIt or other Window's macro/scripting applications but from a dos command line. I notice I can launch a script with parameters -- $CmdLine[1] equals... param1 etc. but can I do this with an already running exe (note that AutoIt will not be installed on the machine running these scripts). In other words can the exe "loop and listen" for incomming command line messages The AutoIt window is usually hidden. The purpose of changing the title is to allow other programs (or other AutoIt scripts) to interact with AutoIt. Link to comment Share on other sites More sharing options...
herewasplato Posted October 19, 2007 Share Posted October 19, 2007 If you are saying that you want to start your AutoIt script manually start a console app have your AutoIt script receive inputs from the console app ...then I'm not sure what to suggest you try within your AutoIt script. You might look at some of the example scripts - search for console in the titles. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Oliberto Posted October 19, 2007 Author Share Posted October 19, 2007 What you mention below is the mechanism I'm looking forIf you are saying that you want tostart your AutoIt scriptmanually start a console apphave your AutoIt script receive inputs from the console app...then I'm not sure what to suggest you try within your AutoIt script.You might look at some of the example scripts - search for console in the titles. Link to comment Share on other sites More sharing options...
martin Posted October 19, 2007 Share Posted October 19, 2007 What you mention below is the mechanism I'm looking forYou could use ControlSend or messages, but for a simple method ControlSend is easier.When someone starts the script, which could be from the command prompt, then it checks to see if there is another instance already running. If there is then it sends the parameters to the first instance of the script then closes. 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. Link to comment Share on other sites More sharing options...
Oliberto Posted October 19, 2007 Author Share Posted October 19, 2007 Cool, thanks martin -- thats what I call thinking outside the box. I think that will do just fine for what I need. I also just found the $var = EnvGet("System_Var") thing -- don't know if its usable for what I need but will research it if for nothing more than curiosity.Thanks again.Regards;--AlYou could use ControlSend or messages, but for a simple method ControlSend is easier.When someone starts the script, which could be from the command prompt, then it checks to see if there is another instance already running. If there is then it sends the parameters to the first instance of the script then closes. 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