Using Custom Files

Widgets and Flash

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?
3,546 views 7 replies
Reply #1 Top

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]

Reply #2 Top
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 Top
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"
Reply #4 Top
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
Reply #5 Top
(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 Top
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
Reply #7 Top
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