testingtest Posted May 24, 2007 Posted May 24, 2007 expandcollapse popup#include <GUIConstants.au3> #include <Misc.au3> #include <File.au3> #Include <GuiEdit.au3> Global $Console , $Main HotKeySet("`" , "_Send") $Main = "Console" $Font = "Courier New" $Gui = GUICreate($Main , 629, 403, 193, 115) GUISetIcon( "shell32.dll", 42) $Console = GUICtrlCreateEdit("" , 4, 4, 621, 369, $ES_READONLY + $WS_VSCROLL + $ES_AUTOHSCROLL, 0 ) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetFont( -1, 9, 400, 4, $Font) GUICtrlSetColor(-1, 0xFFFFFF) $Command = GUICtrlCreateInput("", 4, 376, 621, 21, -1, 0) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetFont( -1, 9, 400, 4, $Font) GUICtrlSetColor(-1, 0xFFFFFF) GUISetState(@SW_SHOW) _ConsoleWrite("You are logged as: " & @UserName & @CRLF & "Computer: " & @ComputerName & @CRLF & "IP Address: " & @IPAddress1 & @CRLF & "Administrator Rights: " & _Admin() & @CRLF & "Help: Type Help then hit ` to send the command to the console") While 1 $Msg = GuiGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE ExitLoop ;Case ;;; EndSelect WEnd Func _Admin() If IsAdmin() = 1 Then $Admin = "True" Else $Admin = "False" EndIf Return $Admin EndFunc Func _ConsoleWrite($Text) GUICtrlSetData($Console , $Text & @CRLF) EndFunc Func _Send() If GUICtrlRead($Command) = "" Then GUICtrlSetData($Console , GUICtrlRead($Console) & @CRLF & ">" & @CRLF) Else _ConsoleWrite(GUICtrlRead($Console) & @CRLF & GUICtrlRead($Command)) _Read() GUICtrlSetData($Command , "") EndIf EndFunc Func _Read() If GUICtrlRead($Command) = "Help" Then _ConsoleWrite("Help - takes you here to view all the commands" & @CRLF & "Clear - clears the console" & @CRLF & "Cls - clears the console" & @CRLF & "Beep(Frequency , Duration) - plays back a beep noise , example beep(500, 1000)" & @CRLF & "Win Chat - opens microsofts chatting service" & @CRLF & "Notepad - opens microsofts text editor" & @CRLF & "Cal - opens microsofts calculator" & @CRLF & "Paint - opens microsofts paint brush" & @CRLF & "Ip - tells you your current ip" & @CRLF & "Computer name - tells you the computer name" & @CRLF & "User name - tells you the logged on user name" & @CRLF & "Logon Domain - logon domain" & @CRLF & "Logon DNS Domain - logon dns domain" & @CRLF & "Logon Server - logon server" & @CRLF & "OSTYPE - returns WIN32_NT for NT/2000/XP/2003 and returns WIN32_WINDOWS for 95/98/Me" & @CRLF & "Desktop Size - returns the height and width of desktop" & @CRLF & "Talk(Word or text here) - repeats the word withing the brackets" & @CRLF & "Voice on - repeats command typed in and reads the consoles actions" & @CRLF & "Voice off - shuts off voice" & @CRLF & "Connection - tells you if your online" & @CRLF & "Cmd:command - to use the classic command prompt , example cmd:msg * hello" & @CRLF & "Cmd2:command - makes a batch file to bypass work places such as school or work" & @CRLF & "Cd Tray(C:) - opens or closes a cd tray or type all to open or close all trays" & @CRLF & "Trans() - makes a window transparent 0-255 , example trans(150)" & @CRLF & "Transparent() - makes a window transparent 0-255 , example transparent(150)" & @CRLF & "Pic - takes a picture of the current screen hides the console" & @CRLF & "Picture - takes a picture of the current screen hides the console" & @CRLF & "ClipPut(value) - writes text to the clipboard" & @CRLF & "ClipGet() - retrieves text from the clipboard" & @CRLF & "DirCreate(path) - creates a directory/folder , example dircreate(c:\myfolder)" & @CRLF & "FileGetSize(console.exe) - returns file size in bytes" & @CRLF & "FileWrite() - writes a file , example FileWrite(C:\myfile.txt , this is my line of text)" & @CRLF & "SoundSetWaveVolume(50) - sets the wave volume 0-100" & @CRLF & "SoundPlay(myfile.wav) - play a sound file" & @CRLF & "Run() - runs an external program , example Run(notepad.exe)" & @CRLF & "ProcessList() - list all processes" & @CRLF & "ProcessClose() - close a process , example ProcessClose(notepad.exe)" & @CRLF & "Net Messenger On - enables net send" & @CRLF & "Net Messenger Off - disable net send" & @CRLF & "OS Serial - shows you your serial for your copy of windows 2000 and xp only" & @CRLF & "Credits - credits of who made console" & @CRLF & "Exit - exits console") endfunc
mrbond007 Posted May 24, 2007 Posted May 24, 2007 This is very interesting Projects : Space Regain - Memory Fusion - PWGT - Chip-ITGames : BrainPain - BrainPain Director's Cut - ProSpeed Games Pack (New)Vista vs XP : the forbidden fight
MrCreatoR Posted May 25, 2007 Posted May 25, 2007 (edited) Wow, nice idea, here is some improvments: expandcollapse popup#include <GUIConstants.au3> #include <Misc.au3> #include <File.au3> #Include <GuiEdit.au3> Global $Console, $Main Global $SupportedCommandsArr[50] = [43, "?", "Help", "Clear", "Cls", "Beep", "Win Chat", "Notepad", "Cal", "Paint", "Ip", "Computer name", "User name", "Logon Domain", "Logon DNS Domain", "Logon Server", "OSTYPE", "Desktop Size", "Talk", "Voice on", "Voice off", "Connection", "Cmd:", "Cmd2:", "Cd Tray", "Trans", "Transparent", "Pic", "Picture", "ClipPut", "ClipGet", "DirCreate", "FileGetSize", "FileWrite", "SoundSetWaveVolume", "SoundPlay", "Run", "ProcessList", "ProcessClose", "Net Messenger On", "Net Messenger Off", "OS Serial", "Credits", "Exit"] HotKeySet("{Enter}" , "_Send") $Main = "Console" $Font = "Courier New" $Gui = GUICreate($Main , 629, 403, 193, 115) GUISetIcon( "shell32.dll", 42) $Console = GUICtrlCreateEdit("" , 4, 4, 621, 369, $ES_READONLY + $WS_VSCROLL + $ES_AUTOHSCROLL, 0 ) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetFont( -1, 9, 400, 4, $Font) GUICtrlSetColor(-1, 0xFFFFFF) $Command = GUICtrlCreateInput("", 4, 376, 621, 21, -1, 0) GUICtrlSetBkColor(-1, 0x000000) GUICtrlSetFont( -1, 9, 400, 4, $Font) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetState($Command, $GUI_FOCUS) GUISetState(@SW_SHOW) _ConsoleWrite("You are logged as: " & @UserName & @CRLF & "Computer: " & @ComputerName & @CRLF & "IP Address: " & @IPAddress1 & @CRLF & "Administrator Rights: " & _Admin() & @CRLF & "Help: Type Help or ? then hit ENTER to send the command to the console") While 1 If WinActive($Gui) Then HotKeySet("{Enter}" , "_Send") Else HotKeySet("{Enter}") EndIf $Msg = GuiGetMsg() Select Case $Msg = $GUI_EVENT_CLOSE ExitLoop ;Case ;;; EndSelect WEnd Func _Admin() If IsAdmin() = 1 Then $Admin = "True" Else $Admin = "False" EndIf Return $Admin EndFunc Func _ConsoleWrite($Text) GUICtrlSetData($Console , $Text & @CRLF) EndFunc Func _Send() $CommandRead = GUICtrlRead($Command) If Not _IsSupportedCmd($SupportedCommandsArr, $CommandRead) Then GUICtrlSetData($Console, GUICtrlRead($Console) & @CRLF & $CommandRead & ":" & " Not supported command" & @CRLF) GUICtrlSetData($Command , "") Return EndIf If $CommandRead = "" Then GUICtrlSetData($Console, GUICtrlRead($Console) & @CRLF & ">" & @CRLF) Else _ConsoleWrite(GUICtrlRead($Console) & @CRLF & $CommandRead) _Read() GUICtrlSetData($Command , "") EndIf _GUICtrlEditScroll($Console, $SB_SCROLLCARET) EndFunc Func _Read() $ReadConsole = GUICtrlRead($Console) If GUICtrlRead($Command) = "/Help" Or GUICtrlRead($Command) = "/?" Then _ConsoleWrite($ReadConsole & @CRLF & "/Help - takes you here to view all the commands" & @CRLF & "Clear - clears the console" & @CRLF & "Cls - clears the console" & @CRLF & "Beep(Frequency , Duration) - plays back a beep noise , example beep(500, 1000)" & @CRLF & "Win Chat - opens microsofts chatting service" & @CRLF & "Notepad - opens microsofts text editor" & @CRLF & "Cal - opens microsofts calculator" & @CRLF & "Paint - opens microsofts paint brush" & @CRLF & "Ip - tells you your current ip" & @CRLF & "Computer name - tells you the computer name" & @CRLF & "User name - tells you the logged on user name" & @CRLF & "Logon Domain - logon domain" & @CRLF & "Logon DNS Domain - logon dns domain" & @CRLF & "Logon Server - logon server" & @CRLF & "OSTYPE - returns WIN32_NT for NT/2000/XP/2003 and returns WIN32_WINDOWS for 95/98/Me" & @CRLF & "Desktop Size - returns the height and width of desktop" & @CRLF & "Talk(Word or text here) - repeats the word withing the brackets" & @CRLF & "Voice on - repeats command typed in and reads the consoles actions" & @CRLF & "Voice off - shuts off voice" & @CRLF & "Connection - tells you if your online" & @CRLF & "Cmd:command - to use the classic command prompt , example cmd:msg * hello" & @CRLF & "Cmd2:command - makes a batch file to bypass work places such as school or work" & @CRLF & "Cd Tray(C:) - opens or closes a cd tray or type all to open or close all trays" & @CRLF & "Trans() - makes a window transparent 0-255 , example trans(150)" & @CRLF & "Transparent() - makes a window transparent 0-255 , example transparent(150)" & @CRLF & "Pic - takes a picture of the current screen hides the console" & @CRLF & "Picture - takes a picture of the current screen hides the console" & @CRLF & "ClipPut(value) - writes text to the clipboard" & @CRLF & "ClipGet() - retrieves text from the clipboard" & @CRLF & "DirCreate(path) - creates a directory/folder , example dircreate(c:\myfolder)" & @CRLF & "FileGetSize(console.exe) - returns file size in bytes" & @CRLF & "FileWrite() - writes a file , example FileWrite(C:\myfile.txt , this is my line of text)" & @CRLF & "SoundSetWaveVolume(50) - sets the wave volume 0-100" & @CRLF & "SoundPlay(myfile.wav) - play a sound file" & @CRLF & "Run() - runs an external program , example Run(notepad.exe)" & @CRLF & "ProcessList() - list all processes" & @CRLF & "ProcessClose() - close a process , example ProcessClose(notepad.exe)" & @CRLF & "Net Messenger On - enables net send" & @CRLF & "Net Messenger Off - disable net send" & @CRLF & "OS Serial - shows you your serial for your copy of windows 2000 and xp only" & @CRLF & "Credits - credits of who made console" & @CRLF & "Exit - exits console") EndFunc Func _IsSupportedCmd(ByRef $SupportedCommandsArr, $Cmd) For $i = 1 To UBound($SupportedCommandsArr)-1 If StringLeft($SupportedCommandsArr[$i], StringLen($Cmd)) = $Cmd Then Return True Next Return False EndFunc Edited May 25, 2007 by MsCreatoR Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
testingtest Posted May 25, 2007 Author Posted May 25, 2007 yea its nice for school bigger project then I though becuase I want it to be user friendly little problem If GUICtrlRead($Command) = "Beep("$Frequency "," $Duration")" Then Beep($Frequency , $Duration) EndIf oÝ÷ Úz-²êÞ-¢ n¶¬¥ªíæx"·Á秢¹É·¥G+ºÚ"µÍYÕRPÝXY ÌÍÐÛÛ[X[ HH ][ÝÐY ][ÝÑÕRPÝXY ÌÍÑ]Y[ÞJH ][ÝË ][ÝÈÕRPÝXY ÌÍÑ][ÛI][ÝÊI][ÝÈ[BY ÌÍÑ]Y[ÞH ÌÍÑ][ÛB[Y
MrCreatoR Posted May 25, 2007 Posted May 25, 2007 little problemTry this: If StringLeft($CommandRead, 4) = "Beep" Then Local $TempCommandRead = StringReplace(StringReplace(StringTrimLeft($CommandRead, 4), "(", ""), ")", "") $VarsArr = StringSplit($TempCommandRead, ",") If IsArray($VarsArr) And UBound($VarsArr) > 2 Then $Frequency = StringStripWS($VarsArr[1], 3) $Duration = StringStripWS($VarsArr[2], 3) Beep($Frequency , $Duration) Else GUICtrlSetData($Console, $ConsoleRead & @CRLF & $CommandRead & ":" & " Incorrect parameters in command / Wrong number of arguments in command call." & @CRLF) EndIf EndIf Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team
James Posted May 25, 2007 Posted May 25, 2007 Hmm cool, a new version of the command interpreter hey. Nice. Keep it up. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
testingtest Posted May 25, 2007 Author Posted May 25, 2007 (edited) Try this: If StringLeft($CommandRead, 4) = "Beep" Then Local $TempCommandRead = StringReplace(StringReplace(StringTrimLeft($CommandRead, 4), "(", ""), ")", "") $VarsArr = StringSplit($TempCommandRead, ",") If IsArray($VarsArr) And UBound($VarsArr) > 2 Then $Frequency = StringStripWS($VarsArr[1], 3) $Duration = StringStripWS($VarsArr[2], 3) Beep($Frequency , $Duration) Else GUICtrlSetData($Console, $ConsoleRead & @CRLF & $CommandRead & ":" & " Incorrect parameters in command / Wrong number of arguments in command call." & @CRLF) EndIf EndIfoÝ÷ Ûú®¢×©ä±ú+éixºÖ¥ÛezènW¦!§]yØ|¨º»Þ®È¨©ÝÛÚ®¢Óh¶Ë©¦íy×(f§v«¨¶Ê¶$¶ç$x"~+liÊ&©Ý¥ªí¢ëZÛ-Y]Ù÷ö×îËb¢{kçb¶X¤zØb±«¢+Ø)%U% ÑɱI ÀÌØí ½µµ¹¤ôÅÕ½Ðí ÀÅÕ½ÐìQ¡¸)%MÑÉ¥¹1Ð ÀÌØí ½µµ¹I°Ð¤ôÅÕ½Ðí ÀÅÕ½ÐìQ¡¸(1½°ÀÌØíQµÁ ½µµ¹IôMÑÉ¥¹IÁ±¡MÑÉ¥¹IÁ±¡MÑÉ¥¹QÉ¥µ1Ð ÀÌØí ½µµ¹I°Ð¤°ÅÕ½Ðì ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ð줰ÅÕ½Ðì¤ÅÕ½Ðì°ÅÕ½ÐìÅÕ½Ðì¤(ÀÌØíYÉÍÉÈôMÑÉ¥¹MÁ±¥Ð ÀÌØíQµÁ ½µµ¹I°ÅÕ½Ðì°ÅÕ½Ðì¤(%%ÍÉÉä ÀÌØíYÉÍÉȤ¹U ½Õ¹ ÀÌØíYÉÍÉȤÐìÈQ¡¸(ÀÌØíÉÅÕ¹äôMÑÉ¥¹MÑÉ¥Á]L ÀÌØíYÉÍÉÉlÅt°Ì¤(ÀÌØíÕÉÑ¥½¸ôMÑÉ¥¹MÑÉ¥Á]L ÀÌØíYÉÍÉÉlÉt°Ì¤( À ÀÌØíÉÅÕ¹ä°ÀÌØíÕÉÑ¥½¸¤(±Í(U% ÑɱMÑÑ ÀÌØí ½¹Í½±°ÀÌØí ½¹Í½±IµÀì I1µÀìÀÌØí ½µµ¹IµÀìÅÕ½ÐìèÅÕ½ÐìµÀìÅÕ½Ðì%¹½ÉÉÐÁɵÑÉÌ¥¸½µµ¹¼]ɽ¹¹ÕµÈ½ÉÕµ¹ÑÌ¥¸½µµ¹±°¸ÅÕ½ÐìµÀì I1¤(¹%)¹%)¹%( Edited May 25, 2007 by testingtest
testingtest Posted May 25, 2007 Author Posted May 25, 2007 I am also willing to keep this project user friendly and add way more commands this should keep me busy for now
Draygoes Posted March 1, 2009 Posted March 1, 2009 Testingtest was banned, but I wonder if anyone would like to contnue this project? I personally would love to see this project become great. Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now