Jump to content

Command Interpreter in AutoIt (As Secure says)


i542
 Share

Recommended Posts

  • Replies 87
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I think its a set it yourself color thing. I havent tried it yet, so I cant be certain.

I think A.Percy's script is too much complicated.

yxrkt posts...

i542

Edited by i542

I can do signature me.

Link to comment
Share on other sites

Added CmdLineparameter() and Tada()

Edit : Added cd() and dir()

#include <GuiConstants.au3>

#NoTrayIcon

Global $ThisDir = "c:\"

$font = "Courier New"

$gui = GUICreate("My Programming Command Line", 482, 250, -1,-1)
GUISetIcon("shell32.dll", 42)
$txt = GUICtrlCreateEdit("", 0, 0, 481, 217, $ES_READONLY + $WS_VSCROLL)
GUICtrlSetFont (-1, 9, 400, 4, $font)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetData($txt, "> Welcome to mycommand line, you are logged in as: " & @UserName & @CRLF)
$cLine = GUICtrlCreateInput("", 5, 224, 380, 21)
ClearLine( )
$Execute = GUICtrlCreateButton("Execute", 390, 221, 89, 25, $BS_DEFPUSHBUTTON)
GUISetState(@SW_SHOW)

CmdLineparameter()  
    
    
While 1
   $msg = GuiGetMsg()
   Select
   Case $msg = $GUI_EVENT_CLOSE
       ExitLoop
   Case $msg = $Execute
        TreatCommandLine( )
   EndSelect
WEnd

Func _ConsoleWrite($text)
   GUICtrlSetData($txt, $text & @crlf , GUICtrlRead($txt))
EndFunc

Func _TrimSpaces(ByRef $parameter)
   Local $string
   $string = StringSplit($parameter, "")
   If $string[1] = Chr(47) then
       $string = StringtrimLeft($parameter,1)
       Return $string
   Else
       Return $parameter
   EndIf
EndFunc

Func GetFunctionParameters( $CmdArray )
    Local $RetVal[1][2]
    $RetVal[0][0] = 0 ;count parameters
    If $CmdArray[0] > 1 Then
        For $i = 1 to $CmdArray[0]
            Local $Parameter = StringSplit( $CmdArray[$i], Chr(58) )
            If $Parameter[0] >= 1 Then
                $RetVal[0][0] += 1
                Local $Index = $RetVal[0][0]
                ReDim $RetVal[ $Index + 1 ][2]
                $RetVal[ $Index ][0] = _TrimSpaces( $Parameter[1] )
                $RetVal[ $Index ][1] = ""
                If $Parameter[0] > 1 Then
                    $RetVal[ $Index ][1] = _TrimSpaces( $Parameter[2] )
                EndIf
            EndIf
        Next
    EndIf
    Return $RetVal
EndFunc

Func _NewGUI( $string )
$nGUI = GuiCreate("New GUI", $string[2], $string[3], -1, -1)
GuiSetState(@SW_SHOW)

While WinActive($nGUI)
    $gMsg = GuiGetMsg()
    Switch $gMsg
    Case $GUI_EVENT_CLOSE
        GUIDelete($nGUI)
    EndSwitch
WEnd
EndFunc

Func ClearLine( )
    GuiCtrlSetData($cLine, "", "")
EndFunc

Func TreatCommandLine( )
    Local $string = StringSplit(GuiCtrlRead($cLine), Chr(47))
    $string[1] = StringStripWS( $string[1], 8 )
    Switch $string[1]
        Case "cd"
            cd( $string )
        Case "dir"
            dir(  )
        Case "tada"
            Tada( )
        Case "clear"
            Clear( )
        Case "echo"
            Echo( $string )
        Case "beep"
            MyBeep( $string )
        Case "exit"
            MyExit( )
        Case "computer"
            Computer( )
        Case "about"
            About( )
        Case "gui"
            Gui( $string )
        Case "popup"
            MyPopUp( $string )
        Case "title"
            WinSetTitle($gui, "", $string[2])
        Case "color"
            Color( $string )
        Case "cd"
            CdRom( $string )
        Case "computer"
            _ConsoleWrite("> Syntax: computer")
            _ConsoleWrite("> Shows the computer information")
            _ConsoleWrite("> Remarks: none")
        Case ""
            _ConsoleWrite("> You forgot to add a command")
        Case "help"
            Help( $string )
        Case "gui"
            _ConsoleWrite("> You haven't added any values to the width and height.")
            _ConsoleWrite("> Example: >gui, 400, 500")
        Case Else
            _ConsoleWrite("Error with syntax: " & $string[1])
            _ConsoleWrite("Use help /? to find help!")
    EndSwitch
    ClearLine( )
