Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a JS command that will run javascript outside of Dosbox #8

Open
wants to merge 3 commits into
base: em-dosbox-svn-sdl2
Choose a base branch
from

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?

@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