I have the following need.
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- App1 tell App2 to run an event
- ATK Gimmy Susan
- PowerBuilder
- Sunday, 22 March 2020 09:30 AM UTC
I have the following need.
- Monday, 23 March 2020 19:24 PM UTC
- PowerBuilder
- # Permalink
You could use Winsock. App2 would listen on a port and App1 would send the message.
https://www.topwizprogramming.com/freecode_winsock.html
- Monday, 23 March 2020 15:31 PM UTC
- PowerBuilder
- # 1
Some other options
1) Using a database for messaging: App1 writes a message to the DB, App2 "listens" by regularly reading from the DB.
2) Using messaging software like IBM MQ
3) PTP software - years ago I did a project where we had to send messages to vehicles in a fleet from dispatching software. We used software called DART. When the vehicles would log in, they would register their ip in the database. The dispatcher app would determine which vehicle to send the message to, look up their ip in the db, and then send the message. Not sure what other PTP software vendors are out there, but it's another option.
- Sunday, 22 March 2020 22:36 PM UTC
- PowerBuilder
- # 2
Hi Gimmy;
Here is a working example of using both the PB Send() command and/or the SendMessageW API that achieves what your asking ...
http://chrispollach.blogspot.com/2019/11/sendmsg.html
HTH
Regards ... Chris
- ATK Gimmy Susan
- Monday, 23 March 2020 11:15 AM UTC
Thanks for the answer, i looked your code.
i have a doubt:
- send statement has 4 parameters: Send ( iul_handle , lul_msg_no , iul_handle , Handle ( THIS ) ). The manual says that the last can be a string.
- the event it receives has only 2 parameters. what is the content of these 2 parameters?
- Is possible to send a string ?
-
Helpful Loading... Helpful 0
- mike S
- Monday, 23 March 2020 14:40 PM UTC
you can store strings or whatever n the registry or a temp file, and have app2 read it
-
Helpful Loading... Helpful 0
- Chris Pollach @Appeon
- Monday, 23 March 2020 20:12 PM UTC
Like Mike says ... or better yet - how about the ClipBoard?
Also, that is what the "SendString" API is for too as well. ;-)
Regards ... Chris
-
Helpful Loading... Helpful 0
- Sunday, 22 March 2020 15:22 PM UTC
- PowerBuilder
- # 3
this describes the technique. i believe this is roland and chris from the old sap forum.
https://answers.sap.com/questions/12296328/triggering-a-user-event-in-pb-window-form-another-.html
- Roland Smith
- Monday, 23 March 2020 00:39 AM UTC
-
Helpful Loading... Helpful 0
- ATK Gimmy Susan
- Tuesday, 24 March 2020 08:16 AM UTC
The receiving program goes into error and crash to the line: 'ls_data - String(lparam, 'address')'
Some ideas ?
-
Helpful Loading... Helpful 0
- Page :
- 1
However, you are not allowed to reply to this question.
iul_socket = gn_ws.of_Listen(lui_port, Handle(Parent), 1)