Scripting question

Sunday, July 16, 2006 by Jaramia | Discussion: DesktopX

How can u open 2 or more programs with one shortcut... ex. opening a window blind and a cursor or an object dock theme??
dragonmage
Reply #1 Monday, July 17, 2006 12:51 AM
I guess you could make a batch file to do that.
thomassen
Reply #2 Monday, July 17, 2006 4:17 AM
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
ZubaZ
Reply #3 Monday, July 17, 2006 7:56 AM
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
thomassen
Reply #4 Monday, July 17, 2006 8:22 AM
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.
rabidrobot
Reply #5 Monday, July 17, 2006 1:18 PM
CerebroJD set up a wiki just last week. http://scratchpad.wikia.com/wiki/DesktopX

The "Includes" article is by me!
thomassen
Reply #6 Monday, July 17, 2006 1:40 PM
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.
ZubaZ
Reply #7 Monday, July 17, 2006 1:57 PM
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.
thomassen
Reply #8 Monday, July 17, 2006 2:17 PM
That should be a big ol' news item. Very cool. Thanks.

I second that!
Jaramia
Reply #9 Monday, July 17, 2006 2:34 PM
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?
ZubaZ
Reply #10 Monday, July 17, 2006 2:50 PM
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?  
thomassen
Reply #11 Monday, July 17, 2006 2:55 PM
  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
ZubaZ
Reply #12 Monday, July 17, 2006 2:59 PM
I threw an error when I tried to launch a app with spaces in it's name/path. Watch out for that.
thomassen
Reply #13 Monday, July 17, 2006 3:09 PM
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!)
Jaramia
Reply #14 Monday, July 17, 2006 3:50 PM
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
Jaramia
Reply #15 Monday, July 17, 2006 3:58 PM
ok where do u find the wba.'s for skins that automatically come with window blinds? (ex. Aura)
thomassen
Reply #16 Monday, July 17, 2006 4:32 PM
Look in the skin's folder in the where you installed WindowBlinds.

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!



web-wc01