Jump to content

Windows GUI on dos command line


Recommended Posts

Hi,

here is a try

#include "GuiConstants.au3"
#include "Constants.au3"

GuiCreate("DOS Box", 800, 600, -1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$ctrlEdit_Output = GUICtrlCreateEdit("", 0, 0, 800, 575, _
    BitOR($ES_READONLY, $WS_VSCROLL, $WS_HSCROLL, $ES_AUTOVSCROLL, $ES_AUTOHSCROLL))
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlSetColor(-1, 0xFFFFFF)
    GUICtrlSetFont(-1, 9, 5000)
$ctrlInput_Input=GuiCtrlCreateInput("", 0, 575, 720, 25)
    GUICtrlSetFont(-1, 9, 5000)
    GUICtrlSetState(-1, $GUI_FOCUS);Natürlich muß der Focus in die Eingabezeile :D
$ctrlButton_Send=GuiCtrlCreateButton("Start", 720, 575, 80, 25, $BS_DEFPUSHBUTTON)

GuiSetState()

Do
    Switch GuiGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $ctrlButton_Send
            $Result=Run(@ComSpec &" /c " &GUICtrlRead($ctrlInput_Input), "", @SW_HIDE, $STDERR_CHILD+$STDOUT_CHILD)
            $Msg=GUICtrlRead($ctrlEdit_Output) &@CrLf
            Do
                $Erg=StdOutRead($Result)
                $Fehler=@Error
                If Not $Fehler Then
                    $Msg&=$Erg &@CrLf
                EndIf
            Until $Fehler
            $Erg=StdOutRead($Result)
            GUICtrlSetData($ctrlEdit_Output, $Msg)
    EndSwitch
Until 0

found here : http://autoit.aufwaerts.de/thread.php?threadid=1650

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to post
Share on other sites

Hi,

I guess that might be difficult. Couldn't you write the whole app with Autoit? Interacting with a DosBox isn't easy with Autoit.

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...