Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Javascript for DOS (Announce)

posted by KormaX(R), 21.02.2019, 14:27

> How would you call JS interpreter externaly from browser when it would need
> to do some visual changes on displayed page? I cannot imagine other use
> than direct integration to links but with new versions you will have to
> integrate it again and again...

Just like how Arachne uses its APM packages, except, that Links does not have Dos Gateway Interface, so you are required to load the modified webpage manually... or you don't return to Links until you finish with the JS webpage. And this is what I originally thoughed about. Mikulas added a function that saves the clipboard to a file, so its content is accessible from DOS. If you have the proper batch file, AND the JS interpreter itself has its own WATTCP (or another internet access) implementation, it opens your webpage, you can do stuff in it than terminate it and go back to Links. The other option is to re-render the webpage over and over again, when a JS fuction is needed. This works, the old WebAccessGateway did this, and it still could, just no server uses it anymore. On a clien machine, however, it would be very uncomfortable.

By the way, I use the "magnet:" protocol as a limited DGI, because I created a .bat file which is added in Links as the magnet-program, but the .bat itself only forwards the text coming after "magnet: " as a command to the OS. Than I have standard names for stuff according to what am I planning to do with the data and have batch files for them. For Youtube videos, for example, I download the video page as Z:watch.htm (Z: is my RAM-disk) then I write "magnet: youtube 1 - " as URL. Than Links forwards "YOUTUBE 1 - " to COMMAND.COM which executes YTCRACK on Z:watch.html resulting Z:YOUTUBE.HTM, which contains the video file URL's in order to download them. It is designed to be displayed in a browser, originally in Arachne, I think, but my batch file, with this command line arguments, doen not do it, instead, it immediately executes my small C++ stuff, which finds the 640:480 or 640:360 version in it and leaves only that URL in the file, and nothing more. Then, WGET is immediately called to download the file as Z:1.1, which is then automatically renamed to %1.mp4. Then mplayer for Windows is loaded with DPMILD32.EXE to play Z:%1.mp4 with SDL output and 640:360 mode. All this happens when you download the actual page as Z:watch.html and then go to "magnet: youtube X - ", and you watch the video. Then you get back to the browser. This is only an example that of you are creative, you can take advantage on a lot of things. An external JS executer could be designed similarly. :)

DOS isn't about why. It's about why not.


Complete thread:

Back to the forum
Board view  Mix view
15951 Postings in 1475 Threads, 271 registered users, 91 users online (0 registered, 91 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum