Using Custom Files

Widgets and Flash

Monday, November 14, 2005 by ZubaZ | Discussion: DesktopX

I ahve an object that uses the MS Web Browser ActiveX control to pull a Flash file into a browser.

It works great when I use an absolute path in the script to the file(e.g Control.Navigate2 "c:\flashfile.swf" but when I attached the file using the "Custom File" option and change the script to read
Control.Navigate2 "%objectdir%\virtual-bubblewrap-distv1.1.swf" it fails. I get an IE window that indicates that the file can't be found.

Any ideas where I am going wrong?
milksama
Reply #1 Monday, November 14, 2005 1:48 PM

Unfortunately we do not officially support anything user created. If you do not receive a response here, you might want to try posting in the OS Customization forums.

You could try verifying that %objectdir% is a valid variable (that it contains what you would expect it to).

-Mike
[Stardock Support]

ZubaZ
Reply #2 Monday, November 14, 2005 2:27 PM
You could try verifying that %objectdir% is a valid variable (that it contains what you would expect it to).


Stardock Devloper's guide: https://www.stardock.com/products/desktopx/documentation/index.html
My object uses the componants described in the Scripting | ActivX section and Creating Objects | Custom Files section.

Is there another way to confirm %objectdir% ?

rabidrobot
Reply #3 Monday, November 14, 2005 2:48 PM
I have had success with a different method using Object.Directory

Here's typical routine to replace a default file if it is missing, maybe you can adapt:


Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(workFolder & "Default.png") = False Then
objFSO.CopyFile Object.Directory & "Default.png", workFolder & "Default.png"
End If


The path returned by Object.Directory includes a trailing slash. The Object.Directory is destroyed when the gadget is closed--do not use it to store data.

hth, rr

EDIT: Note that "workFolder" in the snippet had been assigned a path value also, but I neglected to include that line. Your code may look like this:
Control.Navigate2 Object.Directory & "virtual-bubblewrap-distv1.1.sw"
ZubaZ
Reply #4 Monday, November 14, 2005 3:33 PM
I have had success with a different method using Object.Directory


I'll give it a try when I get home. Thanks for the tip.

(Oh, and nice Frapper pic. LOL)


Posted via WinCustomize Browser/Stardock Central
rabidrobot
Reply #5 Monday, November 14, 2005 4:13 PM
(Oh, and nice Frapper pic. LOL)



Yeh. That is OLD. I wasn't sure what type image they wanted, went with a tiny gif I made like 3 years ago. Tried to use a diff pic afterward, but first one stuck.
ZubaZ
Reply #6 Monday, November 14, 2005 4:47 PM
I cheated and useda pic of my youngest daughters. You can see them in Kingwwod, TX (outside of Houston).

Posted via WinCustomize Browser/Stardock Central
ZubaZ
Reply #7 Monday, November 14, 2005 5:08 PM
I have had success with a different method using Object.Directory


I'll give it a try when I get home. Thanks for the tip.


Worked like a charm. And I learned something new. Thanks RR


Posted via WinCustomize Browser/Stardock Central

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01