Jump to content
Sign in to follow this  
au3scr

Input

Recommended Posts

au3scr

Its the main part of terminal but how i can read full input?

I need it for save function

#include <GUIConstants.au3>
#include <GUIEdit.au3>
HotKeySet ("{enter}", "read_func")
HotKeySet ("^{NUMPADADD}", "IncreaseFont")
HotKeySet ("^{NUMPADSUB}", "DecreaseFont")
;~ HotKeySet ("^{mousewheelup}", "IncreaseFont")
;~ HotKeySet ("^{Mousewheeldown}", "DecreaseFont")
#include <GUIConstants.au3>
#include <GUIEdit.au3>
$line = 1
$FontSize = 12
$Form1 = GUICreate ("Terminal", 499, 274, 201, 116, BitOr($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX))
$fsize = 10
GUISetCursor (7)
$CommandInput = GUICtrlCreateEdit ("", 0, 0, 497, 273, BitOR ($ES_AUTOVSCROLL, $ES_AUTOHSCROLL, $ES_WANTRETURN, $WS_VSCROLL, $WS_MAXIMIZEBOX, $WS_MINIMIZEBOX))
GUICtrlSetData (-1, "shell:")
GUICtrlSetFont (-1, $fsize, 500, 0, "Terminal")
GUICtrlSetColor (-1, 0xFFFFFF)
GUICtrlSetBkColor (-1, 0x000000)

GUISetState()

While 1
    $msg = GUIGetMsg ()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd
func help ()
    WinActivate("Terminal")
    Send("Type commands for help")
EndFunc

Func read_func()
    $line = _GUICtrlEdit_GetLineCount ($CommandInput) - 1
    $Input = _GUICtrlEdit_GetLine ($CommandInput, $line)
    $command = StringTrimLeft ($Input, 6)
    $Say = StringInStr ($command, "say")
    $Exit = StringInStr ($command, "exit")
    $sysinfo = StringInStr ($command, "sys")
    $ipconfig = StringInStr ($command, "ipconfig")
    $ping = StringInStr ($command, "ping")
    $run = StringInStr ($command, "run")
    $play = StringInStr ($command, "play")
    $kill = StringInStr ($command, "kill")
    $delfile = StringInStr ($command, "delfile")
    $soundvol = StringInStr ($command, "soundvol")
    $diskfree = StringInStr ($command, "diskfree")
    $tcmd = StringInStr ($command, "tcmd")
    $transparent = StringInStr ($command, "transparent")
    $untrans = StringInStr ($command, "untrans")
    $aptgetupdate = StringInStr ($command, "aptgetupdate")
    $FileCopy= StringInStr ($command, "filecopy")
    $dirCopy= StringInStr ($command, "dircopy")
    $filemove= StringInStr ($command, "filemove")
    $commands= StringInStr ($command, "commands")
    $attribget= StringInStr ($command, "attribget")
    $attribset= StringInStr ($command, "attribset")
    $winminimizeall= StringInStr ($command, "winminimizeall")
    If $Say Then

Share this post


Link to post
Share on other sites
stampy

to read the entire thing you would just use GUICtrlRead($commandinput)

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.