MrCreatoR Posted March 26, 2011 Share Posted March 26, 2011 (edited) This UDF is no longer supported/developed, please check AppInteract UDF. AutoIt version: 3.3.6.1 UDF versionя: 1.1 Description: Another scripts interaction method. Distinctive feature of this method, it's the ability to transfer whole arrays as data, and even COM objects. System requirements: Win 2000+, IE 7 +. Example: Spoiler [sENDER] - Interaction Demo.au3 #include <Container.au3> $sVar = "Test" $sValue = InputBox('Container', 'Please type a value for "' & $sVar & '" variable:') If @error Then Exit $oFSO = ObjCreate("Scripting.FileSystemObject") $avArray = StringSplit('AutoIt is the Best!', ' ') $oContainer = _Container_Open("storage", 1) _Container_PutProperty($oContainer, $sVar, $sValue) _Container_PutProperty($oContainer, "FSO", $oFSO) _Container_PutProperty($oContainer, "Array", $avArray) MsgBox(64, "Container", "Values are set. Now, before closing this message, open: [RECIEVER] - Interaction Demo.au3") _Container_Close($oContainer) [RECIEVER] - Interaction Demo.au3 #include <Container.au3> $oContainer = _Container_Open("storage", 0) If @error Then MsgBox(48, 'Container', '_Container_Open() failed!') Exit EndIf $vTestVar_Value = _Container_GetProperty($oContainer, "Test") $vFSOVar_Value = _Container_GetProperty($oContainer, "FSO") $aArrayVar_Value = _Container_GetProperty($oContainer, "Array") MsgBox(64, 'Container', '"Test" variable value: ' & $vTestVar_Value) MsgBox(64, 'Container', '"FSO" variable type: ' & VarGetType($vFSOVar_Value)) MsgBox(64, 'Container', '"Array" variable type: ' & VarGetType($aArrayVar_Value)) MsgBox(64, 'Container', '"Array[1]" variable value: ' & $aArrayVar_Value[1]) Attachments: Container_UDF_1.1.zip Container_UDF.zip Changelog: Spoiler v1.1 * Added IE version verification. This library requierd IE 7 (and windows 2000+). * Better errors handling. v1.0 First version. Edited May 14, 2020 by MrCreatoR 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...
BillLuvsU Posted March 26, 2011 Share Posted March 26, 2011 Great stuff as usual mate. Haven't done speed tests yet but looking through the code I think its safe to say the transfer rates will be just fine. The entire setup is well done and easy to use, and I can't think of any possible compatibility issues off the top of my head. Good stuff. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
JohnOne Posted March 26, 2011 Share Posted March 26, 2011 Excellent. Thats the simplest looking script for this sort of thing I've ever seen. Havent tested objects yet, but sure will. 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...
JScript Posted March 26, 2011 Share Posted March 26, 2011 I've seen here on the forum many forms of communication between scripts, but his was the only one I've seen that can transfer arrays! FIVE STARS!!! 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...
JScript Posted March 26, 2011 Share Posted March 26, 2011 Questions: 1 - What are the limits (size of text, multi-dimensional arrays)? 2 - Through the network? 3 - Windows version? 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 March 26, 2011 Share Posted March 26, 2011 Here are my speed tests, getting between 4700 and 6500. Sender.uu3 #include <Container.au3> $oContainer = _Container_Open("storage", 1) If @error Then MsgBox(48, 'SENDER', '_Container_Open() failed!') Exit EndIf ShellExecute("RECIEVER.au3") Sleep(100) _Container_PutProperty($oContainer, "ReadyFlag", 0) $i = 0 $iTimer = TimerInit() While TimerDiff($iTimer) < 10000 If _Container_GetProperty($oContainer, "ReadyFlag") = 0 Then _Container_PutProperty($oContainer, "Test", $i) _Container_PutProperty($oContainer, "ReadyFlag", 1) $i += 1 EndIf WEnd _Container_PutProperty($oContainer, "ReadyFlag", -1) Sleep(1000) Exit _Container_Close($oContainer) Reciever.au3 #include <Container.au3> $oContainer = _Container_Open("storage", 0) If @error Then MsgBox(48, 'RECIEVER', '_Container_Open() failed!') Exit EndIf $vTest = 0 Sleep(100) While 1 If _Container_GetProperty($oContainer, "ReadyFlag") = 1 Then $vTest = _Container_GetProperty($oContainer, "Test") _Container_PutProperty($oContainer, "ReadyFlag", 0) EndIf If _Container_GetProperty($oContainer, "ReadyFlag") = -1 Then MsgBox(0,"Test result","Recieved " & $vTest & " variables") Exit EndIf WEnd 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...
BillLuvsU Posted March 26, 2011 Share Posted March 26, 2011 A quick thought, is there any way to poll the contents of the container? Perhaps returning an array of variable names? [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
martin Posted March 26, 2011 Share Posted March 26, 2011 A quick thought, is there any way to poll the contents of the container? Perhaps returning an array of variable names?I would guess there is no need. You only need to have the sender add all the names to a CONTENTS name and the reciever can read it. As the sender or reciever adds a name it could be added to the list.@ MrCreatoRLooks really good How do you avoid 2 applications trying to change the same value at the same time? Or is it up the the script writer to ensure that doesn't happen? 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...
BillLuvsU Posted March 26, 2011 Share Posted March 26, 2011 I would guess there is no need. You only need to have the sender add all the names to a CONTENTS name and the reciever can read it. As the sender or reciever adds a name it could be added to the list.@ MrCreatoRLooks really good How do you avoid 2 applications trying to change the same value at the same time? Or is it up the the script writer to ensure that doesn't happen?No application except in the context of a rather complex system, such as more than just two scripts working in synchronization, like a plugin system of sorts perhaps. While it wont likely be used it would still be a nice feature. [center][/center]Working on the next big thing.Currently Playing: Halo 4, League of LegendsXBL GT: iRememberYhslaw Link to comment Share on other sites More sharing options...
JohnOne Posted March 27, 2011 Share Posted March 27, 2011 I imagine the object might deal with that sort of thing, I've tried 4 scripts together without using a busy flag and it seems fine. really top drawer this. 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...
ptrex Posted March 27, 2011 Share Posted March 27, 2011 @MrCreatoR Does this work on a windows 7 - x64 ? Tested this but no success. 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...
Andreik Posted March 27, 2011 Share Posted March 27, 2011 (edited) @ptrex I just tested on xp x64 and work. @MrCreatoR Nice UDF Edited March 27, 2011 by Andreik Link to comment Share on other sites More sharing options...
JohnOne Posted March 27, 2011 Share Posted March 27, 2011 For the recoed win7 32 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...
ptrex Posted March 28, 2011 Share Posted March 28, 2011 I am getting a COM error on line 52 ? What am I doing wrong. I both tried a compiled an non compiled test. Both of them give errors ? 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...
martin Posted March 28, 2011 Share Posted March 28, 2011 I am getting a COM error on line 52 ?What am I doing wrong.I both tried a compiled an non compiled test. Both of them give errors ?rgdsptrexMaybe the CLSID for ShellBrowserWindow is not {C08AFD90-F2A1-11D1-8455-00A0C91F3880} in W7. 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...
Moderators Melba23 Posted March 28, 2011 Moderators Share Posted March 28, 2011 MrCreatoR, Cracking UDF! It must be the easiest inter-script communication method yet. Thank you for posting it. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Klaatu Posted March 29, 2011 Share Posted March 29, 2011 What is the persistency (if that's a word) of the data? Or should I say of the container? Does it exist only as long as a running script has it open? Until a shutdown? Or does it survive a reboot? My Projects:DebugIt - Debug your AutoIt scripts with DebugIt! Link to comment Share on other sites More sharing options...
wraithdu Posted March 29, 2011 Share Posted March 29, 2011 Maybe the CLSID for ShellBrowserWindow is not {C08AFD90-F2A1-11D1-8455-00A0C91F3880} in W7.Nope, the demos worked just fine for me, Win7 x64, running as either 32-bit or 64-bit scripts. FYI, this CLSID does NOT exist in the registry... so I'm not clear on exactly how it work, but it does. Link to comment Share on other sites More sharing options...
wraithdu Posted March 29, 2011 Share Posted March 29, 2011 What is the persistency (if that's a word) of the data? Or should I say of the container? Does it exist only as long as a running script has it open? Until a shutdown? Or does it survive a reboot?In a quick test, the container exists until it is closed with _Container_Close(), even if you close the initial creating application. I did not test a reboot though... I'm going to assume that won't survive. Link to comment Share on other sites More sharing options...
trancexx Posted March 29, 2011 Share Posted March 29, 2011 In a quick test, the container exists until it is closed with _Container_Close(), even if you close the initial creating application. I did not test a reboot though... I'm going to assume that won't survive. Container is shell window. Explorer's window. If you add: $oContainer.Visible = True ... below setting status text to $sName in _Container_Open you will see what I mean. If the UDF isn't working that's because IE is less than 7 or some other shell is used instead of explorer.exe. Let's ask ptrex what's the case with him? Btw, UDF is leaking because it never closes created windows. It just losses the reference by setting StatusText property to empty string. Other than that it's great. Thanks for sharing MrCreatoR. ♡♡♡ . eMyvnE 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