Scripting question

How can u open 2 or more programs with one shortcut... ex. opening a window blind and a cursor or an object dock theme??
7,961 views 16 replies
Reply #2 Top
Function Object_OnLButtonUp(x, y, Dragged)
If Not Dragged Then
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "app_nr1"
objShell.Run "app_nr2"
End If
End Function
Reply #3 Top
Function Object_OnLButtonUp(x, y, Dragged)
If Not Dragged Then
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "app_nr1"
objShell.Run "app_nr2"
End If
End Function


Sweet!

I wish there was a library for scripts like these? Or a WIKI . . . or something.

GreenReaper? RomanDA? CereboJD? [ . . . anyone but me? ]


Posted via WinCustomize Browser/Stardock Central
Reply #4 Top
hmm.... A wiki would be interesting. Anyone know how to get a wiki and set it up?

I know there's a section for script objects, but I think it'd be more useful for an area where you could actually read the scripts. If I get time I might be able to set something up. But at the moment I'm somewhat busy as I'm preparing to move to London.
Reply #5 Top
CerebroJD set up a wiki just last week. http://scratchpad.wikia.com/wiki/DesktopX

The "Includes" article is by me!
Reply #6 Top
That include article was very interesting. I'll have to look into that. Looks like it might be a very useful thing for one of my projects. I've been hoping for a similar behaviour like that.
Reply #7 Top
CerebroJD set up a wiki just last week. Link

The "Includes" article is by me!


That should be a big ol' news item. Very cool. Thanks.

I like your include segment. It might be a cool idea to link to a WC object that uses the code.
Reply #8 Top
That should be a big ol' news item. Very cool. Thanks.

I second that!
Reply #9 Top
Sorry im not very farmiliar with...well anything so i dont quite know all about scripts and im not sure how to make a batch file... any help?
Reply #10 Top
well anything so i dont quite know all about scripts and im not sure how to make a batch file... any help?


So . . would it be better to retitle your request to "Will someone make me [something]that will open these two shortcuts?"  
Because . . . the script posted, when customized, and inserted in a DX object . . . will do what you asked.

What do you know about DX builder?
What shortcuts do you want?
Are you willing to learn?  
Reply #11 Top
  1. Create an object
  2. In the Script section of the Properties window that appear when you created the object, click "new"
  3. Paste the following code:
Function Object_OnLButtonUp(x, y, Dragged)
If Not Dragged Then
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "notepad.exe"
objShell.Run "calc.exe"
objShell.Run "charmap.exe"
End If
End Function

This will start Notepad, Calculator and Character Map. Change the filename to any program you want and add/remove as many objShell.Run lines you want to fit your need. Did that help
Reply #12 Top
I threw an error when I tried to launch a app with spaces in it's name/path. Watch out for that.
Reply #13 Top
hm.. yea, that's true. Forgot about that. The only workaround I found for that is to enclose the string with Chr(34). It's the ASCII code for the quote " symbol.

Function Object_OnLButtonUp(x, y, Dragged)
    If Not Dragged Then
        Dim objShell
        Set objShell = CreateObject("WScript.Shell")
        objShell.Run Chr(34) & "C:\Program Files\Stardock\SDCentral\BACKUP\eula.txt" & Chr(34)
    End If
End Function

The reason is that otherwise it'll break down the string and think that it should execute "C:\Program" with the argument "Files\Stardock\SDCentral\BACKUP\eula.txt"


(ARGH! the WYSIWYG Editor is really buggy. Too often eats what I try to post!)
Reply #14 Top
well my sort of idea is to creat buttons that can change the cursor, wb , destop theme and object dock all at once...im playing around with the scripts given, thanks

ill post again if i have any problems
Reply #15 Top
ok where do u find the wba.'s for skins that automatically come with window blinds? (ex. Aura)
Reply #16 Top
Look in the skin's folder in the where you installed WindowBlinds.