Sign in to follow this  
Followers 0
earl82

GUI for DOS

7 posts in this topic

Hi i am new to this forum and am still new to autoit.

I am trying to make a GUI for PC DOS or MS DOS.

Can any one help me in the right direction?

Share this post


Link to post
Share on other sites



You cant make a GUI for DOS because it is a command line system. My understanding of OS's that old is not great, however you could make something similar to a GUI with your typical characters? Something like as follows I guess:

╔══════════════════════════╗

║ Example text-GUI for DOS ║

║ ║

║ Lorem Ipsum and all that ║

╚══════════════════════════╝

╔══════════╗ ╔══════════╗

║ Button 1 ║ ║ Button 2 ║

╚══════════╝ ╚══════════╝

Something like that I guess?

Oh well, there is my response on the matter. Sorry if I didnt help that much.

shanet


[font="Comic Sans MS"]My code does not have bugs! It just develops random features.[/font]My Projects[list][*]Live Streaming (Not my project, but my edited version)[right]AutoIt Wrappers![/right][/list]Pure randomness[list][*]Small Minds.......................................................................................................[size="1"]Simple progress bar that changes direction at either sides.[/size][*]ChristmasIt AutoIt Christmas Theme..........................................................[size="1"]I WAS BOOOORED![/size][*]DriveToy..............................................................................................................[size="1"]Simple joke script. Trick your friends into thinking their computer drive is haywire![/size][/list]In Development[list][*]Your Background Task Organiser[*]AInstall Second Generation[/list]BEFORE POSTING ON THE FORUMS, TRY THIS:
%programfiles%/AutoIt3/autoit3.chm

Share this post


Link to post
Share on other sites

AutoIt is WINDOWS based and Windows must load to use it.


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

thanks for all the help i under stand now. :x

Share this post


Link to post
Share on other sites

I am trying to make a GUI for PC DOS or MS DOS.

R U shure you are running Dos only?

Because if you are on Windows and only want to access the DOS commands from a Windows Gui you can.


Share this post


Link to post
Share on other sites

Making menus in DOS is fairly easy.

You can accomplish most of what you want through simple batch file scripting.

http://http-server.carleton.ca/~dmcfet/menu.html

http://www.google.com/search?q=make+menu+in+dos

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I am confused. Do you want to run a GUI from DOS or do you want to make a DOS GUI that runs in Windows? :)

EDIT: If it's the latter, then maybe this might get you started:

$GUI_Form1=GUICreate("Command Prompt Sim", @DesktopWidth*.8, @DesktopHeight*.8)
$GUI_Edit1=GUICtrlCreateEdit(@CRLF, 0, 0, @DesktopWidth*.8, @DesktopHeight*.8, 2102468) ;BitOR($ES_AUTOVSCROLL,$ES_OEMCONVERT,$ES_AUTOHSCROLL,$ES_WANTRETURN,$ES_MULTILINE,$WS_VSCROLL))
GUICtrlSetFont(-1, 14, 800, 0, "Courier New")
GUICtrlSetBkColor(-1, 0xEFEDC9)
GUICtrlSetColor(-1, 0x0000A6)
GUISetState()
$dos=Run(@ComSpec & " /k ", "", @SW_HIDE, 7)
$send=""
$def_dir=""

While 1
    $nMsg=GUIGetMsg()
    $dosgetout=StdoutRead($dos)
    $doserrgetout=StderrRead($dos)
    If $nMsg=-3 Then ExitLoop
    $tmp=GUICtrlRead($GUI_Edit1)
    If $dosgetout OR $doserrgetout Then
        If $dosgetout AND $dosgetout<>$send Then
            GUICtrlSetData($GUI_Edit1, $tmp & $dosgetout)
        Else
            If $doserrgetout<>$Send Then GUICtrlSetData($GUI_Edit1, $tmp & $doserrgetout)
        EndIf
        DllCall("user32.dll", "int", "SendMessage", "hwnd", GUICtrlGetHandle($GUI_Edit1), "int", 182, "wparam", 0, "lparam", 1000000)
    EndIf
    If GetEnter() Then
        $send=StringMid($tmp, StringInStr($tmp, @CRLF, 0, -2))
        $send=StringMid($send, StringInStr($send, ">")+1)
        If StringLen($send)>2 Then StdInWrite($dos, $send)
    EndIf
WEnd
ProcessClose($dos)



Func GetEnter()

If IsDeclared("key_timer") AND TimerDiff($key_timer)<50 Then Return
Global $key_timer = TimerInit()
$g_temp = DllCall("user32.dll", "long", "GetAsyncKeyState", "long", 13)
If BitAND($g_temp[0], 0x8000) = 0x8000 Then Return 1
Return 0

EndFunc

Cheers ;)

Edited by OldCoder

"Intelligence is the ability to adapt to change."                                      - Stephen Hawking                                        "...not the ability to exploit others."                                                  - OldCoder

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  
Followers 0