abc123 Posted April 13, 2007 Share Posted April 13, 2007 How can i use the argument received from another *.exe in a MsgBox? Can anyone please help me! Link to comment Share on other sites More sharing options...
Developers Jos Posted April 13, 2007 Developers Share Posted April 13, 2007 How can i use the argument received from another *.exe in a MsgBox? Can anyone please help me!$CMDLINE[] ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
abc123 Posted April 13, 2007 Author Share Posted April 13, 2007 Can you give me an example script please?! THANKS Link to comment Share on other sites More sharing options...
Developers Jos Posted April 13, 2007 Developers Share Posted April 13, 2007 Can you give me an example script please?! THANKS There are examples enough in helpfile and forum .....Just search for some SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
abc123 Posted April 13, 2007 Author Share Posted April 13, 2007 I can't find any, they are much different than what i am looking for. Can you please quickly give me an example or anyone?! Link to comment Share on other sites More sharing options...
abc123 Posted April 13, 2007 Author Share Posted April 13, 2007 I want to send a string of text to a .exe created with AutoIt and i want to display the string of text in a MsgBox Link to comment Share on other sites More sharing options...
SpookMeister Posted April 13, 2007 Share Posted April 13, 2007 Look at the Command Line Parameters section of the Running Scripts part of the help file.Here is the on-line versionhttp://www.autoitscript.com/autoit3/docs/intro/running.htm [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
SleepyXtreme Posted April 14, 2007 Share Posted April 14, 2007 What i have done in the past is use the iniwrite function then the ini read function. so the first .exe writes it and the second .exe reads it. ie the following: FIRST .EXE IniWrite("C:\Temp\myfile.ini", "section2", "key", "MESSAGE!!!!!") SECOND .EXE $var = IniRead("C:\Temp\myfile.ini", "section2", "key", "NotFound") MsgBox(4096, "Result", $var) Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 14, 2007 Share Posted April 14, 2007 Both programs need to access something in common. Some examples you can find easily by searching this forum:1. Shared file (like INI file mentioned earlier)2. Shared registry setting3. Shared memory access (complicated and advanced, but doable)4. Shared network port (TCP or UDP)5. Shared GUI infoI recently posted an example of number 5, Shared GUI info, to the Example Scripts part of the forum: Using GUI Controls for interprocess comms Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
SadBunny Posted April 14, 2007 Share Posted April 14, 2007 Well what exactly do you mean by "the argument received from another *.exe" anyway? You mean the other exe has some text somewhere you want to capture? Is the other exe also an autoitscript written by you? If you want it to be something like this: 1. used command: "myexe.exe abcde" --> 2. display a msgbox with "abcde" in it ... then you use the CmdLine[]. Compile the following to an exe and run it with the abovementioned command msgbox(0,"test",$CmdLine[1]) If you mean to do something else then please give some more info about what the first and the second exe are and do, that would make it easier to give you suggestions. Roses are FF0000, violets are 0000FF... All my base are belong to you. Link to comment Share on other sites More sharing options...
abc123 Posted April 14, 2007 Author Share Posted April 14, 2007 Well what exactly do you mean by "the argument received from another *.exe" anyway? You mean the other exe has some text somewhere you want to capture? Is the other exe also an autoitscript written by you? If you want it to be something like this: 1. used command: "myexe.exe abcde" --> 2. display a msgbox with "abcde" in it ... then you use the CmdLine[]. Compile the following to an exe and run it with the abovementioned command msgbox(0,"test",$CmdLine[1]) If you mean to do something else then please give some more info about what the first and the second exe are and do, that would make it easier to give you suggestions.I have an .exe that does the following the following function: File.Run ( string Filename, string Args = "", string WorkingFolder = "", number WindowMode = SW_SHOWNORMAL, boolean WaitForReturn = false ) result = File.Run("MyProg.exe", "Hello", "", SW_SHOWNORMAL, false); The MyProg.exe is created with autoit. I want the autoit to display the "Hello" in a MsgBox, is that possible if it is can i send multiple e.g. "Hello/Bye" Link to comment Share on other sites More sharing options...
Kip Posted April 14, 2007 Share Posted April 14, 2007 (edited) Did you mean this? Run Second.exe(very little example) Edited April 14, 2007 by kip MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
abc123 Posted April 14, 2007 Author Share Posted April 14, 2007 Its ok, i figured it out. 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