EndFunc

Func Clear( )
    _ConsoleWrite("> Clearing...")
    Sleep(1000)
    GUICtrlSetData($txt, "", "")
EndFunc

Func Tada()
    SoundPlay(@WindowsDir & "\media\tada.wav",1)
    
Endfunc

Func Echo( $String )
    If $String[0] > 1 Then
        $string[2] = _TrimSpaces($string[2])
        _ConsoleWrite($string[2])
    EndIf
EndFunc

Func MyBeep( $string )
    $string[2] = _TrimSpaces($string[2])
    Beep($string[2], $string[3])
    _ConsoleWrite("> Beep successfull")
EndFunc

Func MyExit( )
    _ConsoleWrite("> Goodbye.")
    Sleep(1000)
    Exit
EndFunc

Func Computer( )
    _ConsoleWrite("> Your username is: " & @Username)
    _ConsoleWrite("> Your computer name is: " & @ComputerName)
    _ConsoleWrite("> Your Operating System is: " & @OSVersion)
    _ConsoleWrite("> Service Pack is: " & @OSServicePack)
    _ConsoleWrite("> OS Build: " & @OSBuild)
    _ConsoleWrite("> Language: " & @OSLang)
EndFunc

Func About( )
    _ConsoleWrite("> My Programming Language")
    _ConsoleWrite("> Created with i542's Programming Language System")
    _ConsoleWrite("> This language is licensed to: Secure_ICT")
EndFunc

Func Gui( $string )
    $checkline = GUICtrlRead($cLine)
    If $checkline = "gui" Then
        _ConsoleWrite("> You have not specified width and height to create a GUI.")
    Else
        _ConsoleWrite("> Creating GUI")
        Sleep(1000)
        _NewGUI( $string )
    EndIf
EndFunc

Func MyPopUp( $CmdArray )
    MsgBox(0, $CmdArray[2], $CmdArray[3])
    GUICtrlSetData($txt,"<Popup Executed Successfully>" & @CRLF, GuiCtrlRead($txt))
EndFunc

Func Color( $CmdArray )
    If UBound( $CmdArray ) = 0 Then Return 0
    Local $RetVal = 0
    If $CmdArray[0] > 1 Then
        $Parameters = GetFunctionParameters( $CmdArray )
        For $i = 1 to $Parameters[0][0]
            Switch $Parameters[$i][0]
                Case "back"
                    GUICtrlSetBkColor($txt, _GetColor( $Parameters[$i][1] ) )
                    $RetVal = 1
                Case "front"
                    GUICtrlSetColor($txt, _GetColor( $Parameters[$i][1] ) )
                    $RetVal = 1
            EndSwitch
        Next
    EndIf
    If $RetVal = 0 Then
        _ConsoleWrite("> color command usage:")
        _ConsoleWrite("> color /back:white /front:black")
        _ConsoleWrite("> Possible colors: green, white, blue, rose, pink, black")
    EndIf
    Return $RetVal
EndFunc

Func _GetColor( $Color )
    $Color = StringStripWS( $Color, 8 )
    Switch $Color
        Case "green"
            Return 0xaaffbb
        Case "white"
            Return 0xffffff
        Case "blue"
            Return 0x0000ff
        Case "turquoise"
            Return 0x00ffff
        Case "red"
            Return 0xff0000
        Case "rose"
            Return 0xddacaa
        Case "pink"
            Return 0xddacee
        Case "black"
            Return 0x000000
        Case Else
            Return 0xffffff
    EndSwitch
