[XP] Dual Screens?

Started by ForeverZer0, November 11, 2010, 12:30:38 pm

Previous topic - Next topic

ForeverZer0

I'm kinda getting stumped on this one. I'm trying to do two different things (not togterther, but still releated):

1. Create a window that uses the console to output text to for debugging purposes in real-time, without using the normal pop-up messages used in the standard output. I attempted changeing the $stdout to an instance of CMD.exe and a ruby console I have, but cannot seem to figure out ow to display information on it. I tried used a | before the filename to connect it with a pipe and was still unsuccessful. I also ran it as a seperate Thread, but still to no avail. It just sits there and does nothing, and I can't even switch focus to te console and type in it. It does nothing but display an empty black box with a blinking cursor.

2. Same concept, using two processes, but have them linked, but here I would like to use another copy of RMXP. For example, having the ability to have a window in the child process displaying information or whatever that is sent from the parent process.

I'm not sure if this is possible, I imagine it is, and I understand the vast performance loss that this would cause, but its pissing me off that I can't do it.
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Blizzard

November 11, 2010, 12:53:45 pm #1 Last Edit: November 11, 2010, 12:56:25 pm by Blizzard
I think you can pull it off with the old trick of two processes communicating over a file. One process opens the file and writes data into it. The other process checks the file frequently for any new input and clears the file after displaying the data on the screen. You can let RMXP run an actual Ruby script on startup and simply left RMXP write into a file that the Ruby script then reads and displays. The only disadvantage would be that you can't stop the Ruby script except if you use a specific character code to signalize the script that it should stop (e.g. a character like \0 or \1 or whatever).
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

ForeverZer0

I will try that tonight. I didn't think of using a seperate file as a common point for both to access.
Thanks for the advice.  ;)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.