Jump to content

Recommended Posts

Posted (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 by Michel Claveau
Posted

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

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*

did you try in a while loop to check for a value in a control in the app with

ControlGetText

if a specific value is in then do the action you want in autoit

Posted

Hi!

did you try ... ControlGetText

Thanks!

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...

Posted (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 by Michel Claveau
Posted

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 autoit

That was why I talked about controlgettext to retrieve info from your app

Posted

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.

Posted

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.

  • Moderators
Posted

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.

Posted

udp localloops are quite fast too...

UDPStartup()

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...