Need a little more help with script

Is DesktopX's implementation of VB script its own entity?

Made a good deal of progress on my first widget. Things are looking a good deal better, but can't seem to find how to solve a couple of problems. I generally understand programming, I'm running into problems especially with Syntax. I tried looking at Microsoft's website for VB script info, but for some reason DesktopX doesn't like the syntax I'm using. I'm trying to implement a Do .. While loop. Can anyone show me an example of one? I also will want to write an ASCII text file save as script. Ideally the user should be allowed to press a button and a save as file dialogue box would appear. Are there any examples of that syntax? Finally, the ActiveX DesktopX Edit Control I'm using falls short especially in one key area - selecting font size and type. The only way I have found to use this edit control is with the default font Arial and 8 pt. type size which is too small. I've tried setting the default in the properties dialogue box displayed when the edit control is selected from the script editor, but any changes made are rejected - except for the multiline option- that one works. Any ideas on how to solve that? Anyway keep up the good work. So far DesktopX is proving to be an excellent product.
4,017 views 11 replies
Reply #1 Top
I found an example of a Do While statement, basically they look like this:

Do While condition

statements

Loop

My other questions remain open though. Thanks for any help you may have.
Reply #2 Top
Hey again!

vbscript with the FileSystemObject has powerful tools for creating and manipulating text files. Using string and array manipulation you should be able to easily split your edit control content for writing to a text file. Here is a page of links to several examples; you'll have to pick and choose which bits you need for your project:
http://www.microsoft.com/technet/scriptcenter/scripts/misc/text/default.mspx

DesktopX and vbscript also have easy file save and browse dialogs. Check out the System.FileSaveDialog() function. I don't know if I gave this link before...I should have:
https://www.stardock.com/products/desktopxenterprise/resources.asp
The Scripting guide in particular is handy, see page 36 for samples of System.FileSaveDialog()

I never miss a chance to plug my own stuff, and this is no exception. My SSMP widget has a script that creates a text file (a playlist). If you import it into DesktopX Builder, right click on the green "Save Playlist" button and examine its script.

The DX ActiveX controls and also the text objects (in my humble out of date opinion) do not consistently accept font attribute settings. I have had luck setting attributes for an ActiveX edit box like this, but really takes experimenting. The key is to set all values as if they were strings--that is in quotes, even when they are integers or bools:


Control.FontSize = "16"
Control.FontBold = "False"
Control.FontName = "Trebuchet MS"


hope that helps,
rr
Reply #3 Top
Another link, to a thread where RomanDA and CerebroJD, et al, firgure out a shorthand for setting font attributes for non-activeX text objects:

http://forums.desktopgadgets.com/index.aspx?ForumID=276&AID=91958
Reply #4 Top
Hey again,

I tink i no watt the problemo is. I don't have DesktopX Enterprise version therefore no Doco. Oh well, How much does it cost to upgrade to Enterprise version? If its not too much I might consider it. I have the version where I can make widgets, but not stand-alone widgets?
Reply #5 Top
I don't know why I was only able to find a page of links like that for the Enterprise edition, but all that info applieas to all versions (except Gadget stuff is Pro only).

The enterprise edition costs thousands of dollars, I believe, and is for companies who want to make whole executable desktops (for example). But the Pro version is only like $80, and the normal standard version (aounds like what you have) is great too.

So, while that page mentions Enterprise edition, the documentation applies to all versions, for the most part. No upgrade should be needed.
Reply #6 Top
The link you gave me is for an enterprise page and everytime I try to access it (download the doco) my Internet explorer shuts down. I just eliminated all my cookies earlier today. How do I acces this page with the Stardock browser, that might do it.
Reply #7 Top
rabidrobot, that link for your SSMP widget has an error in it.  (in firefox anyway) the link ends up being about 3 feet long of gibberish
Reply #8 Top
werewolf, the link works for me in firefox. But I am logged in and the link I gave was to a page on my "personal site" which have been having issues with the site makeover.

Here is a link to the widget on a normal gallery page: https://www.wincustomize.com/ViewSkin.aspx?SID=1&SkinID=632&LibID=34&comments=1

BDBF, I only linked to that Enterprise page because that is the only place I am aware of that has documentation links all together. It's been a while sine I tested those links, though. Sorry. I really don't know where the most up to date, version specific documentation might be, or if it exists. The links are to Word documents and Adobe PDFs. You might have bettter luck Right Click-> Save As
Reply #9 Top
Hey guys and gals. No worries you did great r-clicking and save as did the trick. Thanks everyone. I should now be more self-sufficient. By the way I tried using Stardocks special pink as a background color for a BMP image to have transparency in DesktopX, but no work there. I guess that's only in Windowblinds. I have only MS Paint and a new download of Paint.Net from some college kids out in Washington. It works fairly well, but I don't know much about using that type of software. Don't know how to make transparent layers and save in format that DesktopX will work with but I'll keep trying. Again thanks. By the way no luck yet setting Active X DesktopX Edit Control Font. Maybe some sort of bug there.
Reply #10 Top
DesktopX uses the PNG format for transparency. I guess it might also accept the "magic pink" trick with bitmaps, but that is an old workaround, and PNGs are the way to go.

MSPaint will save as PNG, and I'd wager Paint.Net will also. I haven't used either much, but with my graphics program I create an empty canvas with a "transparent" background. Then I can create my image using varying lavels of transparency via the tools my app provides (Fireworks has all sorts of places one can adjust transparency, I'm sure Paint.Net does too.)

Anyway, experiment with PNG format for easy transparency in DX.
Reply #11 Top
Yep that's what I discovered. Paint.net and png format work fine together. I also found out why my attempt to use the magic pink didn't work, I had the transparency on my object set to 80% and when I loaded the graphic image DesktopX didn't recognize the magic pink background. Thanks for all the help. I've been looking thru both the DXScripting and the Developers' Guide PDF's. Both offer some valuable insights into DesktopX. I still haven't figured out why I can't change the FontSize on my ActiveX edit control. That would improve appearance aspects a good deal. Thanks again.