Jump to content
Sign in to follow this  
Klexen

shellexecute or run inputbox accept parameters.

Recommended Posts

Klexen

Basically what I'm trying to do is have my own run box because our work restricts the run box.

I want to be able to type in:

iexplore google.com in the input box

and have it launch google.com

Thanks!

Func RunCommand()
    $RunCommand = InputBox("Run","Type the name of a program, folder, document, or Internet resource, and Windows will open it for you.","","",300,150)
    $RunCommand = "start " & $RunCommand 
    if @error Then
    Else
    run($RunCommand)
    if @error Then
    MsgBox(0,"Error","Could not open.")
    EndIf
EndIf

EndFuncoÝ÷ Øׯz¹¢Ý÷"
-Ý÷jëh×6Func RunCommand()
    $RunCommand = InputBox("Run","Type the name of a program, folder, document, or Internet resource, and Windows will open it for you.","","",300,150)
    if @error Then
    Else
    Run(@ComSpec & ' /c start ' & $RunCommand, "", @SW_HIDE)
    if @error Then
    MsgBox(0,"Error","Could not open.")
    EndIf
EndIf

EndFunc
Edited by Klexen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.