How do I send simple messages?

Get help using Construct 2

Post » Mon Aug 11, 2014 7:07 pm

I have two apps both running on the same Windows computer, both Node-Webkkit exports.

How do I send a simple message from one to the other? A text string "1234" for example...

Press a button in App1 and it sends "1234" to App2. App2 reads that and sets its MessageVariable to the incoming message...

Not hard right?

Yet I can't seem to do it...

Help! I have less than a week left to get this working!
B
10
S
4
G
2
Posts: 133
Reputation: 2,667

Post » Mon Aug 11, 2014 8:56 pm

Yes hard. You could use the multiplayer chat example as a base, or use the peerjs third party plugin. Both have the side effect of needing access to the internet to at least get going.

Or maybe very easy. You could use the clipboard as the way to send messages. Just set the clipboard in one app and periodically check in the other app. Although it could be annoying to the user with the clipboard contents being changed. You could also do it be reading and writing to a certain file.
B
94
S
33
G
118
Posts: 5,395
Reputation: 75,851

Post » Tue Aug 12, 2014 5:12 am

I have avoided writing/reading files because this system will be running 24 hours a day/7 days a week for possibly years... I would like to not put that kind of read/write on the hard drive.

Using the clipboard is a very interesting idea that I had not thought of... The clipboard is not going to be in use on this machine at all. The final build is a highly restricted use Kiosk so monopolizing the clipboard is not an issue.

Thanks for the great idea I am going to look into this immediately.
B
10
S
4
G
2
Posts: 133
Reputation: 2,667

Post » Tue Aug 12, 2014 5:57 am

@R0J0hound you're a lifesaver... thank you so much for giving me a totally different view and solution to this issue! Clipboard never even crossed my mind. And its so simple!

When I am done with my project I am going to have to write something about using Construct 2 for creating non-game applications (I am building an interactive Kiosk and (semi?)permanent display installation) and I will be sure to credit you with showing me this for quick/easy passing of data.
B
10
S
4
G
2
Posts: 133
Reputation: 2,667


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 28 guests