EndFunc

Func CdRom( $CmdArray )
    If UBound( $CmdArray ) = 0 Then Return 0
    Local $RetVal = 0
    If $CmdArray[0] > 1 Then
        $Parameters = GetFunctionParameters( $CmdArray )
        For $i = 1 to $Parameters[0][0]
            Switch $Parameters[$i][0]
                Case "open"
                    $drive = DriveGetDrive("CDROM")
                    CDTray($drive, "open")
                    _ConsoleWrite("CD Tray Opened")
                Case "close"
                    CDTray("H:\", "closed")
                    _ConsoleWrite("CD Tray Closed")
            EndSwitch
        Next
    EndIf
    If $RetVal = 0 Then
        _ConsoleWrite("> color command usage:")
        _ConsoleWrite("> color /back:white /front:black")
        _ConsoleWrite("> Possible colors: green, white, blue, rose, pink, black")
    EndIf
    Return $RetVal
EndFunc

Func Help( $CmdArray )
    If UBound( $CmdArray ) = 0 Then Return 0
    If $CmdArray[0] > 1 Then
        $Parameters = GetFunctionParameters( $CmdArray )
        For $i = 1 to $Parameters[0][0]
            Switch $Parameters[$i][0]
                Case "echo"
                    _ConsoleWrite("> Syntax: echo, <text>")
                    _ConsoleWrite("> Places text in this control")
                    _ConsoleWrite("> Remarks: none")
                Case "popup"
                    _ConsoleWrite("> Syntax: popup, <title>, <text>")
                    _ConsoleWrite("> Makes a popup appear")
                    _ConsoleWrite("> Remarks: none")
                Case "clear"
                    _ConsoleWrite("> Syntax: clear")
                    _ConsoleWrite("> Clears all of the text in the control")
                    _ConsoleWrite("> Remarks: none")
                Case "exit"
                    _ConsoleWrite("> Syntax: exit")
                    _ConsoleWrite("> Closes the command window")
                    _ConsoleWrite("> Remarks: none")
                Case "beep"
                    _ConsoleWrite("> Syntax: beep {Frequency, Duration}")
                    _ConsoleWrite("> Plays back a beep to the user")
                    _ConsoleWrite("> Remarks: Requires numbers e.g. beep, 500, 1000")
                Case "color"
                    _ConsoleWrite("> color command usage:")
                    _ConsoleWrite("> color /back:white /front:black")
                    _ConsoleWrite("> Possible colors: green, white, blue, rose, pink, black")
                Case "cd"
                    _ConsoleWrite("> Syntax: cd {open,close}")
                Case "title"
                    _ConsoleWrite("> Syntax: title {new title}")
                    _ConsoleWrite("> Changes the window title")
                    _ConsoleWrite("> Remarks: Example; title, James Brooks Programming Command Line")
                Case "gui"
                    _ConsoleWrite("> Syntax: gui {width, height}")
                    _ConsoleWrite("> Creates a GUI")
                    _ConsoleWrite("> Remarks: A random GUI.")
                Case Else
                    _HelpError( )
            EndSwitch
        Next
    Else
        _HelpError( )
    EndIf
    Return 0
EndFunc

Func _HelpError( )
    _ConsoleWrite("> Syntax: help {command in which you need help}")
    _ConsoleWrite("> Shows the help information and example. Commands are, help {color, exit, clear, popup, echo, beep}")
    _ConsoleWrite("> Remarks: Shows help info e.g help /exit")
EndFunc

Func cd($CmdArray)
    If UBound( $CmdArray ) = 0 Then Return 0
        If $CmdArray[0] > 1 Then
            if stringinstr($CmdArray[2],':')  then 
                $ThisDir = ""
                $search = FileFindFirstFile($CmdArray[2]&"\*.*")
            Else
                $search = FileFindFirstFile($ThisDir&"\"&$CmdArray[2]&".*") 
            endif   
        If $search = -1 Then
            _ConsoleWrite("> Error ! folder dosnt exist. ")
        Else
            if StringRight($ThisDir, 1) == '\' then 
                $ThisDir = $ThisDir&""&$CmdArray[2]
            else
                if stringinstr($CmdArray[2],':')  then 
                    $ThisDir = $ThisDir&""&$CmdArray[2]
                else
                    $ThisDir = $ThisDir&"\"&$CmdArray[2]
                endif
            endif
            
        Endif
    Endif       
    _ConsoleWrite(""&$ThisDir)
Endfunc

Func dir()
    $search = FileFindFirstFile($ThisDir&"\*.*")  
    If $search = -1 Then
        _ConsoleWrite("> Error ! ")
        Return 0
    EndIf
        While 1
            $file = FileFindNextFile($search)
        If @error Then ExitLoop
            _ConsoleWrite(""&$file)
        WEnd
        FileClose($search)
    _ConsoleWrite("> "&$ThisDir)
    
Endfunc

Func CmdLineparameter()
    If $CMDLINE[0] = 1 Then
            $file = FileOpen(stringreplace($CmdLineRaw,'"',""), 0)
        If $file = -1 Then
            Exit
        EndIf
            While 1
                $line = FileReadLine($file)
                If @error = -1 Then ExitLoop
                    guictrlsetdata($cLine,$line)
                    TreatCommandLine( ) 
            Wend
            FileClose($file)
    endif
Endfunc

Edited by yxrkt
Link to comment
Share on other sites

Added CmdLineparameter() and Tada()

 _linenums:0'>#include <GuiConstants.au3>

#NoTrayIcon

$font = "Courier New"

$gui = GUICreate("My Programming Command Line", 482, 250, -1,-1)
GUISetIcon("shell32.dll", 42)
$txt = GUICtrlCreateEdit("", 0, 0, 481, 217, $ES_READONLY + $WS_VSCROLL)
GUICtrlSetFont (-1, 9, 400, 4, $font)
GUICtrlSetBkColor(-1, 0x000000)
GUICtrlSetColor(-1, 0xffffff)
GUICtrlSetData($txt, "> Welcome to mycommand line, you are logged in as: " & @UserName & @CRLF)
$cLine = GUICtrlCreateInput("", 5, 224, 380, 21)
ClearLine( )
$Execute = GUICtrlCreateButton("Execute", 390, 221, 89, 25, $BS_DEFPUSHBUTTON)
GUISetState(@SW_SHOW)

CmdLineparameter()  
    
    
While 1
   $msg = GuiGetMsg()
   Select
   Case $msg = $GUI_EVENT_CLOSE
       ExitLoop
   Case $msg = $Execute
        TreatCommandLine( )
   EndSelect
WEnd

Func _ConsoleWrite($text)
   GUICtrlSetData($txt, $text & @crlf, GUICtrlRead($txt))
EndFunc

Func _TrimSpaces(ByRef $parameter)
   Local $string
   $string = StringSplit($parameter, "")
   If $string[1] = Chr(47) then
       $string = StringtrimLeft($parameter,1)
       Return $string
   Else
       Return $parameter
   EndIf
EndFunc

Func GetFunctionParameters( $CmdArray )
    Local $RetVal[1][2]
    $RetVal[0][0] = 0 ;count parameters
    If $CmdArray[0] > 1 Then
        For $i = 1 to $CmdArray[0]
            Local $Parameter = StringSplit( $CmdArray[$i], Chr(58) )
            If $Parameter[0] >= 1 Then
                $RetVal[0][0] += 1
                Local $Index = $RetVal[0][0]
                ReDim $RetVal[ $Index + 1 ][2]
                $RetVal[ $Index ][0] = _TrimSpaces( $Parameter[1] )
                $RetVal[ $Index ][1] = ""
                If $Parameter[0] > 1 Then
                    $RetVal[ $Index ][1] = _TrimSpaces( $Parameter[2] )
                EndIf
            EndIf
        Next
    EndIf
    Return $RetVal
EndFunc

Func _NewGUI( $string )
$nGUI = GuiCreate("New GUI", $string[2], $string[3], -1, -1)
GuiSetState(@SW_SHOW)

While WinActive($nGUI)
    $gMsg = GuiGetMsg()
    Switch $gMsg
    Case $GUI_EVENT_CLOSE
        GUIDelete($nGUI)
    EndSwitch
WEnd
EndFunc

Func ClearLine( )
    GuiCtrlSetData($cLine, "", "")
EndFunc

Func TreatCommandLine( )
    Local $string = StringSplit(GuiCtrlRead($cLine), Chr(47))
    $string[1] = StringStripWS( $string[1], 8 )
    Switch $string[1]
        Case "tada"
            Tada( )
        Case "clear"
            Clear( )
        Case "echo"
            Echo( $string )
        Case "beep"
            MyBeep( $string )
        Case "exit"
            MyExit( )
        Case "computer"
            Computer( )
        Case "about"
            About( )
        Case "gui"
            Gui( $string )
        Case "popup"
            MyPopUp( $string )
        Case "title"
            WinSetTitle($gui, "", $string[2])
        Case "color"
            Color( $string )
        Case "cd"
            CdRom( $string )
        Case "computer"
            _ConsoleWrite("> Syntax: computer")
            _ConsoleWrite("> Shows the computer information")
            _ConsoleWrite("> Remarks: none")
        Case ""
            _ConsoleWrite("> You forgot to add a command")
        Case "help"
            Help( $string )
        Case "gui"
            _ConsoleWrite("> You haven't added any values to the width and height.")
            _ConsoleWrite("> Example: >gui, 400, 500")
        Case Else
            _ConsoleWrite("Error with syntax: " & $string[1])
            _ConsoleWrite("Use help /? to find help!")
    EndSwitch
    ClearLine( )
EndFunc

Func Clear( )
    _ConsoleWrite("> Clearing...")
    Sleep(1000)
    GUICtrlSetData($txt, "", "")
EndFunc

Func Tada()
    SoundPlay(@WindowsDir & "\media\tada.wav",1)
    
Endfunc

Func Echo( $String )
    If $String[0] > 1 Then
        $string[2] = _TrimSpaces($string[2])
        _ConsoleWrite($string[2])
    EndIf
EndFunc

Func MyBeep( $string )
    $string[2] = _TrimSpaces($string[2])
    Beep($string[2], $string[3])
    _ConsoleWrite("> Beep successfull")
EndFunc

Func MyExit( )
    _ConsoleWrite("> Goodbye.")
    Sleep(1000)
    Exit
EndFunc

Func Computer( )
    _ConsoleWrite("> Your username is: " & @Username)
    _ConsoleWrite("> Your computer name is: " & @ComputerName)
    _ConsoleWrite("> Your Operating System is: " & @OSVersion)
    _ConsoleWrite("> Service Pack is: " & @OSServicePack)
    _ConsoleWrite("> OS Build: " & @OSBuild)
    _ConsoleWrite("> Language: " & @OSLang)
EndFunc

Func About( )
    _ConsoleWrite("> My Programming Language")
    _ConsoleWrite("> Created with i542's Programming Language System")
    _ConsoleWrite("> This language is licensed to: Secure_ICT")
EndFunc

Func Gui( $string )
    $checkline = GUICtrlRead($cLine)
    If $checkline = "gui" Then
        _ConsoleWrite("> You have not specified width and height to create a GUI.")
    Else
        _ConsoleWrite("> Creating GUI")
        Sleep(1000)
        _NewGUI( $string )
    EndIf
EndFunc

Func MyPopUp( $CmdArray )
    MsgBox(0, $CmdArray[2], $CmdArray[3])
    GUICtrlSetData($txt,"<Popup Executed Successfully>" & @CRLF, GuiCtrlRead($txt))
EndFunc

Func Color( $CmdArray )
    If UBound( $CmdArray ) = 0 Then Return 0
    Local $RetVal = 0
    If $CmdArray[0] > 1 Then
        $Parameters = GetFunctionParameters( $CmdArray )
        For $i = 1 to $Parameters[0][0]
            Switch $Parameters[$i][0]
                Case "back"
                    GUICtrlSetBkColor($txt, _GetColor( $Parameters[$i][1] ) )
                    $RetVal = 1
                Case "front"
                    GUICtrlSetColor($txt, _GetColor( $Parameters[$i][1] ) )
                    $RetVal = 1
            EndSwitch
        Next
    EndIf
    If $RetVal = 0 Then
        _ConsoleWrite("> color command usage:")
        _ConsoleWrite("> color /back:white /front:black")
        _ConsoleWrite("> Possible colors: green, white, blue, rose, pink, black")
    EndIf
    Return $RetVal
EndFunc

Func _GetColor( $Color )
    $Color = StringStripWS( $Color, 8 )
    Switch $Color
        Case "green"
            Return 0xaaffbb
        Case "white"
            Return 0xffffff
        Case "blue"
            Return 0x0000ff
        Case "turquoise"
            Return 0x00ffff
        Case "red"
            Return 0xff0000
        Case "rose"
            Return 0xddacaa
        Case "pink"
            Return 0xddacee
        Case "black"
            Return 0x000000
        Case Else
            Return 0xffffff
    EndSwitch
EndFunc

Func CdRom( $CmdArray )
    If UBound( $CmdArray ) = 0 Then Return 0
    Local $RetVal = 0
    If $CmdArray[0] > 1 Then
        $Parameters = GetFunctionParameters( $CmdArray )
        For $i = 1 to $Parameters[0][0]
            Switch $Parameters[$i][0]
                Case "open"
                    $drive = DriveGetDrive("CDROM")
                    CDTray($drive, "open")
                    _ConsoleWrite("CD Tray Opened")
                Case "close"
                    CDTray("H:\", "closed")
                    _ConsoleWrite("CD Tray Closed")
            EndSwitch
        Next
    EndIf
    If $RetVal = 0 Then
        _ConsoleWrite("> color command usage:")
        _ConsoleWrite("> color /back:white /front:black")
        _ConsoleWrite("> Possible colors: green, white, blue, rose, pink, black")
    EndIf
    Return $RetVal
EndFunc

Func Help( $CmdArray )
    If UBound( $CmdArray ) = 0 Then Return 0
    If $CmdArray[0] > 1 Then
        $Parameters = GetFunctionParameters( $CmdArray )
        For $i = 1 to $Parameters[0][0]
            Switch $Parameters[$i][0]
                Case "echo"
                    _ConsoleWrite("> Syntax: echo, <text>")
                    _ConsoleWrite("> Places text in this control")
                    _ConsoleWrite("> Remarks: none")
                Case "popup"
                    _ConsoleWrite("> Syntax: popup, <title>, <text>")
                    _ConsoleWrite("> Makes a popup appear")
                    _ConsoleWrite("> Remarks: none")
                Case "clear"
                    _ConsoleWrite("> Syntax: clear")
                    _ConsoleWrite("> Clears all of the text in the control")
                    _ConsoleWrite("> Remarks: none")
                Case "exit"
                    _ConsoleWrite("> Syntax: exit")
                    _ConsoleWrite("> Closes the command window")
                    _ConsoleWrite("> Remarks: none")
                Case "beep"
                    _ConsoleWrite("> Syntax: beep {Frequency, Duration}")
                    _ConsoleWrite("> Plays back a beep to the user")
                    _ConsoleWrite("> Remarks: Requires numbers e.g. beep, 500, 1000")
                Case "color"
                    _ConsoleWrite("> color command usage:")
                    _ConsoleWrite("> color /back:white /front:black")
                    _ConsoleWrite("> Possible colors: green, white, blue, rose, pink, black")
                Case "cd"
                    _ConsoleWrite("> Syntax: cd {open,close}")
                Case "title"
                    _ConsoleWrite("> Syntax: title {new title}")
                    _ConsoleWrite("> Changes the window title")
                    _ConsoleWrite("> Remarks: Example; title, James Brooks Programming Command Line")
                Case "gui"
                    _ConsoleWrite("> Syntax: gui {width, height}")
                    _ConsoleWrite("> Creates a GUI")
                    _ConsoleWrite("> Remarks: A random GUI.")
                Case Else
                    _HelpError( )
            EndSwitch
        Next
    Else
        _HelpError( )
    EndIf
    Return 0
EndFunc

Func _HelpError( )
    _ConsoleWrite("> Syntax: help {command in which you need help}")
    _ConsoleWrite("> Shows the help information and example. Commands are, help {color, exit, clear, popup, echo, beep}")
    _ConsoleWrite("> Remarks: Shows help info e.g help /exit")
EndFunc
 
Func CmdLineparameter()
    If $CMDLINE[0] = 1 Then
            $file = FileOpen(stringreplace($CmdLineRaw,'"',""), 0)
        If $file = -1 Then
            Exit
        EndIf
            While 1
                $line = FileReadLine($file)
                If @error = -1 Then ExitLoop
                    guictrlsetdata($cLine,$line)
                    TreatCommandLine( ) 
            Wend
            FileClose($file)
    endif
Endfunc
Cool.

i542

I can do signature me.

Link to comment
Share on other sites

I'm sorry but I fail to see the usefullness of this script ... AutoIt was created to be a fast and easy way to do basic programming. This loses many of the advantages of AutoIt (variables? keywords? loops? nesting functions?) without much gain. Now if you made a tutorial like this for C++ it would make more sense than making a scripting language out of a scripting language.

I dont mean to offend!

Hallman

Edited by Hallman
Link to comment
Share on other sites

Maybe i542 can write a harder tutorial which is complicated.

:)

Are you crazy?! I am not so good on AutoIt to create that script! I am only 11 and you 15. Well you try!

i542

I can do signature me.

Link to comment
Share on other sites

I'm sorry but I fail to see the usefullness of this script ... AutoIt was created to be a fast and easy way to do basic programming. This loses many of the advantages of AutoIt (variables? keywords? loops? nesting functions?) without much gain. Now if you made a tutorial like this for C++ it would make more sense than making a scripting language out of a scripting language.

I dont mean to offend!

Hallman

I'd like to see a tutorial like that.
Link to comment
Share on other sites

If you are really interested in creating a new language then I recommend really studying these two areas first. Here is an overview of what they are below. Automata is a form of math that deals with state machines, regular expressions, push down acceptors, ect.

This wont get you far without knowing the basics, but its a good place to get familiar.

Automata Theory

Compiler Design

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

I kinda think this script could be useful for somethings, mainly in designing a telnet, or similar, client. This at least gives you the basic framework to create an All AutoIt client to run things for you. You could then add to it to make it function right.

At least, that's my partial idea for using it...

Link to comment
Share on other sites

Toady, I see what you mean, it could be developed into more.

Developed more into what, i'm lost? This is no where near how to create a programming language. This tutorial is describing how to pass arguments to a program. The title of this thread should be changed into "How to pass command arguments using autoit".

www.itoady.com

A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding

Link to comment
Share on other sites

I'm sorry but I fail to see the usefullness of this script ... AutoIt was created to be a fast and easy way to do basic programming. This loses many of the advantages of AutoIt (variables? keywords? loops? nesting functions?) without much gain. Now if you made a tutorial like this for C++ it would make more sense than making a scripting language out of a scripting language.

I dont mean to offend!

Hallman

Don't be grumpy. I am not commented bad your script!

i542

I can do signature me.

Link to comment
Share on other sites

  • 4 weeks later...

I hope you don't mind,

I made a PDF out of the .doc document because it was getting really annoying with all these popups I get when I open Word. I attached it to this post.

:):guitar::)

I think this topic should be pinned..

Creating_a_Programming_Language_in_AutoIt.pdf

Edited by sandman

[center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center]

Link to comment
Share on other sites

  • 2 weeks later...

I think this topic should be pinned..

ok I was a little bit late (9 days if my memory is good) to see this post but thanks sandman. Even there are... how many... 5-6 programs pinned and mods have greater programs to pin :rolleyes:

I can do signature me.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...