[advanced search]
Results from the most recent live auction are here.
22 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Domain Name Industry Newsletter
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 11-27-2003, 12:53 AM   · #1
Rhino1616
NamePros Member
 
Trader Rating: (0)
Join Date: Jan 2003
Posts: 53
NP$: 81.00 (Donate)
Rhino1616 is an unknown quantity at this point
How do you detect resolution & launch an app with javascript?

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


Please register or log-in into NamePros to hide ads
Rhino1616 is offline   Reply With Quote
Old 11-27-2003, 11:28 AM   · #2
Rhino1616
NamePros Member
 
Trader Rating: (0)
Join Date: Jan 2003
Posts: 53
NP$: 81.00 (Donate)
Rhino1616 is an unknown quantity at this point
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
Rhino1616 is offline   Reply With Quote
Old 11-27-2003, 01:27 PM   · #3
deadserious
Senior Member
 
Trader Rating: (13)
Join Date: Aug 2002
Posts: 1,300
NP$: 2.85 (Donate)
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
Didn't you already figure this out here:

http://webdesigntalk.net/showthread...=&threadid=1332

Or is there something else you're trying to do?
deadserious is offline   Reply With Quote
Old 11-27-2003, 01:51 PM   · #4
Rhino1616
NamePros Member
 
Trader Rating: (0)
Join Date: Jan 2003
Posts: 53
NP$: 81.00 (Donate)
Rhino1616 is an unknown quantity at this point
Im assuming that only applied to web format. I thought web & producing .exe CD_ROM's are configured differently?
Rhino1616 is offline   Reply With Quote
Old 11-27-2003, 02:00 PM   · #5
deadserious
Senior Member
 
Trader Rating: (13)
Join Date: Aug 2002
Posts: 1,300
NP$: 2.85 (Donate)
deadserious has a spectacular aura aboutdeadserious has a spectacular aura about
Doesn't your cd rom contain html? What type of file exactly are you trying to launch depending on the resolution?
deadserious is offline   Reply With Quote
Old 11-27-2003, 02:47 PM   · #6
Rhino1616
NamePros Member
 
Trader Rating: (0)
Join Date: Jan 2003
Posts: 53
NP$: 81.00 (Donate)
Rhino1616 is an unknown quantity at this point
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
Rhino1616 is offline   Reply With Quote
Old 12-01-2003, 12:23 AM   · #7
Rhino1616
NamePros Member
 
Trader Rating: (0)
Join Date: Jan 2003
Posts: 53
NP$: 81.00 (Donate)
Rhino1616 is an unknown quantity at this point
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
Rhino1616 is offline   Reply With Quote
Old 12-01-2003, 04:57 AM   · #8
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
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
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-01-2003, 04:58 AM   · #9
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
launch.exe
has been zipped in this file:
Attached Files
File Type: zip launch.zip (3.8 KB, 7 views)
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-01-2003, 10:20 AM   · #10
Rhino1616
NamePros Member
 
Trader Rating: (0)
Join Date: Jan 2003
Posts: 53
NP$: 81.00 (Donate)
Rhino1616 is an unknown quantity at this point
Thanks Mp)Tarh, I'll try it out and get back to you.
Rhino1616 is offline   Reply With Quote
Old 12-01-2003, 10:47 AM   · #11
Rhino1616
NamePros Member
 
Trader Rating: (0)
Join Date: Jan 2003
Posts: 53
NP$: 81.00 (Donate)
Rhino1616 is an unknown quantity at this point
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
Rhino1616 is offline   Reply With Quote
Old 12-02-2003, 12:43 PM   · #12
Rhino1616
NamePros Member
 
Trader Rating: (0)
Join Date: Jan 2003
Posts: 53
NP$: 81.00 (Donate)
Rhino1616 is an unknown quantity at this point
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
Rhino1616 is offline   Reply With Quote
Old 12-04-2003, 05:03 PM   · #13
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
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!
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-04-2003, 05:09 PM   · #14
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
attached in the post below
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Old 12-04-2003, 05:10 PM   · #15
Mp)Tarh
....what?
 
Mp)Tarh's Avatar
 
Location: Ontario, Canada
Trader Rating: (0)
Join Date: Aug 2003
Posts: 101
NP$: 171.00 (Donate)
Mp)Tarh is an unknown quantity at this point
 
Attached Files
File Type: zip launch.zip (4.7 KB, 8 views)
__________________
Yeah... I knew that. What?
Mp)Tarh is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Hunting Moon EscrowDNS Website Header Design
Advertise your business at NamePros
All times are GMT -7. The time now is 09:44 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0