Skip to content

Conversation

@thijsk
Copy link

@thijsk thijsk commented Feb 10, 2015

I created a new "dos" command that will execute the javascript in the file specified as the argument to the command.

Example:
c:>JS myscript.js
will execute the script in the browser

Usefull for building a batch file that can execute javascript commands

Any thoughts/ideas/tips?

@thijsk thijsk force-pushed the em-dosbox-svn-sdl2 branch from 658c4f7 to 723be4a Compare February 11, 2015 13:16
@dreamlayers
Copy link
Owner

This is interesting and it works, but is it actually useful?

@thijsk
Copy link
Author

thijsk commented Feb 19, 2015

I was experimenting with .bat files that can influence the look of the page that the dosbox.js is running on. So it's kind of usefull in that way.
I used the setTimeout in an attempt to prevent the dosbox from crashing when the javascript executed by "JS.COM" was invalid; that didn't really work so the workaround is to keep the executed js as simple as possible, which is not really a good solution.

@dreamlayers
Copy link
Owner

I think it makes more sense to give JavaScript access to DOSBox than to give DOSBox access to JavaScript. Settings might be more convenient via JavaScript than via a dosbox.conf file. Maybe it would be useful if JavaScript could perform actions like simulating key presses, running commands, and waiting for events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants