I've been working on some DesktopX objects that involve quite a bit of scripting and I just ran into what could be a major problem for the current project (a drag and drop shortcut dockbar). Is it true that a shortcut type object doesn't expose the actual shortcut path to the script engine? The documentation for the object namespace doesn't mention this item.

This leaves me looking at having the script run the shortcut directly (not sure if that's possible either). Any help or suggestions would be greatly appreciated.

In addition, it would be real nice if the ActiveX controls would respond appropriately to tab keystroke when included in a parent object.

...

Comments
on May 26, 2005
To execute a command:

Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run(strCommands)
Set WshShell = Nothing


Here, the strCommands is a variable with the path to the file you want to run, or any other command valid for the Run method.
You might want to do some error catching there with On Error Resume Next (Look it up in the documentation if you are not familiar with it.)
on May 26, 2005
Thomas, thanks for the suggestion. However, the .Exec method seems to be a better choice, since (at least in my system) the .Run method doesn't seem to be able to deal with paths that contain spaces. The .Exec funtion works as long as I dereference any shortcuts that are dropped. This is not bad since .CreateShortcut and then .TargetPath will give what I need.
on May 27, 2005
Ah, for paths with spaces, use WshShell.Run(chr(34) & strCommands & chr(34))
That should append a quote infront and behind your command.
on May 28, 2005
Thanks again Thomas. I'm too spoiled by having worked in C and C++ for so long that I'm not used to dealing with so many unknowns about basic stuff

BTW, would you be interested in checking out the object I'm working on when I get it ready for testing?
on May 29, 2005
Sure, I can have a look. But I might be rather busy until wednesday as I have a project deadline comming up.

I'm too spoiled by having worked in C and C++

I wish I could do C. I've looked at it, but I've realised it'd something you have to invest a little bit more time in than, VB, JS and PHP. Though, at the moment I'm reading a book about C#.

The only reason why I knew that you'd have to append a quote character is that I'm currently working on a Console like widget. Had to find out how to the the Run method to work.
on May 29, 2005
Thomas, or anyone -
Is there anyway that you know of to get access to a program file's icon resource from within a DX script? I know I can do it for shortcut files, but I can't seem to find any reference to how to with the actual exe file. Since I don't have access to a shortcut object that gets dropped, I want to create my own image based shortcut (text based is easy) but I would like to be able to default the image to the current file icon.

Thanks
on May 30, 2005
I've been thinking of making an object where I need to the same thing actually. I haven't tried, but I'll have a look when I've completed my project. I wonder if it can be loaded like windows does. Say if you want icon number 3 from the explorer.exe file you refer to it like this: "C:\windows\explorer.exe,3". Not sure if that'll work. Might have to use an ActiveX or COM control. I wonder if it's possible to use the Imagelist ocx control (from the Commom Control Library)... I've used that in VB applications, but I'm not sure if it can be used in DX scripting.
on May 31, 2005
I found something that looks like it may work, but haven't had time yet to try it. Check it out: Link

He has a lot of interesting script stuff.