Jump to content

Help with Run external Program


Riz
 Share

Recommended Posts

I have got HELP file which is located at the same folder, but when i click the button always sad "Unable to execute the external program"

#include <GuiConstants.au3>

GuiCreate("MyGUI", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Button_1 = GuiCtrlCreateButton("Button1", 150, 100, 100, 30)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button_1
        Run(@ScriptDir & "\KHA.chm", "", @SW_MAXIMIZE)
    Case Else
    ;;;
    EndSelect
WEnd
Exit
Link to comment
Share on other sites

you gotta run the help file viewer first then the help file as a command line argument. or use the dos "start" command then your help file then it should run.

Like this:

$file = @scriptdir & "\KHA.chm"

run("start " & $file)

Edited by spyrorocks
Link to comment
Share on other sites

you gotta run the help file viewer first then the help file as a command line argument. or use the dos "start" command then your help file then it should run.

Like this:

$file = @scriptdir & "\KHA.chm"

run("start " & $file)

Thanks for you fast reply but same problem

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...