Using Custom Files
Widgets and Flash
Monday, November 14, 2005 by ZubaZ | Discussion: DesktopX
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?
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% ?

Reply #3 Monday, November 14, 2005 2:48 PM
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"
Reply #4 Monday, November 14, 2005 3:33 PM
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.

Reply #6 Monday, November 14, 2005 4:47 PM
Reply #7 Monday, November 14, 2005 5:08 PM
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!







You can see them in Kingwwod, TX (outside of Houston).
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]