#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2001
    Location
    Ohio, USA
    Posts
    7
    Rep Power
    0

    Opening a File - Emulating Double Click


    I know that this probably isn't the right forum, but there is no other relevant forum for my question - I'm coding in VBScript as a custom addition to a piece of software, and was wondering if there is any method to open files (i.e. emulating a double-click in windows).

    Thanks in advance for any help you can provide.
  2. #2
  3. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 1999
    Location
    Trondheim, Norway.
    Posts
    1
    Rep Power
    0
    Hi

    I don't know about VBScript, but in Windows, the name for the thing is ShellExec or ShellExecute. Try searching the docs on those.

    If you can run commands, the command "start" has been around for a while. You can give a command "start something" and if that something is a file, it's the same as doubleclicking on it.

    Examples:
    start http://www.devshed.com
    start c:\temp\test.pdf
    start \\someserver\someshare\somefile.doc
    and so on...

IMN logo majestic logo threadwatch logo seochat tools logo