...

View Full Version : File Checking



ghell
04-03-2003, 03:24 PM
I know the sticky post by the admin said that I should know what javascript can or cannot do before I post here, but please consider my question anyway.

I wanted to make a script to check for an installed font component on the user's computer to see if they have the font that I am using, and if not, display a link to the font with some info on it.

Can this be done using Java, Javascript or ASP??? If it can be done in ASP then i will post in the ASP forum so as to not clog this one up with a useless post ;)

Please post if it can be done with any, and if it can, which one(s) and, if possible, how i can access the information I need

Thanks for any help

joh6nn
04-03-2003, 09:44 PM
i know for certain that it cannot be done with javascript, and i'm pretty sure that it can't be done with java or asp, but not positive of that

ghell
04-04-2003, 08:55 AM
Well, I know that something like this CAN be done because when you try to use some java applets it checks to see if you have the correct SUN JAVA version (if you want to see this, look at RuneScape (http://www.runescape.com))
I dont know if fonts are in the registry or anything though.

liorean
04-04-2003, 09:43 AM
That's different - those use internal features of the Java VM. Java can't access the client filesystem from an applet. It's possible there's some interface that allows Java to determine whether the font you want is available or not, but that will rely on whaterver information the OS is willing to hand the VM.

ghell
04-04-2003, 11:17 AM
Well, I was only giving an example of what I wanted to do roughly. I was just hoping some of the more advanced coders would know how to do it or if it DEFINATELY wasn't possible with ANY language such as those mentioned, that can be put online.

arnyinc
04-04-2003, 01:09 PM
The following page has an example, and if you keep clicking the red arrows it gives a very involved explanation.

http://www.webreference.com/dhtml/column30/index.html

I don't have any specific pointers since I never used this script or tutorial, but they seem to cover it in great detail.

ghell
04-04-2003, 01:15 PM
Thanks a lot m8:D finally, someone who knows what they are talking about and was willing to help.
I owe you one (but i probably won't pay up, lol)

joh6nn
04-04-2003, 09:13 PM
1)props to arnyinc for finding that.

2)
... there are no built-in DHTML and JavaScript methods to identify installed fonts on a user's system ...liorean and i were right; there is no built in way to do this. these guys came up with a hack for it. a clever hack, but a hack nonetheless.

3)
Originally posted by ghell
finally, someone who knows what they are talking about and was willing to help.that's not a very friendly thing to say

ghell
04-09-2003, 05:27 PM
im guna drift off topic 'cos arnyinc answered my question

why isnt it a nice thing to say anyway??? only one person gave me a method of doing what i wanted to do, and i was thanking him. he knew what he was talking about because he knew how to do it. you didnt know how to do it :p
also the method used is NOT A HACK ... ur a moderator and you dont even know what a hack is ... how stupid is that (not you, THAT)
It checks the size that the font takes up to see if it works.. and that is a hack because..... exactly, it isn't!!

MUBNET
05-11-2003, 06:27 AM
Ohh!There's a problem.You can't use JavaScript while you want to remote control etc. the files.You can use VBScript.

Sample:
<Script Language="VBScript">
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.fileExists("X:\MyDocument.doc")) then
MsgBox "OK",0,""
Else
MsgBox "Sorry",0,""
End If
</Script>

Hoşçakal!*

*= It means bye in our language.

mordred
05-11-2003, 12:35 PM
Originally posted by ghell
also the method used is NOT A HACK ... ur a moderator and you dont even know what a hack is ... how stupid is that (not you, THAT)
It checks the size that the font takes up to see if it works.. and that is a hack because..... exactly, it isn't!!

Seems like you have a different understanding of what a hack is than others, for example me. Judging from the elaborate description at http://info.astrian.net/jargon/Hacker_Folklore/The_Meaning_of_Hack.html this font detecting would qualify as a hack. At least for me. ;)
Have you another definition for "hack" and "hacking"? Oh, and that script doesn't work in Mozilla. Duh.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum