Jump to content

IPC with autoit


Recommended Posts

can Autoit do any Interprocess Communication IPC (pipes, sockets, queues, shared memory, semaphores, etc)?

Can I load a .au3 file dynamically into my parent autoitscript. I.e can a autoitscript dynamically load "Plugins" at runtimes and execute it all in a single process?

Link to comment
Share on other sites

can Autoit do any Interprocess Communication IPC (pipes, sockets, queues, shared memory, semaphores, etc)?

Can I load a .au3 file dynamically into my parent autoitscript. I.e can a autoitscript dynamically load "Plugins" at runtimes and execute it all in a single process?

I'm not sure I understand "load...dynamically into my parent autoitscript" but glance at this demo:

http://www.autoitscript.com/forum/index.ph...showtopic=22531

Once you have multiple scripts running - you might be able to get them to talk to each other using the info posted to this other thread - starting here: http://www.autoitscript.com/forum/index.ph...ndpost&p=153221

If I did not answer your questions - at least I gave you a free bump. :-)

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

can Autoit do any Interprocess Communication IPC (pipes, sockets, queues, shared memory, semaphores, etc)?

Can I load a .au3 file dynamically into my parent autoitscript. I.e can a autoitscript dynamically load "Plugins" at runtimes and execute it all in a single process?

Yes and No. :o

Check in the help file for subroutines, functions, FileInstall and TCP functions. What exactly are you trying to do? Your question is a bit too broad to answer to any detail.

Link to comment
Share on other sites

can Autoit do any Interprocess Communication IPC (pipes, sockets, queues, shared memory, semaphores, etc)?

Autoit, yes, but not 'out of the box'. It depends on how good you know how to use DllCall() :geek:

i wrote a few functions to alter another process its memory.

(see _Mem from my signature, it should give you an idee how to do what you want.)

Can I load a .au3 file dynamically into my parent autoitscript. I.e can a autoitscript dynamically load "Plugins" at runtimes and execute it all in a single process?

i think this is possible but only if you run it as an au3. maby you could use #include then :o

other wise you would have 2 processes running.

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

  • 14 years later...

So far, the best way I find is using registry.

1, It is simple, regwrite() and regread() to a pre-defined registry key. Two lines of code to communicate, thats it. And it is super fast (<10ms) thanks to windows.

2, Autoit doesn't do "On Event" and "Concurrent" very well. Registry key is somehow persistant. Your client/server could take time doing other tasks, and fetch the "shared registry data" when it is needed.  No receive-wait-loop etc. needed.

3, It is super reliable, It always works. Impressive 0 faults after 200 millions cycles with hundreds of concurrent registry read+write at the same time. (Thanks to windows again). There is no "File Lock" issue in registry.

 

I am writting a "master process" communicates with 200 tiny "slave processes", here are what I tried:

  • Memory-mapping give me a big headache. 
  • TCP network is fast. But the TCP-on-event-trigger is slow and the 200 "slaves" drive the "master" crazy (new event got triggered before the earlier event finishes)
  • Shared file, I got "File locked" issue: Too many processes try to write the file at the same time. It fails a lot. And it make the filesystem fragmented over time.
  • Shared registry, perfect so far.

 

Link to comment
Share on other sites

  • Moderators

kylejustknows,

14 years on I doubt if the OP is still interested!

And nowadays there are quite a few very reliable IPC UDFs available, as listed here.

M23 

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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