Sender & Receiver

Just starting out? Need help? Post your questions and find answers here.
myutopia
User
User
Posts: 91
Joined: Sat Jul 04, 2009 1:29 am

Sender & Receiver

Post by myutopia »

Hi all,

I want to create a 2 programs that communicate with one another within the same computer without using the network functions; a signal sender and receiver pair. When I click the send button on the send program, I want the receiver program to say, received. That's it.

I don't know what's this procedure called. Could someone please point me in the right direction? Thanks!

Simple window code:

Sender:

Code: Select all

Enumeration
  #Window
  #Button
EndEnumeration

If OpenWindow(#Window, #PB_Any, #PB_Any, 200, 200, "Sender")
  ButtonGadget(#Button, 10, 10, 180, 180, "Send Now")
EndIf

Repeat
  Event = WaitWindowEvent()
  If Event = #PB_Event_CloseWindow  ; If the user has pressed on the close button
    Quit = 1
; How do I send signals to the other program?
  EndIf

Until Quit = 1
Receiver:

Code: Select all

Enumeration
  #Window
  #ListIcon
EndEnumeration


If OpenWindow(#Window, #PB_Any, #PB_Any, 200, 200, "Receiver")
  ListViewGadget(#ListIcon, 10, 10, 180, 180)
EndIf


Repeat
  Event = WaitWindowEvent()
  If Event = #PB_Event_CloseWindow  ; If the user has pressed on the close button
    Quit = 1
; What event do I "listen" for?
  EndIf

Until Quit = 1
rsts
Addict
Addict
Posts: 2736
Joined: Wed Aug 24, 2005 8:39 am
Location: Southwest OH - USA

Re: Sender & Receiver

Post by rsts »

Post Reply