Jump to content
Sign in to follow this  
Scriptmaster

CMD

Recommended Posts

Scriptmaster

Hey GUIs... I mean guys

take a look at this script I threw together is 3 minutes

Its CMD

you type something in and it executes it and returns the results!

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Hotkeyset("{Enter}", "executerun")
GUICreate("CMD", 600, 400)
GUISetState(@SW_SHOW)
$edit = GUIctrlcreateedit("", 0, 0, 600, 400)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
func executerun()
$runloop = run(GUIctrlread($edit))
GUIctrlsetdata($edit, $runloop)
endfunc

Thought you would be interested.


shutdown(1)

Share this post


Link to post
Share on other sites
JScript

Hello!

Nice idea but not work as expected!

Try this:

#NoTrayIcon
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <Constants.au3>

Local $vDos, $sline = ""

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("CMD", 446, 466, 283, 173)
$Edit1 = GUICtrlCreateEdit("", 8, 8, 433, 385)
GUICtrlSetColor(-1, 0x00FF00)
GUICtrlSetBkColor(-1, 0x000000)
$Group1 = GUICtrlCreateGroup("Command", 8, 400, 433, 57)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("", 16, 424, 337, 21)
GUICtrlSetState(-1, $GUI_FOCUS)
$Button1 = GUICtrlCreateButton("Go Send", 360, 421, 75, 25)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

;----> Create dummy keys for accelerators
$hENTER = GUICtrlCreateDummy()
Dim $AccelKeys[1][2] = [["{ENTER}", $hENTER]] ; Set accelerators
GUISetAccelerators($AccelKeys)
;<----

