JohnMC Posted February 5, 2009 Posted February 5, 2009 What would be the simplest most reliable method to communicate between scripts running seperatly (no parent/child relationship) on the same pc. ive looked into console write use with std, but i dont get how it would work in this instance... thanks! https://johnscs.com
sandin Posted February 5, 2009 Posted February 5, 2009 consolewrite and consoleread would be the best way I think... Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
avery Posted February 5, 2009 Posted February 5, 2009 What would be the simplest most reliable method to communicate between scripts running seperatly (no parent/child relationship) on the same pc. ive looked into console write use with std, but i dont get how it would work in this instance... thanks!I've tested script like this using two methods. One was client/server relationship using tcp and another was sharing an ini file to pass information back and forth. There was probably a better way as I made fake lock files and stuff to try to keep it all sane. Good luck and I'm interested to see what others post on this topic as well.avery www.abox.orgAvery HowellVisit My AutoIt Websitehttp://www.abox.org
Marlo Posted February 5, 2009 Posted February 5, 2009 Use the UDP functions? Click here for the best AutoIt help possible.Currently Working on: Autoit RAT
AdmiralAlkex Posted February 6, 2009 Posted February 6, 2009 I like CoProc .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
sandin Posted February 6, 2009 Posted February 6, 2009 (edited) Ok, here's an example. Compile receive script, but don't execute it, when you compile it, go to the other script (send script), and run it (you may run it from scite or compile and then run it). Important note: Both scripts must be in the same folder.... Also important: if you change compile name of the receive script you must change it's name in the send script as well RECEIVE SCRIPT: expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=ReceiveScript.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiEdit.au3> $Form1 = GUICreate("Receive commands script", 300, 400) $Edit1 = GUICtrlCreateEdit("", 0, 0, 300, 380) $Button1 = GUICtrlCreateButton("Clear all", 0, 380, 150, 20) $Button2 = GUICtrlCreateButton("Exit", 150, 380, 150, 20) GUISetState(@SW_SHOW) if NOT @Compiled Then MsgBox(0, "Compile please", "Compile this script, and then run the SEND script") Exit EndIf Global $Recieve_Data While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Button2 Exit Case $Button1 GUICtrlSetData($Edit1, "") EndSwitch $Recieve_Data = ConsoleRead() if @error Then MsgBox(0, "Error", "Error occured, script will exit now") ExitLoop EndIf if $Recieve_Data <> "" Then if GUICtrlRead($Edit1) = "" Then GUICtrlSetData($Edit1, $Recieve_Data) Else _GUICtrlEdit_AppendText($Edit1, @CRLF & $Recieve_Data) EndIf if $Recieve_Data = "$$$EXIT_SCRIPT$$$" Then MsgBox(0, "Command", "Script has received command to shutdown, bye bye") Exit EndIf EndIf Sleep(10) WEndoÝ÷ Ù! ôÚºÚ"µÍÚ[ÛYH Ð]ÛÛÛÝ[Ë]LÉÝÂÚ[ÛYH ÑY]ÛÛÝ[Ë]LÉÝÂÚ[ÛYH ÑÕRPÛÛÝ[Ñ^]LÉÝÂÚ[ÛYH ÕÚ[ÝÜÐÛÛÝ[Ë]LÉÝÂÚ[ÛYH ÐÛÛÝ[Ë]LÉÝÂÌÍÜXÚY]WÜØÜÛ[YHH ][ÝÔXÙZ]TØÜ^I][ÝÂÌÍÑÜLHHÕRPÜX]J ][ÝÔÙ[ÛÛ[X[ÈØÜ ][ÝËÌ BÌÍÒ[]HHÕRPÝÜX]R[] ][ÝÉ][ÝËÌ BÌÍÐ]ÛHHÕRPÝÜX]P]Û ][ÝÔÙ[]I][ÝËML BÌÍÐ]ÛHÕRPÝÜX]P]Û ][ÝÑ^] ][ÝËMLML BÌÍÐÛÛ[][XØ][ÛÜØÜH[ØÜ [È ][ÝÉÌLÉ][ÝÈ [È ÌÍÜXÚY]WÜØÜÛ[YKØÜÕ×ÔÒÕË ÌÍÔÕSÐÒS È ÌÍÔÕÕUÐÒS BÚ[ØZ] ][ÝÔXÙZ]HÛÛ[X[ÈØÜ ][ÝÊBÕRTÙ]Ý]JÕ×ÔÒÕÊBÚ[HBIÌÍÛÙÈHÕRQÙ]ÙÊ BTÝÚ]Ú ÌÍÛÙÂBPØÙH ÌÍÑÕRWÑUSÐÓÔÑK ÌÍÐ]ÛBBTÝ[Ü]J ÌÍÐÛÛ[][XØ][ÛÜØÜ ][ÝÉÌÍÉÌÍÉÌÍÑVUÔÐÔT ÌÍÉÌÍÉÌÍÉ][ÝÊBBBQ^]BPØÙH ÌÍÐ]ÛBBBTÝ[Ü]J ÌÍÐÛÛ[][XØ][ÛÜØÜÕRPÝXY ÌÍÒ[]JJBQ[ÝÚ]ÚÑ[ Edited February 6, 2009 by sandin Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
rogdog Posted February 6, 2009 Posted February 6, 2009 Hi sandin, Thanks for posting your example above. Exactly what I was after for one of my applications I am writing. My Scripts[topic="73325"]_ReverseDNS()[/topic]Favourite scripts by other members[topic="81687"]SNMP udf[/topic][topic="70759"]Using SNMP - MIB protocol[/topic][topic="39050"]_SplitMon:Section off your monitor!, split your monitor into sections for easy management[/topic][topic="73425"]ZIP.au3 UDF in pure AutoIt[/topic][topic="10534"]WMI ScriptOMatic tool for AutoIt[/topic][topic="51103"]Resources UDF embed/use any data/files into/from AutoIt compiled EXE files[/topic]
sandin Posted February 6, 2009 Posted February 6, 2009 Hi sandin,Thanks for posting your example above. Exactly what I was after for one of my applications I am writing.you're welcome Some cool glass and image menu | WinLIRC remote controler | Happy Holidays to all... | Bounce the sun, a game in which you must save the sun from falling by bouncing it back into the sky | Hook Leadtek WinFast TV Card Remote Control Msges | GDI+ sliding toolbar | MIDI Keyboard (early alpha stage, with lots of bugs to fix) | Alt+Tab replacement | CPU Benchmark with pretty GUI | Ini Editor - Edit/Create your ini files with great ease | Window Manager (take total control of your windows) Pretty GUI! | Pop-Up window from a button | Box slider for toolbar | Display sound volume on desktop | Switch hotkeys with mouse scroll
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