# Function Reference

# GUISetHelp

Sets an executable file that will be run when F1 is pressed.

GUISetHelp ( helpfile [, winhandle] )

## Parameters

helpfile | file that will be run if F1 is pressed when the GUI is active.
winhandle | [optional] Windows handle as returned by GUICreate() (default is the previously used window).

## Return Value

Success: | 1.
Failure: | 0.

## Related

GUICreate

## Example

    #include <GUIConstantsEx.au3>

    Example()

    Func Example()
        ; X64 running support
        Local $sWow64 = ""
        If @AutoItX64 Then $sWow64 = "\Wow6432Node"

        Local $hGUI = GUICreate("Example")

        Local $sAutoItInstallDir = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE" & $sWow64 & "\AutoIt v3\AutoIt", "InstallDir")
        If Not @error Then
            GUISetHelp('hh.exe "' & $sAutoItInstallDir & '\AutoIt.chm"')
        EndIf

        ; Display the GUI.
        GUISetState(@SW_SHOW, $hGUI)

        ; Loop until the user exits.
        While 1
            Switch GUIGetMsg()
                Case $GUI_EVENT_CLOSE
                    ExitLoop

            EndSwitch
        WEnd

        GUIDelete()
    EndFunc   ;==>Example