While 1
        Switch GUIGetMsg()
                Case $GUI_EVENT_CLOSE
                        Exit

                Case $Button1, $hENTER
                        $vDos = Run(@ComSpec & " /c " & GUICtrlRead($Input1), @SystemDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
                        While 1
                                $sline &= StdoutRead($vDos)
                                If @error Then ExitLoop
                        WEnd
                        GUICtrlSetData($Edit1, $sline & @CRLF)
                        GUICtrlSetData($Input1, "")
                        ;----> Reset
                        $sline = ""
                        ;<----
        EndSwitch
WEnd

Regards,

João Carlos.

Edited by JScript

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Share this post


Link to post
Share on other sites
Skitty

I'm pretty interested in this, it would be good to create a UDF that would allow for embedding an interactive command processing window into a gui etc, don't you think so? I've been playing with this but am failing miserably and need to handle what happens when I hold down a key for too long, this is the best I've got for the moment, if anyone wants to help I'd appreciate it.

#NoTrayIcon
#include <Constants.au3>
Global Const $hUSER32 = DllOpen("User32.dll")
Global Const $WS_RESIZABLE = 0x00070000
Global $nMsg
Global $PID
Global Const $aCtrlComnds = _Controls()
Global $temporariis
Global $Statum
Global $reversus
Global $datum
Global $mandatum
Global $claudicatis_operatio = 0
Global $HHook
Global $hKB_Hook
HotKeySet("{BACKSPACE}", "CatchIt")
_SetHooks(1)
$PID = Run(@ComSpec, @WorkingDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1
    $reversus &= StdoutRead($PID)
    If @error Then ExitLoop
WEnd
$temporariis = $reversus
$datum = StringLen($reversus)
OnAutoItExitRegister("_Exit")
Opt("GUIEventOptions", 1)
#region ### START Koda GUI section ### Form=
$Console = GUICreate("CMD", 668, 331, 283, 173, $WS_RESIZABLE)
GUIRegisterMsg(0x0024, "WM_GETMINMAXINFO")
;GUIRegisterMsg(0x0006,"Statum")
GUISetIcon(@SystemDir & "cmd.exe")
$hCMD = GUICtrlCreateEdit("", 0, 0, 666, 327)
GUICtrlSetFont(-1, 9, 600, 0, "lucida console")
GUICtrlSetColor(-1, 0xC0C0C0)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)
GUICtrlSetData($hCMD, $reversus)
#endregion ### END Koda GUI section ###
While 1
    $Statum = WinGetState($Console)
    $nMsg = GUIGetMsg($Console)
    Switch $nMsg
        Case -3
            Exit
    EndSwitch
    Switch $Statum
        Case 15
            HotKeySet("{BACKSPACE}", "CatchIt")
            $claudicatis_operatio = 0
        Case 7
            HotKeySet("{BACKSPACE}")
            $claudicatis_operatio = 1
    EndSwitch
WEnd
Func Exsequor($mandatum)
    $PID = Run(@ComSpec & " /c " & $mandatum, @WorkingDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    While ProcessExists($PID)
        $temporariis &= StdoutRead($PID)
        If @error Then ExitLoop
    WEnd
    $claudicatis_operatio = 0
    Return $temporariis
EndFunc   ;==>Exsequor
Func _SetHooks($Type = False)
    Switch $Type
        Case True
            $hKB_Hook = DllCallbackRegister("_KeyProcess", "long", "int;wparam;lparam")
            If Not $hKB_Hook Then Return SetError(1, 0, False)
            Local $aResult = DllCall("kernel32.dll", "handle", "GetModuleHandleW", "ptr", 0)
            If @error Then Return SetError(2, @error, False)
            $aResult = DllCall($hUSER32, "handle", "SetWindowsHookEx", _
                    "int", 13, _ ; WH_KEYBOARD_LL
                    "ptr", DllCallbackGetPtr($hKB_Hook), _
                    "handle", $aResult[0], _
                    "dword", 0 _
                    )
            If @error Then Return SetError(3, @error, False)
            $HHook = $aResult[0]
    EndSwitch
    Return SetError(0, 0, True)
EndFunc   ;==>_SetHooks
Func _KeyProcess($NCode, $WParam, $LParam)
    Local $aResult
    If $NCode < 0 Then
        $aResult = DllCall($hUSER32, "lresult", "CallNextHookEx", "handle", $HHook, "int", $NCode, "wparam", $WParam, "lparam", $LParam)
        If @error Then Return SetError(@error, @extended, -1)
        Return $aResult[0]
    EndIf
    Local $kcStruc = DllStructCreate("dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo", $LParam)
    If Not $claudicatis_operatio Then
        Switch $WParam
            Case 256
                DllCall($hUSER32, "long", "GetKeyState", "long", 0)
                If Not $claudicatis_operatio Then
                    If DllStructGetData($kcStruc, "vkCode") = 13 Then
                        $claudicatis_operatio = 1
                        $temporariis = Exsequor($mandatum)
                        $mandatum = ""
                        $reversus &= @CRLF & $temporariis
                        $temporariis = $reversus
                        $datum = StringLen($reversus)
                        GUICtrlSetData($hCMD, $reversus)
                        ;_GUICtrlEdit_AppendText($Console, $data)
                    EndIf
                EndIf
            Case Else
                Local $scanCode = DllStructGetData($kcStruc, "scanCode")
                Local $vkCode = DllStructGetData($kcStruc, "vkCode")
                If $aCtrlComnds[$vkCode][1] Then;don't process control characters
                    Local $KeyProcess = DllStructCreate("byte[256];Char")
                    DllCall($hUSER32, "int", "GetKeyboardState", "ptr", DllStructGetPtr($KeyProcess))
                    If @error Then Return SetError(@error, 0, 0)
                    DllCall($hUSER32, "int", "ToAsciiEx", _
                            "uint", $vkCode, _
                            "uint", $scanCode, _
                            "ptr", DllStructGetPtr($KeyProcess, 1), _
                            "ptr", DllStructGetPtr($KeyProcess, 2), _
                            "uint", 0, _
                            "hwnd", "" _
                            )
                    If Not @error Then $mandatum &= DllStructGetData($KeyProcess, 2)
                    $reversus &= DllStructGetData($KeyProcess, 2)
                    $datum = StringLen($reversus)
                    GUICtrlSetData($hCMD, $reversus)
                    ConsoleWrite("$mandatum>" & $mandatum & @CR)
                EndIf
        EndSwitch
    EndIf
    $aResult = DllCall($hUSER32, "lresult", "CallNextHookEx", "handle", $HHook, "int", $NCode, "wparam", $WParam, "lparam", $LParam)
    If @error Then Return SetError(@error, @extended, -1)
    Return $aResult[0]
EndFunc   ;==>_KeyProcess
Func CatchIt()
    If (StringLen(StringTrimRight($temporariis, 1)) <= $datum - 2) Then
        $reversus = StringTrimRight($reversus, 1)
        $datum = StringLen($reversus)
        $mandatum = StringTrimRight($mandatum, 1)
        GUICtrlSetData($hCMD, $reversus)
    EndIf
    Return
EndFunc   ;==>CatchIt
Func WM_GETMINMAXINFO($hwnd, $Msg, $WParam, $LParam)
    Local $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $LParam)
    DllStructSetData($tagMaxinfo, 7, 116) ; min X
    DllStructSetData($tagMaxinfo, 8, 59) ; min Y
    DllStructSetData($tagMaxinfo, 9, 668); max X
    DllStructSetData($tagMaxinfo, 10, @DesktopHeight) ; max Y
    Return 0
EndFunc   ;==>WM_GETMINMAXINFO
Func _Exit()
    _SetHooks()
    DllClose($hUSER32)
    OnAutoItExitUnRegister("_Exit")
    Exit
EndFunc   ;==>_Exit
Func _Controls()
    Local $aVK[223][2] = _;         Key Down            DEC             HEX
            [ _
            ["", True], _       ;   0           00000000
            ["", True], _       ;   1           00000001
            ["", True], _       ;   2           00000002
            ["", True], _       ;   3           00000003
            ["", True], _       ;   4           00000004
            ["", True], _       ;   5           00000005
            ["", True], _       ;   6           00000006
            ["", True], _       ;   7           00000007
            ["[BACK SPACE]", False], _      ;   8           00000008
            ["[TAB]", False], _      ;  9           00000009
            ["", True], _       ;   10          0000000A
            ["", True], _       ;   11          0000000B
            ["[CLEAR]", False], _       ;   12          0000000C
            ["[ENTER]", False], _        ;  13          0000000D
            ["", True], _       ;   14          0000000E
            ["", True], _       ;   15          0000000F
            ["[SHIFT]", False], _        ;  16          00000010
            ["[CTRL]", False], _         ;  17          00000011
            ["[ALT]", False], _      ;  18          00000012
            ["[PAUSE]", False], _       ;   19          00000013
            ["[CAPS LOCK]", False], _       ;   20          00000014
            ["", True], _       ;   21          00000015
            ["", True], _       ;   22          00000016
            ["", True], _       ;   23          00000017
            ["", True], _       ;   24          00000018
            ["", True], _       ;   25          00000019
            ["", True], _       ;   26          0000001A
            ["[ESC]", False], _      ;  27          0000001B
            ["", True], _       ;   28          0000001C
            ["", True], _       ;   29          0000001D
            ["", True], _       ;   30          0000001E
            ["", True], _       ;   31          0000001F
            ["[SPACE]", True], _         ;  32          00000020
            ["[PAGE UP]", False], _     ;   33          00000021
            ['[PAGE DOWN]', False], _       ;   34          00000022
            ["[END]", False], _     ;   35          00000023
            ["[HOME]", False], _        ;   36          00000024
            ["[LEFT ARROW]", False], _      ;   37          00000025
            ["[UP ARROW]", False], _        ;   38          00000026
            ["[RIGHT ARROW]", False], _     ;   39          00000027
            ["[DOWN ARROW]", False], _      ;   40          00000028
            ["", True], _       ;   41          00000029
            ["", True], _       ;   42          0000002A
            ["", True], _       ;   43          0000002B
            ["[PRINT-SCREEN]", False], _        ;   44          0000002C
            ["[INSERT]", False], _      ;   45          0000002D
            ["[DELETE]", False], _      ;   46          0000002E
            ["", True], _       ;   47          0000002F
            ["", True], _       ;   48          00000030
            ["", True], _       ;   49          00000031
            ["", True], _       ;   50          00000032
            ["", True], _       ;   51          00000033
            ["", True], _       ;   52          00000034
            ["", True], _       ;   53          00000035
            ["", True], _       ;   54          00000036
            ["", True], _       ;   55          00000037
            ["", True], _       ;   56          00000038
            ["", True], _       ;   57          00000039
            ["", True], _       ;   58          0000003A
            ["", True], _       ;   59          0000003B
            ["", True], _       ;   60          0000003C
            ["", True], _       ;   61          0000003D
            ["", True], _       ;   62          0000003E
            ["", True], _       ;   63          0000003F
            ["", True], _       ;   64          00000040
            ["", True], _       ;   65          00000041
            ["", True], _       ;   66          00000042
            ["", True], _       ;   67          00000043
            ["", True], _       ;   68          00000044
            ["", True], _       ;   69          00000045
            ["", True], _       ;   70          00000046
            ["", True], _       ;   71          00000047
            ["", True], _       ;   72          00000048
            ["", True], _       ;   73          00000049
            ["", True], _       ;   74          0000004A
            ["", True], _       ;   75          0000004B
            ["", True], _       ;   76          0000004C
            ["", True], _       ;   77          0000004D
            ["", True], _       ;   78          0000004E
            ["", True], _       ;   79          0000004F
            ["", True], _       ;   80          00000050
            ["", True], _       ;   81          00000051
            ["", True], _       ;   82          00000052
            ["", True], _       ;   83          00000053
            ["", True], _       ;   84          00000054
            ["", True], _       ;   85          00000055
            ["", True], _       ;   86          00000056
            ["", True], _       ;   87          00000057
            ["", True], _       ;   88          00000058
            ["", True], _       ;   89          00000059
            ["", True], _       ;   90          0000005A
            ["[L-WINDOWS KEY]", False], _       ;   91          0000005B
            ["[R-WINDOWS KEY]", False], _       ;   92          0000005C
            ["[APP-KEY]", False], _     ;   93          0000005D
            ["", True], _       ;   94          0000005E
            ["", True], _       ;   95          0000005F
            ["", True], _       ;   96          00000060
            ["", True], _       ;   97          00000061
            ["", True], _       ;   98          00000062
            ["", True], _       ;   99          00000063
            ["", True], _       ;   100         00000064
            ["", True], _       ;   101         00000065
            ["", True], _       ;   102         00000066
            ["", True], _       ;   103         00000067
            ["", True], _       ;   104         00000068
            ["", True], _       ;   105         00000069
            ["", True], _       ;   106         0000006A
            ["", True], _       ;   107         0000006B
            ["", True], _       ;   108         0000006C
            ["", True], _       ;   109         0000006D
            ["", True], _       ;   110         0000006E
            ["", True], _       ;   111         0000006F
            ["[F1]", False], _       ;  112         00000070
            ["[F2]", False], _       ;  113         00000071
            ["[F3]", False], _       ;  114         00000072
            ["[F4]", False], _       ;  115         00000073
            ["[F5]", False], _       ;  116         00000074
            ["[F6]", False], _       ;  117         00000075
            ["[F7]", False], _       ;  118         00000076
            ["[F8]", False], _       ;  119         00000077
            ["[F9]", False], _       ;  120         00000078
            ["[F10]", False], _      ;  121         00000079
            ["[F11]", False], _      ;  122         0000007A
            ["[F12]", False], _      ;  123         0000007B
            ["", True], _       ;   124         0000007C
            ["", True], _       ;   125         0000007D
            ["", True], _       ;   126         0000007E
            ["", True], _       ;   127         0000007F
            ["", True], _       ;   128         00000080
            ["", True], _       ;   129         00000081
            ["", True], _       ;   130         00000082
            ["", True], _       ;   131         00000083
            ["", True], _       ;   132         00000084
            ["", True], _       ;   133         00000085
            ["", True], _       ;   134         00000086
            ["", True], _       ;   135         00000087
            ["", True], _       ;   136         00000088
            ["", True], _       ;   137         00000089
            ["", True], _       ;   138         0000008A
            ["", True], _       ;   139         0000008B
            ["", True], _       ;   140         0000008C
            ["", True], _       ;   141         0000008D
            ["", True], _       ;   142         0000008E
            ["", True], _       ;   143         0000008F
            ["[NUM-LOCK]", False], _        ;   144         00000090
            ["[SCROLL LOCK]", False], _     ;   145         00000091
            ["", True], _       ;   146         00000092
            ["", True], _       ;   147         00000093
            ["", True], _       ;   148         00000094
            ["", True], _       ;   149         00000095
            ["", True], _       ;   150         00000096
            ["", True], _       ;   151         00000097
            ["", True], _       ;   152         00000098
            ["", True], _       ;   153         00000099
            ["", True], _       ;   154         0000009A
            ["", True], _       ;   155         0000009B
            ["", True], _       ;   156         0000009C
            ["", True], _       ;   157         0000009D
            ["", True], _       ;   158         0000009E
            ["", True], _       ;   159         0000009F
            ["[L-SHIFT]", False], _     ;   160         000000A0
            ["[R-SHIFT]", False], _     ;   161         000000A1
            ["[L-CTRL]", False], _       ;  162         000000A2
            ["[R-CTRL]", False], _       ;  163         000000A3
            ["[L-ALT]", False], _       ;   164         000000A4
            ["[R-ALT]", False], _       ;   165         000000A5
            ["", True], _       ;   166         000000A6
            ["", True], _       ;   167         000000A7
            ["", True], _       ;   168         000000A8
            ["", True], _       ;   169         000000A9
            ["", True], _       ;   170         000000AA
            ["", True], _       ;   171         000000AB
            ["", True], _       ;   172         000000AC
            ["", True], _       ;   173         000000AD
            ["", True], _       ;   174         000000AE
            ["", True], _       ;   175         000000AF
            ["", True], _       ;   176         000000B0
            ["", True], _       ;   177         000000B1
            ["", True], _       ;   178         000000B2
            ["", True], _       ;   179         000000B3
            ["", True], _       ;   180         000000B4
            ["", True], _       ;   181         000000B5
            ["", True], _       ;   182         000000B6
            ["", True], _       ;   183         000000B7
            ["", True], _       ;   184         000000B8
            ["", True], _       ;   185         000000B9
            ["", True], _       ;   186         000000BA
            ["", True], _       ;   187         000000BB
            ["", True], _       ;   188         000000BC
            ["", True], _       ;   189         000000BD
            ["", True], _       ;   190         000000BE
            ["", True], _       ;   191         000000BF
            ["", True], _       ;   192         000000C0
            ["", True], _       ;   193         000000C1
            ["", True], _       ;   194         000000C2
            ["", True], _       ;   195         000000C3
            ["", True], _       ;   196         000000C4
            ["", True], _       ;   197         000000C5
            ["", True], _       ;   198         000000C6
            ["", True], _       ;   199         000000C7
            ["", True], _       ;   200         000000C8
            ["", True], _       ;   201         000000C9
            ["", True], _       ;   202         000000CA
            ["", True], _       ;   203         000000CB
            ["", True], _       ;   204         000000CC
            ["", True], _       ;   205         000000CD
            ["", True], _       ;   206         000000CE
            ["", True], _       ;   207         000000CF
            ["", True], _       ;   208         000000D0
            ["", True], _       ;   209         000000D1
            ["", True], _       ;   210         000000D2
            ["", True], _       ;   211         000000D3
            ["", True], _       ;   212         000000D4
            ["", True], _       ;   213         000000D5
            ["", True], _       ;   214         000000D6
            ["", True], _       ;   215         000000D7
            ["", True], _       ;   216         000000D8
            ["", True], _       ;   217         000000D9
            ["", True], _       ;   218         000000DA
            ["", True], _       ;   219         000000DB
            ["", True], _       ;   220         000000DC
            ["", True], _       ;   221         000000DD
            ["", True] _            ;   222      000000DE
            ]
    Return $aVK
EndFunc   ;==>_Controls

Edit: it'll run commands etc but I need a way to handle the text that should not show up, like the header data.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

We only need that to show up once and another thing is that after entering some data, every time you enter anything more the thing will throw you scrolling to the top and not let you see what you're typing, I need to fix that...

Edited by ApudAngelorum

Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
Scriptmaster

I'm pretty interested in this, it would be good to create a UDF that would allow for embedding an interactive command processing window into a gui etc, don't you think so? I've been playing with this but am failing miserably and need to handle what happens when I hold down a key for too long, this is the best I've got for the moment, if anyone wants to help I'd appreciate it.

#NoTrayIcon
#include <Constants.au3>
Global Const $hUSER32 = DllOpen("User32.dll")
Global Const $WS_RESIZABLE = 0x00070000
Global $nMsg
Global $PID
Global Const $aCtrlComnds = _Controls()
Global $temporariis
Global $Statum
Global $reversus
Global $datum
Global $mandatum
Global $claudicatis_operatio = 0
Global $HHook
Global $hKB_Hook
HotKeySet("{BACKSPACE}", "CatchIt")
_SetHooks(1)
$PID = Run(@ComSpec, @WorkingDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
While 1
    $reversus &= StdoutRead($PID)
    If @error Then ExitLoop
WEnd
$temporariis = $reversus
$datum = StringLen($reversus)
OnAutoItExitRegister("_Exit")
Opt("GUIEventOptions", 1)
#region ### START Koda GUI section ### Form=
$Console = GUICreate("CMD", 668, 331, 283, 173, $WS_RESIZABLE)
GUIRegisterMsg(0x0024, "WM_GETMINMAXINFO")
;GUIRegisterMsg(0x0006,"Statum")
GUISetIcon(@SystemDir & "cmd.exe")
$hCMD = GUICtrlCreateEdit("", 0, 0, 666, 327)
GUICtrlSetFont(-1, 9, 600, 0, "lucida console")
GUICtrlSetColor(-1, 0xC0C0C0)
GUICtrlSetBkColor(-1, 0x000000)
GUISetState(@SW_SHOW)
GUICtrlSetData($hCMD, $reversus)
#endregion ### END Koda GUI section ###
While 1
    $Statum = WinGetState($Console)
    $nMsg = GUIGetMsg($Console)
    Switch $nMsg
        Case -3
            Exit
    EndSwitch
    Switch $Statum
        Case 15
            HotKeySet("{BACKSPACE}", "CatchIt")
            $claudicatis_operatio = 0
        Case 7
            HotKeySet("{BACKSPACE}")
            $claudicatis_operatio = 1
    EndSwitch
WEnd
Func Exsequor($mandatum)
    $PID = Run(@ComSpec & " /c " & $mandatum, @WorkingDir, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
    While ProcessExists($PID)
        $temporariis &= StdoutRead($PID)
        If @error Then ExitLoop
    WEnd
    $claudicatis_operatio = 0
    Return $temporariis
EndFunc   ;==>Exsequor
Func _SetHooks($Type = False)
    Switch $Type
        Case True
            $hKB_Hook = DllCallbackRegister("_KeyProcess", "long", "int;wparam;lparam")
            If Not $hKB_Hook Then Return SetError(1, 0, False)
            Local $aResult = DllCall("kernel32.dll", "handle", "GetModuleHandleW", "ptr", 0)
            If @error Then Return SetError(2, @error, False)
            $aResult = DllCall($hUSER32, "handle", "SetWindowsHookEx", _
                    "int", 13, _ ; WH_KEYBOARD_LL
                    "ptr", DllCallbackGetPtr($hKB_Hook), _
                    "handle", $aResult[0], _
                    "dword", 0 _
                    )
            If @error Then Return SetError(3, @error, False)
            $HHook = $aResult[0]
    EndSwitch
    Return SetError(0, 0, True)
EndFunc   ;==>_SetHooks
Func _KeyProcess($NCode, $WParam, $LParam)
    Local $aResult
    If $NCode < 0 Then
        $aResult = DllCall($hUSER32, "lresult", "CallNextHookEx", "handle", $HHook, "int", $NCode, "wparam", $WParam, "lparam", $LParam)
        If @error Then Return SetError(@error, @extended, -1)
        Return $aResult[0]
    EndIf
    Local $kcStruc = DllStructCreate("dword vkCode;dword scanCode;dword flags;dword time;ulong_ptr dwExtraInfo", $LParam)
    If Not $claudicatis_operatio Then
        Switch $WParam
            Case 256
                DllCall($hUSER32, "long", "GetKeyState", "long", 0)
                If Not $claudicatis_operatio Then
                    If DllStructGetData($kcStruc, "vkCode") = 13 Then
                        $claudicatis_operatio = 1
                        $temporariis = Exsequor($mandatum)
                        $mandatum = ""
                        $reversus &= @CRLF & $temporariis
                        $temporariis = $reversus
                        $datum = StringLen($reversus)
                        GUICtrlSetData($hCMD, $reversus)
                        ;_GUICtrlEdit_AppendText($Console, $data)
                    EndIf
                EndIf
            Case Else
                Local $scanCode = DllStructGetData($kcStruc, "scanCode")
                Local $vkCode = DllStructGetData($kcStruc, "vkCode")
                If $aCtrlComnds[$vkCode][1] Then;don't process control characters
                    Local $KeyProcess = DllStructCreate("byte[256];Char")
                    DllCall($hUSER32, "int", "GetKeyboardState", "ptr", DllStructGetPtr($KeyProcess))
                    If @error Then Return SetError(@error, 0, 0)
                    DllCall($hUSER32, "int", "ToAsciiEx", _
                            "uint", $vkCode, _
                            "uint", $scanCode, _
                            "ptr", DllStructGetPtr($KeyProcess, 1), _
                            "ptr", DllStructGetPtr($KeyProcess, 2), _
                            "uint", 0, _
                            "hwnd", "" _
                            )
                    If Not @error Then $mandatum &= DllStructGetData($KeyProcess, 2)
                    $reversus &= DllStructGetData($KeyProcess, 2)
                    $datum = StringLen($reversus)
                    GUICtrlSetData($hCMD, $reversus)
                    ConsoleWrite("$mandatum>" & $mandatum & @CR)
                EndIf
        EndSwitch
    EndIf
    $aResult = DllCall($hUSER32, "lresult", "CallNextHookEx", "handle", $HHook, "int", $NCode, "wparam", $WParam, "lparam", $LParam)
    If @error Then Return SetError(@error, @extended, -1)
    Return $aResult[0]
EndFunc   ;==>_KeyProcess
Func CatchIt()
    If (StringLen(StringTrimRight($temporariis, 1)) <= $datum - 2) Then
        $reversus = StringTrimRight($reversus, 1)
        $datum = StringLen($reversus)
        $mandatum = StringTrimRight($mandatum, 1)
        GUICtrlSetData($hCMD, $reversus)
    EndIf
    Return
EndFunc   ;==>CatchIt
Func WM_GETMINMAXINFO($hwnd, $Msg, $WParam, $LParam)
    Local $tagMaxinfo = DllStructCreate("int;int;int;int;int;int;int;int;int;int", $LParam)
    DllStructSetData($tagMaxinfo, 7, 116) ; min X
    DllStructSetData($tagMaxinfo, 8, 59) ; min Y
    DllStructSetData($tagMaxinfo, 9, 668); max X
    DllStructSetData($tagMaxinfo, 10, @DesktopHeight) ; max Y
    Return 0
EndFunc   ;==>WM_GETMINMAXINFO
Func _Exit()
    _SetHooks()
    DllClose($hUSER32)
    OnAutoItExitUnRegister("_Exit")
    Exit
EndFunc   ;==>_Exit
Func _Controls()
    Local $aVK[223][2] = _;         Key Down            DEC             HEX
            [ _
            ["", True], _       ;   0           00000000
            ["", True], _       ;   1           00000001
            ["", True], _       ;   2           00000002
            ["", True], _       ;   3           00000003
            ["", True], _       ;   4           00000004
            ["", True], _       ;   5           00000005
            ["", True], _       ;   6           00000006
            ["", True], _       ;   7           00000007
            ["[BACK SPACE]", False], _      ;   8           00000008
            ["[TAB]", False], _      ;  9           00000009
            ["", True], _       ;   10          0000000A
            ["", True], _       ;   11          0000000B
            ["[CLEAR]", False], _       ;   12          0000000C
            ["[ENTER]", False], _        ;  13          0000000D
            ["", True], _       ;   14          0000000E
            ["", True], _       ;   15          0000000F
            ["[SHIFT]", False], _        ;  16          00000010
            ["[CTRL]", False], _         ;  17          00000011
            ["[ALT]", False], _      ;  18          00000012
            ["[PAUSE]", False], _       ;   19          00000013
            ["[CAPS LOCK]", False], _       ;   20          00000014
            ["", True], _       ;   21          00000015
            ["", True], _       ;   22          00000016
            ["", True], _       ;   23          00000017
            ["", True], _       ;   24          00000018
            ["", True], _       ;   25          00000019
            ["", True], _       ;   26          0000001A
            ["[ESC]", False], _      ;  27          0000001B
            ["", True], _       ;   28          0000001C
            ["", True], _       ;   29          0000001D
            ["", True], _       ;   30          0000001E
            ["", True], _       ;   31          0000001F
            ["[SPACE]", True], _         ;  32          00000020
            ["[PAGE UP]", False], _     ;   33          00000021
            ['[PAGE DOWN]', False], _       ;   34          00000022
            ["[END]", False], _     ;   35          00000023
            ["[HOME]", False], _        ;   36          00000024
            ["[LEFT ARROW]", False], _      ;   37          00000025
            ["[UP ARROW]", False], _        ;   38          00000026
            ["[RIGHT ARROW]", False], _     ;   39          00000027
            ["[DOWN ARROW]", False], _      ;   40          00000028
            ["", True], _       ;   41          00000029
            ["", True], _       ;   42          0000002A
            ["", True], _       ;   43          0000002B
            ["[PRINT-SCREEN]", False], _        ;   44          0000002C
            ["[INSERT]", False], _      ;   45          0000002D
            ["[DELETE]", False], _      ;   46          0000002E
            ["", True], _       ;   47          0000002F
            ["", True], _       ;   48          00000030
            ["", True], _       ;   49          00000031
            ["", True], _       ;   50          00000032
            ["", True], _       ;   51          00000033
            ["", True], _       ;   52          00000034
            ["", True], _       ;   53          00000035
            ["", True], _       ;   54          00000036
            ["", True], _       ;   55          00000037
            ["", True], _       ;   56          00000038
            ["", True], _       ;   57          00000039
            ["", True], _       ;   58          0000003A
            ["", True], _       ;   59          0000003B
            ["", True], _       ;   60          0000003C
            ["", True], _       ;   61          0000003D
            ["", True], _       ;   62          0000003E
            ["", True], _       ;   63          0000003F
            ["", True], _       ;   64          00000040
            ["", True], _       ;   65          00000041
            ["", True], _       ;   66          00000042
            ["", True], _       ;   67          00000043
            ["", True], _       ;   68          00000044
            ["", True], _       ;   69          00000045
            ["", True], _       ;   70          00000046
            ["", True], _       ;   71          00000047
            ["", True], _       ;   72          00000048
            ["", True], _       ;   73          00000049
            ["", True], _       ;   74          0000004A
            ["", True], _       ;   75          0000004B
            ["", True], _       ;   76          0000004C
            ["", True], _       ;   77          0000004D
            ["", True], _       ;   78          0000004E
            ["", True], _       ;   79          0000004F
            ["", True], _       ;   80          00000050
            ["", True], _       ;   81          00000051
            ["", True], _       ;   82          00000052
            ["", True], _       ;   83          00000053
            ["", True], _       ;   84          00000054
            ["", True], _       ;   85          00000055
            ["", True], _       ;   86          00000056
            ["", True], _       ;   87          00000057
            ["", True], _       ;   88          00000058
            ["", True], _       ;   89          00000059
            ["", True], _       ;   90          0000005A
            ["[L-WINDOWS KEY]", False], _       ;   91          0000005B
            ["[R-WINDOWS KEY]", False], _       ;   92          0000005C
            ["[APP-KEY]", False], _     ;   93          0000005D
            ["", True], _       ;   94          0000005E
            ["", True], _       ;   95          0000005F
            ["", True], _       ;   96          00000060
            ["", True], _       ;   97          00000061
            ["", True], _       ;   98          00000062
            ["", True], _       ;   99          00000063
            ["", True], _       ;   100         00000064
            ["", True], _       ;   101         00000065
            ["", True], _       ;   102         00000066
            ["", True], _       ;   103         00000067
            ["", True], _       ;   104         00000068
            ["", True], _       ;   105         00000069
            ["", True], _       ;   106         0000006A
            ["", True], _       ;   107         0000006B
            ["", True], _       ;   108         0000006C
            ["", True], _       ;   109         0000006D
            ["", True], _       ;   110         0000006E
            ["", True], _       ;   111         0000006F
            ["[F1]", False], _       ;  112         00000070
            ["[F2]", False], _       ;  113         00000071
            ["[F3]", False], _       ;  114         00000072
            ["[F4]", False], _       ;  115         00000073
            ["[F5]", False], _       ;  116         00000074
            ["[F6]", False], _       ;  117         00000075
            ["[F7]", False], _       ;  118         00000076
            ["[F8]", False], _       ;  119         00000077
            ["[F9]", False], _       ;  120         00000078
            ["[F10]", False], _      ;  121         00000079
            ["[F11]", False], _      ;  122         0000007A
            ["[F12]", False], _      ;  123         0000007B
            ["", True], _       ;   124         0000007C
            ["", True], _       ;   125         0000007D
            ["", True], _       ;   126         0000007E
            ["", True], _       ;   127         0000007F
            ["", True], _       ;   128         00000080
            ["", True], _       ;   129         00000081
            ["", True], _       ;   130         00000082
            ["", True], _       ;   131         00000083
            ["", True], _       ;   132         00000084
            ["", True], _       ;   133         00000085
            ["", True], _       ;   134         00000086
            ["", True], _       ;   135         00000087
            ["", True], _       ;   136         00000088
            ["", True], _       ;   137         00000089
            ["", True], _       ;   138         0000008A
            ["", True], _       ;   139         0000008B
            ["", True], _       ;   140         0000008C
            ["", True], _       ;   141         0000008D
            ["", True], _       ;   142         0000008E
            ["", True], _       ;   143         0000008F
            ["[NUM-LOCK]", False], _        ;   144         00000090
            ["[SCROLL LOCK]", False], _     ;   145         00000091
            ["", True], _       ;   146         00000092
            ["", True], _       ;   147         00000093
            ["", True], _       ;   148         00000094
            ["", True], _       ;   149         00000095
            ["", True], _       ;   150         00000096
            ["", True], _       ;   151         00000097
            ["", True], _       ;   152         00000098
            ["", True], _       ;   153         00000099
            ["", True], _       ;   154         0000009A
            ["", True], _       ;   155         0000009B
            ["", True], _       ;   156         0000009C
            ["", True], _       ;   157         0000009D
            ["", True], _       ;   158         0000009E
            ["", True], _       ;   159         0000009F
            ["[L-SHIFT]", False], _     ;   160         000000A0
            ["[R-SHIFT]", False], _     ;   161         000000A1
            ["[L-CTRL]", False], _       ;  162         000000A2
            ["[R-CTRL]", False], _       ;  163         000000A3
            ["[L-ALT]", False], _       ;   164         000000A4
            ["[R-ALT]", False], _       ;   165         000000A5
            ["", True], _       ;   166         000000A6
            ["", True], _       ;   167         000000A7
            ["", True], _       ;   168         000000A8
            ["", True], _       ;   169         000000A9
            ["", True], _       ;   170         000000AA
            ["", True], _       ;   171         000000AB
            ["", True], _       ;   172         000000AC
            ["", True], _       ;   173         000000AD
            ["", True], _       ;   174         000000AE
            ["", True], _       ;   175         000000AF
            ["", True], _       ;   176         000000B0
            ["", True], _       ;   177         000000B1
            ["", True], _       ;   178         000000B2
            ["", True], _       ;   179         000000B3
            ["", True], _       ;   180         000000B4
            ["", True], _       ;   181         000000B5
            ["", True], _       ;   182         000000B6
            ["", True], _       ;   183         000000B7
            ["", True], _       ;   184         000000B8
            ["", True], _       ;   185         000000B9
            ["", True], _       ;   186         000000BA
            ["", True], _       ;   187         000000BB
            ["", True], _       ;   188         000000BC
            ["", True], _       ;   189         000000BD
            ["", True], _       ;   190         000000BE
            ["", True], _       ;   191         000000BF
            ["", True], _       ;   192         000000C0
            ["", True], _       ;   193         000000C1
            ["", True], _       ;   194         000000C2
            ["", True], _       ;   195         000000C3
            ["", True], _       ;   196         000000C4
            ["", True], _       ;   197         000000C5
            ["", True], _       ;   198         000000C6
            ["", True], _       ;   199         000000C7
            ["", True], _       ;   200         000000C8
            ["", True], _       ;   201         000000C9
            ["", True], _       ;   202         000000CA
            ["", True], _       ;   203         000000CB
            ["", True], _       ;   204         000000CC
            ["", True], _       ;   205         000000CD
            ["", True], _       ;   206         000000CE
            ["", True], _       ;   207         000000CF
            ["", True], _       ;   208         000000D0
            ["", True], _       ;   209         000000D1
            ["", True], _       ;   210         000000D2
            ["", True], _       ;   211         000000D3
            ["", True], _       ;   212         000000D4
            ["", True], _       ;   213         000000D5
            ["", True], _       ;   214         000000D6
            ["", True], _       ;   215         000000D7
            ["", True], _       ;   216         000000D8
            ["", True], _       ;   217         000000D9
            ["", True], _       ;   218         000000DA
            ["", True], _       ;   219         000000DB
            ["", True], _       ;   220         000000DC
            ["", True], _       ;   221         000000DD
            ["", True] _            ;   222      000000DE
            ]
    Return $aVK
EndFunc   ;==>_Controls

Edit: it'll run commands etc but I need a way to handle the text that should not show up, like the header data.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

We only need that to show up once and another thing is that after entering some data, every time you enter anything more the thing will throw you scrolling to the top and not let you see what you're typing, I need to fix that...

Wow that is great I have been playing about with fonts a bit, I will tell which one later.

shutdown(1)

Share this post


Link to post
Share on other sites
Skitty

Wow that is great I have been playing about with fonts a bit, I will tell which one later.

It's pretty damn strange and annoying as F**** that what works on windows 7 performs differently on windows XP, I switched to XP just now to test it and noticed a lot more doesn't work.


Things that I've done..

Icon Resource Editor: icon resource editor 

AutoIt Piano: a piano

AutoIt Unlocker: unlocks files when you want to delete them

Colorful tooltips: a wrapper for the tool tips UDF

Rouge GoogleBot: a full screen animation

ASciTE text editor: a text editor written in autoit

Warning: Posts by this user are subject to change or may disappear without notice.

Share this post


Link to post
Share on other sites
Scriptmaster

Strange.

I will use XP on Monday as I will be at school on computers that are not fit for running explorer.exe!

It is a great chance to debug scripts.


shutdown(1)

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  

  • Similar Content

    • VollachR
      By VollachR
      I'm quite new to AutoIT and I have a very big batch file that I'm trying to completely re-write in Autoit, so far it's been going well but I got stuck with a certain part, hope someone can help.
      Here's the part of the batch script I'm currently stuck re-creating in AutoIT:
          :BeginLangMenu     if "%OptNum%" gtr "0" goto ShowLangMenu          ::Next Section code based on code supplied by Aacini from stackoverflow.com     :DefineLangMenu     for /L %%D in (1,1,99) do (        if exist Common\Settings\Data%%D.ini for /F "eol=# tokens=1,2 delims==" %%a in (Common\Settings\Data%%D.ini) do (                set line=%%a           if "!line:~2,5!" neq "clude" (              REM Define "normal" variables, i.e. Compressor, Method, etc.              set %%a=           ) else if "!line:~7!" neq "" (                   REM Define the base array elements, i.e. D1IncludeAR=%%b, D1ExcludeAR=%%b, ...              set D%%D%%a=%%b                   REM Set Show?? array elements with value equal 1, i.e. ShowAR=1, ...              REM when anyone of DiInclude?? or DiExclude?? corresponding elements was given              if defined D%%D%%a set Show!line:~7!=1                )        )     )          REM Define a list of language abbreviations, i.e. "langs=AR CZ DE ..."     REM and the corresponding language names array, i.e. lang[AR]=Arabic, ...     REM At same time, calculate original OptNum          for %%a in ("AR=Arabic" "CZ=Czech" "DE=German" "EN=English" "ES=Spanish" "ESMX=Spanish(Mexico)"                 "FR=French" "HU=Hungarian" "IT=Italian" "JP=Japanese" "KR=Korean" "PL=Polish"                 "PR=Portuguese" "PRBR=Portuguese(Brazil)" "RU=Russian" "ZH=Chinese") do (        for /F "tokens=1,2 delims==" %%b in (%%a) do (           set "langs=!langs! %%b"           set "lang[%%b]=%%c"           set /A "OptNum+=Show%%b"             )     )          ::NEXT 2 SECTIONS DISPLAYS THE LANGUAGE SELECTION MENU IF APPLICABLE     :ShowLangMenu     set /a step=%step%+1     :LangMenu     if "%OptNum%"=="0" Goto checksplit     echo %TIME:~0,2%:%TIME:~3,2%:%TIME:~6,2% - Showing Language Selection Menu >> "%workdir%Conversion.log"     REM Show the language menu     set #=0     for %%a in (%langs%) do (        if defined Show%%a (           set /A #+=1     rem       echo [!#!] !lang[%%a]!           echo !lang[%%a]! >> %b2eincfilepath%\Lang.txt           set "option[!#!]=%%a"         )     )               %MYFILES1%\DROPDOWNBOX.exe /F:"%b2eincfilepath%\Lang.txt" "Choose Which Language to Compress" "STEP %step%: Language Selection"  /W:280 /RI /C:13 >nul > %b2eincfilepath%\LangAnswer.txt     if %ERRORLEVEL% EQU 0 del %b2eincfilepath%\LangAnswer.txt     if exist %b2eincfilepath%\LangAnswer.txt set /p "SelectLang="<%b2eincfilepath%\LangAnswer.txt     if not defined SelectLang goto LangError     if %SelectLang%==Arabic Set LangOpt=AR     if %SelectLang%==Czech set LangOpt=CZ     if %SelectLang%==German set LangOpt=DE     if %SelectLang%==English set LangOpt=EN     if %SelectLang%==Spanish set LangOpt=ES     if %SelectLang%==Spanish(Mexico) set LangOpt=ESMX     if %SelectLang%==French set LangOpt=FR     if %SelectLang%==Hungarian set LangOpt=HU     if %SelectLang%==Italian set LangOpt=IT     if %SelectLang%==Japanese set LangOpt=JP     if %SelectLang%==Korean set LangOpt=KR     if %SelectLang%==Polish set LangOpt=PL     if %SelectLang%==Portuguese set LangOpt=PR     if %SelectLang%==Portuguese(Brazil) set LangOpt=PRBR     if %SelectLang%==Russian set LangOpt=RU     if %SelectLang%==Chinese set LangOpt=ZH     if defined SelectLang Goto LangSet          ::SETS THE LANGUAGE SELECTION ACCORDING TO USER INPUT IN LANGUAGE MENU     :LangSet     set "LangIs=%LangOpt%"  
      Basically, here's what I need to do:
       Read from specific section of INI file but ONLY the Keys that have a Value. OR: A way to remove the keys without the values from the Array created by IniReadSection. A way to then take these stored values, and create a list of Languages based last 2-4 characters of the Key names. At this point, that said list is shown to user in DropDown box, after user make selection I need a way to move the Value of the Key related to the selected Language to a Variable, and ONLY the value for that specific Language. That's it basically, the rest is more or less Variable manipulation which isn't a problem.
      A little Example:
      My INI file have a Section like this:
      [LangInclude] IncludeAR=a IncludeCZ= IncludeDE=b IncludeEN= IncludeES=c IncludeESMX= IncludeFR= IncludeHU=d IncludeIT= IncludeJP= IncludeKR=e IncludePL= IncludePR= IncludePRBR= IncludeRU= IncludeZH= I need to get Only the keys that are set, in this case: IncludeAR, IncludeDE, IncludeES, IncludeHU & IncludeKR.
      I then need to convert these to a list of languages, in this example it will be (Arabic, German, Spanish, Hungarian, Korean).
      That list will be turned to DropDown selection, that I can do easily once I get the list correctly.
      After the user Selected, let us say for the example purpose Spanish, I need the Value of IncludeES to be moved into a Variable, like this: $Var=c
      I hope somebody can help me because I'm stuck after Importing the INI section with IniReadSection, everything I tried so far failed, the best I managed to do is Sort the array to have all the keys with values either at the first rows or last rows.
      I need some ideas.
      Help appreciated.
      Thanks
       
    • TheSaint
      By TheSaint
      TeraCopy Timer - A program of mine, front end really, that I have been working on (on & off) for some time, but not shared here before, that I recall. Third party program TeraCopy is required.
      Many of you will be familiar with TeraCopy, and it has been discussed here at AF on several occasions, in various sub forums, including Chat.
      BE ADVISED - I still use an older version of TeraCopy (v2.27), a goody but an oldy, so have only tested my program with that. It may work with the newer v3.xx, or may be easily adjusted to do so, but I have not yet gone that route. Likewise, I only use it with Win 7 and Win XP, but I don't imagine there should be any issues with newer Windows. Add to that, my program being devised and created in AutoIt v3.3.0.0.
      So what is TeraCopy Timer and why might you need it?
      --------------------------------------------------------------------------------------
      Those familiar with TeraCopy use, know you can run multiple copy or move jobs either simultaneously or concurrently (one immediately after another has finished). With the free version at least, you have no control over precise order or timing, and no way to deal (without manual interaction) with the pesky Thumbs.db files in Win XP. TeraCopy Timer allows you to do all those things, and in a batch fashion.
      --------------------------------------------------------------------------------------
      Some screenshots and brief explanation
      Main Window
      Minimalist Window
      This new WAIT feature is the simplest and best way to use the program generally (in my view) ... but check out the following, as it is not always the case.
      Advanced Delay Window
      WARNING - It should go without saying, that you take all the usual precautions. For instance, don't use move with the only copy you have of precious files. BACKUP BACKUP BACKUP! Don't hold me liable for anything, except for being a nice guy who likes to share.
      TeraCopy Timer v2.8.zip  (see detail at Post #34)
      Enjoy!
      OLDER DOWNLOADS
      P.S. I am not affiliated in any way with those who created and provide the excellent third party program - TeraCopy.
    • nacerbaaziz
      By nacerbaaziz
      Hi dear
      With this script you can print Unicode text in the CMD screen
      the script is  easy to use
      just you  write the text that contains Unicode in the first input
      and the script automatically reflect the code in the second input
       you can copy the text to the clipboard
      or you can try printing the text in the CMD window
      I apologize to everyone for colors and shape if not appropriate
      I'm a blind man and I do not see
      Thank you for your understanding
      Greetings to all of youCmdUtM.au3
    • Simpel
      By Simpel
      Hi.
      Thanks to this post (https://www.autoitscript.com/forum/topic/189553-writing-to-cmd/?do=findComment&comment=1361142) I can now write a helpfile to the cmd when for instance passing parameter -h or -help at cmd. But then cmd is blocked by the script (I had to free it with CTRL+BREAK):
      #include <WinAPI.au3> _WinAPI_AttachConsole() $hConsole = _WinAPI_GetStdHandle(1) _WinAPI_WriteConsole($hConsole, "Print helpfile................" & @CRLF) Inside MSDN Library then I found this sentence: A process can use the FreeConsole function to detach itself from its console.
      But I don't find something like _WinAPI_FreeConsole(). How can I do it in another way?
      Regards, Conrad
    • TheAutomator
      By TheAutomator
      A fullscreen console with custom commands!

      Introduction:
      Hi everyone!
      This funny project started as a question in the help section:
      https://www.autoitscript.com/forum/topic/174404-edit-detect-key-before-updating-content/
      I'd like to share this script with everyone that is interested. 
       
      Why would I want it?
      You like the old style fullscreen console (like in the old day's), You can add custom commands, You can customize the font a lot more compared to cmd.exe, You can share ideas or add tweaks to the script.  
      Still to do:
      Write a simple custom programming language to implement this tool. Writing a little help file / pdf to describe my little programming language. Add little sound effects like a beep if there is a syntax error (optional). Clean up and modify Console.Au3 content. Add an option to have to type a login password (optional). Make an optional installer that also gives scripts for this tool a custom icon and open with command. ...Call Neo?  
      Thanks to:
      xxaviarxx: debugging, some ideas. jguinch: debugging, adding a bunch of tweaks and ideas. kylomas: debugging, new ideas.  
      Edits and updates:
      Added usage of tab key in edit control Edit has focus now on startup I'm currently rewriting a simple custom programming language to implement this tool.  
      UDF download: Console.au3
       
      Regards
      TheAutomator
×