StringIPC class - send/receive strings between processes

Post a reply


In an effort to prevent automatic submissions, we require that you type the text displayed into the field underneath.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: StringIPC class - send/receive strings between processes

Re: StringIPC class - send/receive strings between processes

Post by Learning one » 29 Jan 2015, 15:24

@lexikos: That developer only said that I should avoid using it, and I didn't ask for details... :(
Wow, ObjRegisterActive rocks! 8-) With such a powerful and flexible IPC method it really doesn't make sense to use StringIPC.
Thank you for making & presenting ObjRegisterActive! :)
First post updated.

Re: StringIPC class - send/receive strings between processes

Post by lexikos » 29 Jan 2015, 03:24

ObjRegisterActive demonstrates the other IPC method I was referring to.

Re: StringIPC class - send/receive strings between processes

Post by boiler » 28 Jan 2015, 23:48

lexikos wrote:Actually, there's a much more flexible and fairly simple IPC method available with v1.1.17+. I intend to post about it later, when I get more time.


Looking forward to this. Right now I clumsily do IPC via text file. I wasn't aware of IPC.ahk, but I guess now I'll just wait for the update.

Re: StringIPC class - send/receive strings between processes

Post by lexikos » 28 Jan 2015, 18:40

I am not aware of any issues with WM_COPYDATA. What have you heard?

Actually, there's a much more flexible and fairly simple IPC method available with v1.1.17+. I intend to post about it later, when I get more time.

Re: StringIPC class - send/receive strings between processes

Post by Learning one » 28 Jan 2015, 15:50

@lexikos: I absolutely agree that using WM_COPYDATA would be simpler. I know for majkinetor's IPC, and for OnMessage() example in AHK help, which use WM_COPYDATA.

However, one developer told me that I should avoid using WM_COPYDATA to exchange strings between processes. I also read about possible problems when using WM_COPYDATA (it was long itme ago, can't remember where). So that's the only reason I wrote this… Do you think that using WM_COPYDATA is reliable? Do you recommend it for sending strings between processes?

@joedf, Soft: Thx :)

Re: StringIPC class - send/receive strings between processes

Post by lexikos » 28 Jan 2015, 03:17

Your script seems surprisingly complicated. It doesn't use WM_COPYDATA, but it does use SendMessage/OnMessage plus a Gui and a bunch of Edit controls. It seems to me that using WM_COPYDATA would be simpler; IPC.ahk, for instance.

Re: StringIPC class - send/receive strings between processes

Post by Soft » 27 Jan 2015, 01:52

"It doesn't use WM_COPYDATA, ClipBoard, FileMapping, COM, Mailslots, Pipes, Sockets, or similar; it's all done via Edit controls in hidden GUIs"

Cool..!!

Re: StringIPC class - send/receive strings between processes

Post by joedf » 26 Jan 2015, 19:03

Very nice!! :D

StringIPC class - send/receive strings between processes

Post by Learning one » 26 Jan 2015, 18:29

:!: EDIT: instead of StringIPC class, it's recommended to use ObjRegisterActive, which is more powerful and flexible

StringIPC class allows you to exchange (send/receive) strings between processes. It doesn't use WM_COPYDATA, ClipBoard, FileMapping, COM, Mailslots, Pipes, Sockets, or similar; it's all done via Edit controls in hidden GUIs. ;)

>> Usage preview:

Code: [Select all]GeSHi © Codebox Plus

StringIPC := new StringIPCClass("Alpha")						; Creates "StringIPC" object and defines a name (address) of this process; "Alpha"
StringIPC.SendMessage("Beta", "Please do some stuff for me...") ; Sends a message to "Beta" process with the following text; "Please do some stuff for me..."

>> Download StringIPC.zip which includes; StringIPC class, examples, documentation, license. Run both example scripts (Alpha & Beta) and press F1, F2, 1, 2 hotkeys to start exchanging messages. Press Esc to exit.

>> This short video shows how StringIPC works - what's actually happening in background while processes are exchanging messages.
Image

Top