Michel Claveau Posted November 20, 2006 Share Posted November 20, 2006 (edited) Hi! I search to send data to (standalone) au3-scripts (.au3 or compiled .exe), already running, with GUI (not AutoIt-X, isn't it! with it, no problem) Like with COM/Ole-automation, when using call function ( e.g.: ie.navigate($data)) I had explore: - file: slow, difficult (lock managment), - environment: limited size, limited variety functions - register: slow, restricting, dangerous - TCP/IP server: run OK, but complex to install - clipboard: not reliable for intensive use I had some ideas: - memmap (mmap): I know how in Python, Ruby, but not in AutoIt! (shame!) - shared-memory-object: I know how with javascript, Python, but not in AutoIt! - common (mono-instance) COM server: I had experiment problems in concurrent use (freeze) Consequently: who had a genious idea? and *sorry for my bad english* Edited November 20, 2006 by Michel Claveau Link to comment Share on other sites More sharing options...
tresa Posted November 20, 2006 Share Posted November 20, 2006 Hi! I search to send data to (standalone) au3-scripts (.au3 or compiled .exe), already running, with GUI (not AutoIt-X, isn't it! with it, no problem)Like with COM/Ole-automation, when using call function ( e.g.: ie.navigate($data))I had explore: - file: slow, difficult (lock managment), - environment: limited size, limited variety functions - register: slow, restricting, dangerous - TCP/IP server: run OK, but complex to installI had some ideas: - memmap (mmap): I know how in Python, Ruby, but not in AutoIt! (shame!) - shared-memory-object: I know how with javascript, Python, but not in AutoIt! - common (mono-instance) COM server: I had experiment problems in concurrent use (freeze)Consequently: who had a genious idea? and *sorry for my bad english*did you try in a while loop to check for a value in a control in the app withControlGetText if a specific value is in then do the action you want in autoit Link to comment Share on other sites More sharing options...
Michel Claveau Posted November 20, 2006 Author Share Posted November 20, 2006 Hi!did you try ... ControlGetTextThanks!It's an idea. I will try. But I have a doubt for performance. I will give results of tests.Ideal will be Autoit-X with GUI, but, I think that is not for tomorrow... Link to comment Share on other sites More sharing options...
Michel Claveau Posted November 20, 2006 Author Share Posted November 20, 2006 (edited) Re-Hi ! Results of tests: - with only ControlSetText in loop: 0,5 millisec by set (assignment) - with ControlGetHandle+ControlSetText in loop: 1/100e sec by set (assignment) It's quite slow, but it's playable... Edited November 20, 2006 by Michel Claveau Link to comment Share on other sites More sharing options...
tresa Posted November 20, 2006 Share Posted November 20, 2006 Re-Hi ! Results of tests: - with only ControlSetText in loop: 0,5 millisec by set (assignment) - with ControlGetHandle+ControlSetText in loop: 1/100e sec by set (assignment)It's quite slow, but it's playable...can you give the code of the loop.I do'nt understand why you use controlsettext as I thought you wanted to send from your app some info to autoitThat was why I talked about controlgettext to retrieve info from your app Link to comment Share on other sites More sharing options...
piccaso Posted November 20, 2006 Share Posted November 20, 2006 how about windows messages? CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Michel Claveau Posted November 20, 2006 Author Share Posted November 20, 2006 Hi, tresa! Exemple of I want obtain: A message utility, stay visible, and can be "updatable" by batch. For this, I write two softwares: -1. the utility who display the message (stay visible) -2. the utility who write data (param from command-line) in the (good) control of the first software Other case: use AutoIt-script like dynamic GUI, for application write in Python (or Ruby) Another exemple: using ActiveX from a Batch. etc. Link to comment Share on other sites More sharing options...
Michel Claveau Posted November 20, 2006 Author Share Posted November 20, 2006 Hi, piccaso! >>> how about windows messages? Sorry, my english is too many poor for understand... You want to said "use windows API/windows messages"? I don't try this way. But the slow part is the identification of the control, not easy to (re)-write. Link to comment Share on other sites More sharing options...
piccaso Posted November 21, 2006 Share Posted November 21, 2006 Yes thats what i wanted to say.Here is an example for using WM_COPYDATA with autoityou can allso create shared memory struct with DllStruct* and GlobalAlloc API... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Link to comment Share on other sites More sharing options...
Michel Claveau Posted November 21, 2006 Author Share Posted November 21, 2006 Hi!an example for using WM_COPYDATA with autoitThanks! very interesting. Speed is only very little faster.But it's a possible way.I have now two solutions.Thanks. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted November 21, 2006 Moderators Share Posted November 21, 2006 Both of your threads have concerns on "speed". If this is such a concern to you, why not try to write your script in a lower leveled language? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Michel Claveau Posted November 21, 2006 Author Share Posted November 21, 2006 re-Hi, piccaso! After complementary tests, I found your solution more flexible and better for the "montée en charge" (sorry, it's french expression, because I don't know the translation). Link to comment Share on other sites More sharing options...
piccaso Posted November 22, 2006 Share Posted November 22, 2006 udp localloops are quite fast too... expandcollapse popupUDPStartup() Func _IPC_GetSocket($iPort = 6789, $sBind = "127.0.0.1") Local $hSock, $iErr $hSock = UDPBind($sBind,$iPort) $iErr = @error If $iErr = 1 Or $iErr = 2 Then Return SetError($iErr,0,-1) ElseIf $iErr = 0 And $hSock <> -1 Then Return $hSock EndIf $hSock = UDPOpen($sBind,$iPort) Return SetError(@error,@extended,$hSock) EndFunc $hSock1 = _IPC_GetSocket() ; Server $hSock2 = _IPC_GetSocket() ; Client ; Server must be binded first but Client must initiate transfair $iTimer = TimerInit() UDPSend($hSock2,"2 -> 1 : Msg One" & @CR) While 1 $sBuff = UDPRecv($hSock1,256) If $sBuff Then ConsoleWrite($sBuff) ExitLoop EndIf WEnd ConsoleWrite("Time: " & TimerDiff($iTimer) & @LF) $iTimer = TimerInit() UDPSend($hSock1,"1 -> 2 : Msg Two" & @CR) While 1 $sBuff = UDPRecv($hSock2,256) If $sBuff Then ConsoleWrite($sBuff) ExitLoop EndIf WEnd ConsoleWrite("Time: " & TimerDiff($iTimer) & @LF) UDPShutdown() CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map 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