vigorman Posted November 4, 2007 Share Posted November 4, 2007 One compiled script send variables to another compiled script. I only think a way through clibboard. Are there other way? Thanks. Link to comment Share on other sites More sharing options...
tAKTelapis Posted November 4, 2007 Share Posted November 4, 2007 TCP Send and Receive.. Just use the local host IP (127.0.0.1) Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 5, 2007 Share Posted November 5, 2007 TCP Send and Receive.. Just use the local host IP (127.0.0.1)There is also writing to the other script's GUI (perhaps a hidden control), through the registry, through and intermediate file, and WM_COPYDATA (numeric data only). 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...
Jex Posted November 5, 2007 Share Posted November 5, 2007 (edited) Maybe that will work ? ( I'm not tested ) #include <File.au3> While 1 $Receive = Receive() If GUIGetMsg() = $Send Then Send($Var) WEnd Func Receive() If FileExists("Receive/Test.ini") Then $Read = IniRead("Receive/Test.ini", "Test", "", "") If StringInStr($Read, "Var") Then $Read2 = StringSplit($Read, "|") FileDelete("Receive/Test.ini") Return $Read2[2] EndIf FileDelete("Receive/Test.ini") EndIf EndFunc Func Send($Var) FileDelete("Send/Test.ini") IniWrite("Send/Test.ini", "Test", "", "Var|" & $Var) EndFunc Edited November 5, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 5, 2007 Share Posted November 5, 2007 Maybe that will work ? ( I'm not tested ) Func Send($Var) FileDelete("Send/Test.ini") IniWrite("Send/Test.ini", "Test", "", "Var|" & $Var) EndFunc Send() is an AutoIt native function, so you can't declare another one with the same name. Call it _Send() if you must use that name. An .ini file might be a good choice to use a file for interaction, if there are not too many messages and they don't come at too high a frequency. The receiving script could just monitor the modified time attribute of the file to know when there was new data, and ini structure allows organizing the messages some. 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...
A. Percy Posted November 5, 2007 Share Posted November 5, 2007 StdinWrite and StdoutRead works fine for me Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center]VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
MrCreatoR Posted November 5, 2007 Share Posted November 5, 2007 StdinWrite and StdoutRead works fine for meCan you show working example please? Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
martin Posted November 5, 2007 Share Posted November 5, 2007 One compiled script send variables to another compiled script.I only think a way through clibboard. Are there other way?Thanks.Here's another way.PsaltyDS said "WM_COPYDATA (numeric data only)." Although it's true that messages only send numbers they can be used to send any data because the number can be the memory location of a string or an array which the receiver of the message can then read.ControlSend is another simple way to send data to another program which I don't think anyone has mentioned in this thread. Klaatu's debugger is a good example of using this. 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...
A. Percy Posted November 6, 2007 Share Posted November 6, 2007 Can you show working example please? #include <Constants.au3> $foo = Run( @ScriptDir & "\Another.exe", @ScriptDir, @SW_SHOW, $STDOUT_CHILD + $STDIN_CHILD ) Sleep( 2000 ) StdinWrite( $foo, "Where is the cat?" ) $Data = "" While 1 $Bytes = StdoutRead( $foo, '' ,true ) if $Bytes > 0 then ; leia o numero de bytes da stream $Data = StdoutRead( $foo, $Bytes ) If StringLen( $Data ) Then ExitLoop EndIf EndIf Wend MsgBox( 0, "Return", $Data ) Compile the next script as "Another.exe" #include <Constants.au3> $Input = "" While 1 Sleep( 100 ) $Bytes = ConsoleRead( "", true ) If $Bytes > 0 Then $Input = ConsoleRead( $Bytes ) ExitLoop EndIf WEnd If $Input = "Where is the cat?" Then ConsoleWrite( "What cat?" ) EndIf Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center]VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral Link to comment Share on other sites More sharing options...
MrCreatoR Posted November 6, 2007 Share Posted November 6, 2007 A. PercyThanks for the example, but in this case it required calling of a child process, not so practic in some cases . Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team 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