Daunra31 Posted December 10, 2009 Posted December 10, 2009 Hi ! I want to pass a string from an AutoIt script to another AutoIt Script. So I use in the first script the function "ShellExecuteWait" to pass arguments (strings) and I recover them with $CmdLine[]. Until there, no problem. Then, I want the second script to pass back another string to the first script. Here I have a problem : I thought I could use the "Exit" function with a parameter (something like : Exit($MyString)) but this only works for integers ! So, does anyone can help me please ? Thanks (If I am not clear enough, don't hesitate to tell me, I will post the scripts examples)
funkey Posted December 10, 2009 Posted December 10, 2009 You could write the information to a file and then delete it when you found and read the file with the first script. Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning.
Daunra31 Posted December 10, 2009 Author Posted December 10, 2009 On 12/10/2009 at 4:55 PM, 'funkey said: You could write the information to a file and then delete it when you found and read the file with the first script.Yes, I though to do that, but it's not very practical :In fact, I want the second executable to be like a kind of function for several other autoit executable. But I don't want to create an UDF file to include to each prog because I will change this "UDF" sometimes. And so I don't want to have to recompile each executable each time I will modify the "UDF"... (hope again i am clear...)
martin Posted December 10, 2009 Posted December 10, 2009 This thread might help. 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.
kaotkbliss Posted December 10, 2009 Posted December 10, 2009 what about trying clipput and clipget to pass the information back and forth between the clipboard? no physical file to read or delete. 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
Yashied Posted December 10, 2009 Posted December 10, 2009 http://www.autoitscript.com/forum/index.php?showtopic=91346 My UDFs: Reveal hidden contents iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More...
Daunra31 Posted December 11, 2009 Author Posted December 11, 2009 On 12/10/2009 at 5:12 PM, 'martin said: This thread might help.Thank you Martin but I don't see how this could help me... On 12/10/2009 at 5:35 PM, 'kaotkbliss said: what about trying clipput and clipget to pass the information back and forth between the clipboard? no physical file to read or delete.Sorry Kaotkbliss I don't know how you "clipput and clipget", and even if I have an idea of what you mean, it doesn't seem to be the good way to do : my scripts will have to communicate a lot between them so I can't imagine a screen with some kind of clipboards appearing and disappearing (like some flashes!) On 12/10/2009 at 5:46 PM, 'Yashied said: http://www.autoitscript.com/forum/index.php?showtopic=91346Your library seems to be the solution Yashied, thanks ! But, as I am not an expert, I have difficulties to visualise very clearly how I have to code this in my scripts... Don't you have little examples of scipt 1 and script 2 talking each other ?So meanwhile, I am trying to use the MessageHandler.au3 library that you worked on to create yours (http://www.autoitscript.com/forum/index.php?showtopic=77979)
cramaboule Posted December 11, 2009 Posted December 11, 2009 What about using tcp/ip (127.0.0.1:port) ??? Cram. My Autoit programs: MAC Address - - Delete Temp Files - - Ping Test - - Play Video with VLC full screen dual monitors - - Set IP - - Pics Converter - - AutoUpdater - - CPU Usage - - Ending Script Nicely - - GDI+ GUI crossfades (slide transitions) - - Beamer - - Search and Search in Files - - Silent Ninite Others: Export Icons into Dll - - My website
kaotkbliss Posted December 11, 2009 Posted December 11, 2009 (edited) On 12/11/2009 at 10:19 AM, 'Daunra31 said: Sorry Kaotkbliss I don't know how you "clipput and clipget", and even if I have an idea of what you mean, it doesn't seem to be the good way to do : my scripts will have to communicate a lot between them so I can't imagine a screen with some kind of clipboards appearing and disappearing (like some flashes!)Basically something likeScript 1$variable="something"clipput($variable)script 2$variable=clipget()there are no extra windows opening or flashingit all happens behind the scenes. Edited December 11, 2009 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
kaotkbliss Posted December 11, 2009 Posted December 11, 2009 another option for passing information back and forth, especially if you have multiple variables that you need to send iniread and iniwrite again, another alternative that has no additional windows opening although it does create a very small .ini file one script would $var1="something" $var2="somethingelse" IniWrite("C:\name.ini","variable",1,$var1) IniWrite("C:\name.ini","variable",2,$var2) and name.ini is created inside you would see [variable] 1=something 2=somethingelse the other script would then use $newvar1=IniRead("C:\name.ini","variable",1,"") $newvar2=IniRead("C:\name.ini","variable",2,"") $newvar1 would = "something" and $newvar2 would = "somethingelse" 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy!
Jfish Posted December 11, 2009 Posted December 11, 2009 On 12/11/2009 at 5:58 PM, 'weaponx said: Communication between scriptsHere is another suggestion: #635972 Build your own poker game with AutoIt: pokerlogic.au3 | Learn To Program Using FREE Tools with AutoIt
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