Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re-write VBScript as JScript

    I got this Flash detection script from PPK's site (http://www.xs4all.net/~ppk/js/index..../js/flash.html).

    I've been trying to implement it in a JavaScript Library (*.js) using document.write to write the VBScript, but I've been having problems getting it to work.

    Is there any way to rewrite the following Microsoft VBScript code as Miscrosoft JScript code?

    Code:
    <SCRIPT LANGUAGE="VBScript">
    
    on error resume next
    
    If MSDetect = "true" Then
    	For i = 2 to 6
    		If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then
    
    		Else
    			flashinstalled = 2
    			flashversion = i
    		End If
    	Next
    End If
    
    If flashinstalled = 0 Then
    	flashinstalled = 1
    End If
    
    </SCRIPT>
    I'd appreciate any suggestions.

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.

  • #2
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts
    *bump*

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    a guess

    if (new Object("ShockwaveFlash.ShockwaveFlash.4")) {
    alert('installed')
    }

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I think you'd need to loop through the version numbers

  • #5
    Regular Coder Skyzyx's Avatar
    Join Date
    Aug 2002
    Location
    Silicon Valley, CA
    Posts
    980
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creator of SimplePie and Tarzan AWS, co-founder of WarpShare, co-built the Y! Messenger website, usability-focused, and an INFJ personality.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •