ASP4HS Home

Asp4Hs: Articles
Script technique to Launch an Exe from HomeSite

[ Asp4Hs | Add-On's List | Articles | WishList | Links | Tips/FAQs | Submissions ]

This script illustrates how to launch an application from HomeSite using a script and passing a parameter to the application.

The original desire was to set up a number of small scripts to all for toolbar buttons to launch various applications with a variety of parameters. Since you can't assign keystroke shortcuts to toolbar buttons, Bernard looked for a way to use scripts, which can be run either from toolbar buttons or from keystroke shortcuts.

Note: The following technique was written up by Bernard Nirlo on the HomeSite forum in these threads (1) (2). Copied, edited and posted here and to the Tips library.

sub Main()

Dim WshShell, appli, Command
Set WshShell = CreateObject("WScript.Shell")

command = "save"
appli = "C:\Program Files\MyApp\MyApplic.exe " & command

Set oExec = WshShell.Exec(appli)

end sub

Modify the script for your own application paths or your own parameters.

Now you can make one script per command, assign a shortcut AND an icon for each.

Credit to Bernard Nirlo, edited by Jeff Wilkinson

Other resources: