How do you detect resolution & launch an app with javascript?

SpaceshipSpaceship
Watch

Rhino1616

Established Member
Impact
0
Good Evening,

I created a CD presentation in Swish its just like Flash. It has an autorun file, & Im going to add 2 files to cater to different resolutions, 800x600 & 1024x760. What I would like to do is add a javascript that when the viewer puts the CD in, it would autroun and scan the systems resolution settings & launch the appropriate file:

IE: The viewers system is set @ 800x600, he/she puts CD in drive, the 800x600 version of the presentation is launched.


Ive searched around & read up but Im a BIG javascript rookie, how could I do this & could someone suggest a good script to use.


Thank you kindly
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
Hi I changed it & tried it again & it still doesnt seem to work. If you need to see my file I posted it at: http://uniteddistributorscanada.hypermart.net/ . the file is called "Java intro" & youll also see the files I want to launch there.

Thanks
 
0
•••
0
•••
Im assuming that only applied to web format. I thought web & producing .exe CD_ROM's are configured differently?
 
0
•••
Doesn't your cd rom contain html? What type of file exactly are you trying to launch depending on the resolution?
 
0
•••
Ive created a cd with Swish (its like flash) I then convert my swish file to .swf format & use a 3rd party software called "SWF Studio" to convert it to a stand alone Flash projector
 
0
•••
Hi deadserious,

I think I just stumbled across some info that "might" help. I just read that its possible to autorun an HTML file, and if so would it be possible to create a tiny html file with javascript in it that would detect the users resolution and launch the appropriate .exe.

I know the example below is for web redirecting, but couldnt something lalong this line be altered to check rez, then launch app (.exe), and then self close itself (I mean the original html file that autrun launched)? I really dont know Javascript or javascript launch commands, so I dont know how you would launch the .exe or if this is even possible?

IE:


if (screen.width==800||screen.height==600) //if 800x600
window.location.replace("http://www.someplace.com")

else if (screen.width==640||screen.height==480) //if 640x480
window.location.replace("http://www.someplace.com")

else if (screen.width==1024||screen.height==768) //if 1024x768
window.location.replace("http://www.someplace.com")

else //if all else
window.location.replace("http://www.someplace.com")



Thanks
 
0
•••
Hello.

I work with SWiSH a lot and have run into this problem before. I know from experience JavaScript is not the answer.

Reading your post, I decided to put my new copy of Visual Basic 6 into action, and made you a startup .exe file.

To make this file work with yours, tell the autorun.inf to run "launch.exe". "launch.exe" is attached in the next reply.

Depending on the screen size, it is programmed to redirect to:
1024x768CD.exe
or
800x600CD.exe

Export your projectors to the CD with this name, and there you go.

I hope this helps. If there is any problems, just ask.

P.S. THE DLL FILE REQUIRED TO RUN IS LOCATED HERE
 
0
•••
launch.exe
has been zipped in this file:
 
0
•••
Thanks Mp)Tarh, I'll try it out and get back to you.
 
0
•••
Mp)Tarh it worked like a charm! Im so happy :) . Thank you "VERY" much!!
If there anything else I need to know about the file I'll get back to you.

Thanks again
 
0
•••
Hi Mp)Tarh,

The file is great, but I was thinking of changing my file names. Im very new at this kind of stuff, is it possible for me to open the file and alter it myself? Im thinking it cant be too hard (I hope?). Ive altered minor things like Javascript & HTMl before, plus it'll be a learning experience. My friend has Visual basic 6, the files are .exe & dll files, how or what program should i use to open & alter it?

Thanks
 
0
•••
When Visual Basic saves programs, they are saved as .vbp files. An .exe file is a compiled .vbp file. You cannot alter .exe files. But if you ever want to change your filenames, I made a variation of the program for you. It is attached in my next post.

Here is what you do to change your filenames.

This .exe requires an extra file on the CD, name it "files.txt". Inside this file should be a simple line of text the looks like this:

file1.exe|file2.exe

Change that line of text to fit your filenames.

I included a sample "files.txt" in the .zip file.

I hope this helps!
 
0
•••
attached in the post below
 
0
•••
 
 
0
•••
Dynadot — .com TransferDynadot — .com Transfer
CatchedCatched

We're social

Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomDB
NameFit
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back