JScript Posted April 15, 2011 Share Posted April 15, 2011 (edited) Hello folks,You can remotely execute a function in another script, spending almost all kinds of variables including arrays (1D only) and receive the results of function calls.Current functions:; #CURRENT# ===================================================================================================================== ; _IPC_Startup ; _IPC_Shutdown ; _IPC_IsStarted ; _IPC_CallRemote ; ===============================================================================================================================Example:Compile and run this first...#AutoIt3Wrapper_Compression=0 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=n ;(Y/N) Compress output program. Default=Y #Include <Array.au3> #Include "InterProcess.au3" _IPC_Startup() While 1 Sleep(100) WEndThen run it and see the result...#AutoIt3Wrapper_Compression=0 ;Compression parameter 0-4 0=Low 2=normal 4=High. Default=2 #AutoIt3Wrapper_UseUpx=n ;(Y/N) Compress output program. Default=Y #Include <Array.au3> #Include "InterProcess.au3" Global $aNewArray Dim $aArray[10] = [1, 2, 3, 4, 5, 1, 2, 3, 4, 5] _ArrayDisplay($aArray, "$aArray") If _IPC_IsStarted("script2.exe") Then $aNewArray = _IPC_CallRemote("script2.exe", 5000, "_ArrayUnique", $aArray, 1, 0, 1, "-") _ArrayDisplay($aNewArray, "$aNewArray represents the 1st Dimension of $aArray")Make tests and post comments...Updated code!Here's a link to the source code:InterProcess.zip- This UDF uses MailSlot by @trancexx.Again, my thanks to @trancexx for the excellent work with Mailslots... Edited April 15, 2011 by jscript oapjr 1 http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
MrCreatoR Posted April 15, 2011 Share Posted April 15, 2011 Make tests and post comments...Well, the example is not working, so i can't really test it, i don't really understand the concept behind this.P.S: And the syntax check shows a lot of errors/warnings. 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...
JScript Posted April 15, 2011 Author Share Posted April 15, 2011 Well, the example is not working, so i can't really test it, i don't really understand the concept behind this.P.S: And the syntax check shows a lot of errors/warnings.Updated, see the first post... http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
JohnOne Posted April 15, 2011 Share Posted April 15, 2011 Can it call Native functions? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
jvanegmond Posted April 15, 2011 Share Posted April 15, 2011 (edited) Can it call Native functions? ; Calls the function passing parameters. $aParams[0] = "CallArgArray" $vReturn = Call($aData[2], $aParams) Then no. But this: Edited April 19, 2011 by Manadar github.com/jvanegmond Link to comment Share on other sites More sharing options...
JScript Posted April 15, 2011 Author Share Posted April 15, 2011 (edited) Can it call Native functions?It makes no sense to run native functions that way! Since your script is interpreted with an executable that contains all the native functions...This was designed to use functions that are not part of your script, but other than running.Edit: Although the example above use #include <Array.au3> in both scripts, but could be another function that was not part of the second script... Edited April 15, 2011 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
ptrex Posted April 19, 2011 Share Posted April 19, 2011 @Jscript Works fine on my machine Win7 x64. Great script ! Rgds ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
ValeryVal Posted April 19, 2011 Share Posted April 19, 2011 Example:Compile and run this first.. Why? It works without compilation. - Start script2.au3 - Start script1.au3Thank you. The point of world view Link to comment Share on other sites More sharing options...
JScript Posted April 19, 2011 Author Share Posted April 19, 2011 (edited) @ptrex Thank you! Next step is to implement the use of ByRef parameter and 2d arrays or more... @ValeryVal I'm glad you like it!!! The worst is that I had not tested without compiling... Edited April 19, 2011 by jscript http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!) Somewhere Out ThereJames Ingram Download Dropbox - Simplify your life!Your virtual HD wherever you go, anywhere! Link to comment Share on other sites More sharing options...
chandoi Posted January 20, 2013 Share Posted January 20, 2013 this udf very useful Link to comment Share on other sites More sharing options...
Cynagen Posted June 17, 2013 Share Posted June 17, 2013 You know what really caps off this UDF? Using the JSON UDF on top to send serialized messages and multi-dimensional arrays through to the other application. Blah, blah, blah... lip service... lip service.Working on a number of projects right now, just waiting for my time to post them here on AutoIt forums. Link to comment Share on other sites More sharing options...
storme Posted September 26, 2013 Share Posted September 26, 2013 You know what really caps off this UDF? Using the JSON UDF on top to send serialized messages and multi-dimensional arrays through to the other application. So does that mean you have used JSON with this UDF or you think it would improve the UDF? If you have combined the 2 then post your code (in another thread) it'd be great to see a "complete" (all singing all dancing) Inter-process communications method. Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E Link to comment Share on other sites More sharing options...
Cynagen Posted May 14, 2014 Share Posted May 14, 2014 (edited) So does that mean you have used JSON with this UDF or you think it would improve the UDF? If you have combined the 2 then post your code (in another thread) it'd be great to see a "complete" (all singing all dancing) Inter-process communications method. JSON UDF would improve on this UDF for the fact that the JSON UDF will serialize quite a bit of information including 2D arrays, thus expanding the capabilities of this UDF greatly. I'll get a working example together, but it's pretty straightforward, use the JSON UDF to serialize and pipe that through IPC, reverse on receiving end. I would like to point out that while this is acceptable for IPC and multi-threading things, it's not the greatest at these feats, I've switched to MailSlot directly, which this is based on. Edited May 14, 2014 by Cynagen Blah, blah, blah... lip service... lip service.Working on a number of projects right now, just waiting for my time to post them here on AutoIt forums. 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