Sign in to follow this  
Followers 0
AlmarM

Desktop Tool

14 posts in this topic

#1 ·  Posted (edited)

Hi!

This time I made a 'Desktop Tool'.

Features:

  • Application Launcher
  • Computer Information
  • Mouse Information
  • Hexing
  • Computer Programs
  • Games
  • Window Manager
#include <Inet.au3>
#include <String.au3>

Global Const $BS_ICON = 0x0040
Global Const $BS_PUSHLIKE = 0x1000
Global Const $ES_READONLY = 2048
Global Const $CD_VOLUME = DriveGetLabel("C:\")
Global Const $CD_SERIAL = DriveGetSerial("C:\")
Global Const $CD_TOTALSPACE = DriveSpaceTotal("C:\")
Global Const $CD_FREESPACE = DriveSpaceFree("C:\")
Global Const $CD_SYSTEMTYPE = DriveGetFileSystem("C:\")
Global Const $CD_STATUS = DriveStatus("C:\")
Global Const $GUI_FOCUS = 256
Global Const $CBS_DROPDOWNLIST = 0x0003
Global Const $GUI_ENABLE = 64
Global Const $GUI_DISABLE = 128
Global Const $ES_PASSWORD = 32
Global $aHButtons[10], $IniRead[10]
Global $WindowList, $Password, $PixelColor, $xPos, $yPos

If Not FileExists("C:\temp") Then DirCreate("C:\temp")
    
_Check()
_Menu()

Func _Menu()
    $MainGUI = GUICreate("Menu~", 170, 315, -1, -1)
    $ApplicationLauncher = GUICtrlCreateButton("Application Launcher", 10, 10, 150)
    $ComputerInformation = GUICtrlCreateButton("Computer Information", 10, 40, 150)
    $MouseInformation = GUICtrlCreateButton("Mouse Information", 10, 70, 150)
    $Hexing = GUICtrlCreateButton("Hexing", 10, 100, 150)
    $ComputerPrograms = GUICtrlCreateButton("Computer Programs", 10, 130, 150)
    $Games = GUICtrlCreateButton("Games", 10, 160, 150)
    $WindowManager = GUICtrlCreateButton("Window Manager", 10, 190, 150)
    $SetPassword = GUICtrlCreateButton("* Set Password *", 10, 220, 150)
    $Customizing = GUICtrlCreateButton("Customizing", 10, 250, 150)
    $Homepage = GUICtrlCreateButton("AutoIt Homepage", 10, 280, 150)

    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Select
        Case $nMsg = -3
            Exit
        Case $nMsg = $ApplicationLauncher
            GUIDelete($MainGUI)
            _AppLauncher()
        Case $nMsg = $ComputerInformation
            GUIDelete($MainGUI)
            _ComInfo()
        Case $nMsg = $MouseInformation
            GUIDelete($MainGUI)
            _MouseInfo()
        Case $nMsg = $Hexing
            GUIDelete($MainGUI)
            _Hexing()
        Case $nMsg = $ComputerPrograms
            GUIDelete($MainGUI)
            _ComputerProgs()
        Case $nMsg = $Games
            GUIDelete($MainGUI)
            _Games()
        Case $nMsg = $WindowManager
            GUIDelete($MainGUI)
            _WinManager()
        Case $nMsg = $SetPassword
            GUIDelete($MainGUI)
            _Password()
        Case $nMsg = $Customizing
            GUIDelete($MainGUI)
            _Customizing()
        Case $nMsg = $Homepage
            _Homepage()
        EndSelect
    WEnd
EndFunc

Func _AppLauncher()
    $GUI = GUICreate("Application Launcher~", 130, 355, -1, -1)
    GUICtrlCreateGroup("Applications", 10, 10, 110, 270)
    $ClearData = GUICtrlCreateButton("Clear all Data", 10, 290, 110)
    $ReturnMenu = GUICtrlCreateButton("Return to Menu", 10, 320, 110)

    Local $left = 20, $top = 30
    For $i = 0 To UBound($aHButtons) - 1
        $aHButtons[$i] = GUICtrlCreateButton("", $left, $top, 40, 40, $BS_ICON + $BS_PUSHLIKE)
        $top += 50
    If $i == 4 Then
        $left = 70
        $top = 30
    EndIf
    
    Next
    If FileExists("C:\temp\$~settings.ini") Then
        For $i = 0 To UBound($aHButtons) - 1
        $IniRead[$i] = IniRead("C:\temp\$~settings.ini", "AppLauncher", "Button" & $i, "Not Found")
            If $IniRead[$i] <> "Not Found" Then GUICtrlSetImage($aHButtons[$i], $IniRead[$i], 1)
        Next
    EndIf
    
    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
        Case -3
            Exit
        Case $aHButtons[0] To $aHButtons[UBound($aHButtons) - 1]
            For $i = 0 To UBound($aHButtons) - 1
                If $aHButtons[$i] == $nMsg Then
                    $IniRead[$i] = IniRead("C:\temp\$~settings.ini", "AppLauncher", "Button" & $i, "Not Found")
                    If FileExists("C:\temp\$~settings.ini") And $IniRead[$i] <> "Not Found" Then
                        ShellExecute($IniRead[$i])
                    Else
                        $fod_Button = FileOpenDialog("Select a file", @DesktopDir, "Executeable's (*.exe)", 3, "", $GUI)
                        If Not @error Then
                            IniWrite("C:\temp\$~settings.ini", "AppLauncher", "Button" & $i, $fod_Button)
                            GUICtrlSetImage($aHButtons[$i], $fod_Button, 1)
                        EndIf
                    EndIf
                EndIf
            Next
        Case $ClearData
                If FileExists("C:\temp\$~settings.ini") Then
                    FileDelete("C:\temp\$~settings.ini")
                Else
                    MsgBox(16, "ERROR", "No data saved!")
                EndIf
        Case $ReturnMenu
            GUIDelete($GUI)
            _Menu()
        EndSwitch
    WEnd
EndFunc

Func _ComInfo()
    $GUI = GUICreate("Computer Info~", 240, 585, -1, -1)
    GUICtrlCreateGroup("Computer Information", 10, 10, 220, 530)
    GUICtrlCreateInput("Computer Name: " & @ComputerName, 20, 30, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("Username: " & @UserName, 20, 60, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("OS Type: " & @OSTYPE, 20, 90, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("OS Service Pack: " & @OSServicePack, 20, 120, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("Language: " & _GetLang(@OSLang) & " (" & @OSLang & ")", 20, 150, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("OS Version: " & @OSVersion, 20, 180, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("OS Build Number: " & @OSBuild, 20, 210, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("Processor Arch: " & @ProcessorArch, 20, 240, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("Keyboard Layout: " & _GetKBLayout(@KBLayout) & " (" & @KBLayout & ")", 20, 270, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("LAN IP: " & @IPAddress1, 20, 300, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("DNS IP: " & _GetIP(), 20, 330, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("C:\ Volume Label: " & $CD_VOLUME, 20, 360, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("C:\ Serial: " & $CD_SERIAL, 20, 390, 200, 20, $ES_READONLY)
    $Round_TOTALSPACE = Round($CD_TOTALSPACE / 1000, 1)
    GUICtrlCreateInput("C:\ Total Space: " & $Round_TOTALSPACE & " GB", 20, 420, 200, 20, $ES_READONLY)
    $Round_FREESPACE = Round($CD_FREESPACE / 1000, 1)
    GUICtrlCreateInput("C:\ Free Space: " & $Round_FREESPACE & " GB", 20, 450, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("C:\ System Type: " & $CD_SYSTEMTYPE, 20, 480, 200, 20, $ES_READONLY)
    GUICtrlCreateInput("C:\ Status: " & $CD_STATUS, 20, 510, 200, 20, $ES_READONLY)
    $ReturnMenu = GUICtrlCreateButton("Return to Menu", 45, 550, 150)
    
    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Select
        Case $nMsg = -3
            Exit
        Case $nMsg = $ReturnMenu
            GUIDelete($GUI)
            _Menu()
        EndSelect
    WEnd
EndFunc

Func _MouseInfo()
    HotKeySet("{F9}", "_GetColor")
    HotKeySet("{F10}", "_GetMousePos")
    $GUI = GUICreate("Mouse Information~", 240, 200, -1, -1)
    GUICtrlCreateGroup("Mouse Information", 10, 10, 220, 150)
    GUICtrlCreateInput("Mouse Cursor: " & MouseGetCursor(), 20, 30, 200, 20, $ES_READONLY)
    GUICtrlCreateLabel("Press F9 to get pixel color.", 20, 60)
    $PixelColor = GUICtrlCreateInput("", 20, 80, 200, 20, $ES_READONLY)
    GUICtrlCreateLabel("Press F10 to get pixel 'x' and 'y' coords.", 20, 110)
    GUICtrlCreateLabel("x", 20, 132)
    $xPos = GUICtrlCreateInput("", 30, 130, 30, 20, $ES_READONLY)
    GUICtrlCreateLabel("y", 70, 132)
    $yPos = GUICtrlCreateInput("", 80, 130, 30, 20, $ES_READONLY)
    $ReturnMenu = GUICtrlCreateButton("Return to Menu", 45, 167, 150)
    
    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Select
        Case $nMsg = -3
            Exit
        Case $nMsg = $ReturnMenu
            HotKeySet("{F9}")
            HotKeySet("{F10}")
            GUIDelete($GUI)
            _Menu()
        EndSelect
    WEnd
EndFunc

Func _Hexing()
    $GUI = GUICreate("Hexing~", 420, 290, -1, -1)
    $StringToHexLabel = GUICtrlCreateLabel("String -> Hex", 10, 10, 150, 30)
    $StringInput = GUICtrlCreateInput("", 10, 50, 400, 20)
    $CalcStringToHexButton = GUICtrlCreateButton("Calculate!", 10, 79)
    $HexedStringInput = GUICtrlCreateInput("", 10, 115, 400, 20, $ES_READONLY)
    $CopyHexedString = GUICtrlCreateButton("Copy", 70, 79)
    $ShowHexedString = GUICtrlCreateButton("Show", 107, 79)
    $ClearHexed = GUICtrlCreateButton("Clear", 147, 79)

    $HexToStringLabel = GUICtrlCreateLabel("String <- Hex", 10, 150, 150, 30)
    $HexInput = GUICtrlCreateInput("", 10, 190, 400, 20)
    $CalcHexToStringButton = GUICtrlCreateButton("Calculate!", 10, 220)
    $StringFromHexInput = GUICtrlCreateInput("", 10, 259, 400, 20, $ES_READONLY)
    $CopyStringFromHex = GUICtrlCreateButton("Copy", 70, 220)
    $ShowStringFromHex = GUICtrlCreateButton("Show", 107, 220)
    $ClearString = GUICtrlCreateButton("Clear", 147, 220)

    GUICtrlSetFont($StringToHexLabel, 20, "", "", "Impact")
    GUICtrlSetFont($HexToStringLabel, 20, "", "", "Impact")
    
    $ReturnMenu = GUICtrlCreateButton("Return to Menu", 260, 10, 150)

    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Select
        Case $nMsg = -3
            Exit
        Case $nMsg = $CalcStringToHexButton
            $Read_String = GUICtrlRead($StringInput)
            $HEX = _StringToHex($Read_String)
            GUICtrlSetData($HexedStringInput, $HEX)
        Case $nMsg = $CalcHexToStringButton
            $Read_Hex = GUICtrlRead($HexInput)
            $STRING = _HexToString($Read_Hex)
            GUICtrlSetData($StringFromHexInput, $STRING)
        Case $nMsg = $CopyHexedString
            $Read_Hexed_String = GUICtrlRead($HexedStringInput)
            ClipPut($Read_Hexed_String)
        Case $nMsg = $CopyStringFromHex
            $Read_String_From_Hex = GUICtrlRead($StringFromHexInput)
            ClipPut($Read_String_From_Hex)
        Case $nMsg = $ShowHexedString
            $Read_Hexed_String_2 = GUICtrlRead($HexedStringInput)
            MsgBox(64, "iHex", $Read_Hexed_String_2)
        Case $nMsg = $ShowStringFromHex
            $Read_String_From_Hex_2 = GUICtrlRead($StringFromHexInput)
            MsgBox(64, "iHex", $Read_String_From_Hex_2)
        Case $nMsg = $ClearHexed
            GUICtrlSetData($StringInput, "")
            GUICtrlSetState($StringInput, $GUI_FOCUS)
        Case $nMsg = $ClearString
            GUICtrlSetData($HexInput, "")
            GUICtrlSetState($HexInput, $GUI_FOCUS)
        Case $nMsg = $ReturnMenu
            GUIDelete($GUI)
            _Menu()
        EndSelect
    WEnd
EndFunc

Func _ComputerProgs()
    $GUI = GUICreate("Computer Programs~", 190, 235, -1, -1)
    GUICtrlCreateGroup("Computer Programs", 10, 10, 170, 180)
    $Calculator = GUICtrlCreateButton("Run Calculator", 20, 30, 150)
    $Paint = GUICtrlCreateButton("Run Paint", 20, 60, 150)
    $Notepad = GUICtrlCreateButton("Run Notepad", 20, 90, 150)
    $CommandPrompt = GUICtrlCreateButton("Run Command Prompt", 20, 120, 150)
    $Wordpad = GUICtrlCreateButton("Run Wordpad", 20, 150, 150)
    $ReturnMenu = GUICtrlCreateButton("Return to Menu", 20, 200, 150)
    
    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Select
        Case $nMsg = -3
            Exit
        Case $nMsg = $Calculator
            Run("calc.exe")
        Case $nMsg = $Paint
            Run("mspaint.exe")
        Case $nMsg = $Notepad
            Run("notepad.exe")
        Case $nMsg = $CommandPrompt
            Run("cmd.exe")
        Case $nMsg = $Wordpad
            Run("wordpad.exe")
        Case $nmsg = $ReturnMenu
            GUIDelete($GUI)
            _Menu()
        EndSelect
    WEnd
EndFunc

Func _Games()
    $GUI = GUICreate("Games~", 190, 235, -1, -1)
    GUICtrlCreateGroup("Games", 10, 10, 170, 180)
    $FreeCell = GUICtrlCreateButton("Run FreeCell", 20, 30, 150)
    $Hearts = GUICtrlCreateButton("Run Hearts", 20, 60, 150)
    $Minesweeper = GUICtrlCreateButton("Run Minesweeper", 20, 90, 150)
    $Patience = GUICtrlCreateButton("Run Patience", 20, 120, 150)
    $Solitaire = GUICtrlCreateButton("Run Spider Solitaire", 20, 150, 150)
    $ReturnMenu = GUICtrlCreateButton("Return to Menu", 20, 200, 150)
    
    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Select
        Case $nMsg = -3
            Exit
        Case $nMsg = $FreeCell
            Run("freecell.exe")
        Case $nMsg = $Hearts
            Run("mshearts.exe")
        Case $nMsg = $Minesweeper
            Run("winmine.exe")
        Case $nMsg = $Patience
            Run("sol.exe")
        Case $nMsg = $Solitaire
            Run("spider.exe")
        Case $nmsg = $ReturnMenu
            GUIDelete($GUI)
            _Menu()
        EndSelect
    WEnd
EndFunc 

Func _WinManager()
    $GUI = GUICreate("Window Manager~", 290, 240, -1, -1)
    GUICtrlCreateGroup("Window Manager", 10, 10, 270, 195)
    GUICtrlCreateLabel("Windows", 20, 30)
    $WindowList = GUICtrlCreateCombo("Select a Window", 20, 50, 250, 20, $CBS_DROPDOWNLIST)
    $Activate = GUICtrlCreateButton("Activate Window", 20, 80, 120)
    $Close = GUICtrlCreateButton("Close Window", 150, 80, 120)
    $Flash = GUICtrlCreateButton("Flash Window", 20, 110, 150)
    $HowManyInput = GUICtrlCreateInput(1, 180, 113, 40, 20)
    $HowMany = GUICtrlCreateUpDown($HowManyInput)
    GUICtrlSetLimit($HowMany, 99, 0)
    GUICtrlCreateLabel("time(s)", 230, 116)
    $GetProcess = GUICtrlCreateButton("Get Process", 20, 140, 120)
    $GetText = GUICtrlCreateButton("Get Text", 150, 140, 120)
    $KillWindow = GUICtrlCreateButton("Kill Window", 20, 170, 120)
    $Refresh = GUICtrlCreateButton("Refresh", 150, 170, 120)
    $ReturnMenu = GUICtrlCreateButton("Return to Menu", 70, 210, 150)
    _Refresh()
    
    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Select
        Case $nMsg = -3
            Exit
        Case $nMsg = $Activate
            WinActivate(GUICtrlRead($WindowList))
        Case $nMsg = $Close
            WinClose(GUICtrlRead($WindowList))
        Case $nMsg = $Flash
            WinFlash(GUICtrlRead($WindowList), "" , GUICtrlRead($HowManyInput))
        Case $nMsg = $GetProcess
            $Get = WinGetProcess(GUICtrlRead($WindowList))
            MsgBox(0, Default, "Process ID: " & $Get)
        Case $nMsg = $GetText
            $Get = WinGetText(GUICtrlRead($WindowList))
            MsgBox(0, Default, "Text found:" & @CRLF & $Get)
        Case $nMsg = $KillWindow
            WinKill(GUICtrlRead($WindowList))
        Case $nMsg = $Refresh
            _Refresh()
        Case $nMsg = $ReturnMenu
            GUIDelete($GUI)
            _Menu()
        EndSelect
    WEnd
EndFunc

Func _Password()
    $GUI = GUICreate("* Set Password *", 270, 110, -1, -1)
    GUICtrlCreateLabel("Password", 10, 10)
    GUICtrlCreateLabel("Encrypt Password", 10, 31)
    GUICtrlCreateLabel("Encrypt Level", 10, 52)
    $Password = GUICtrlCreateInput("", 110, 7, 150, 20, $ES_PASSWORD)
    $EncryptPassword = GUICtrlCreateInput("", 110, 28, 150, 20, $ES_PASSWORD)
    $EncryptLevel = GUICtrlCreateInput(1, 110, 49, 40, 20)
    $UpDown = GUICtrlCreateUpDown($EncryptLevel)
    GUICtrlSetLimit($UpDown, 10, 1)
    $CreatePassword = GUICtrlCreateButton("Create Password", 60, 75, 150)
    
    GUISetState()
    While 1
        $nMsg = GUIGetMsg()
        Select
        Case $nMsg = -3
            GUIDelete($GUI)
            _Menu()
        Case $nMsg = $CreatePassword
            $Read_Password = GUICtrlRead($Password)
            $Read_EncryptPassword = GUICtrlRead($EncryptPassword)
            $Read_Level = GUICtrlRead($EncryptLevel)
            $Encrypted_Pass = _StringEncrypt(1, $Read_Password, $Read_EncryptPassword, $Read_Level)
            IniWrite("C:\temp\$~settings.ini", "Password", "Pass", $Encrypted_Pass)
            IniWrite("C:\temp\$~settings.ini", "Password", "EncPass", $Read_EncryptPassword)
            IniWrite("C:\temp\$~settings.ini", "Password", "EncLevel", $Read_Level)
            GUIDelete($GUI)
            MsgBox(64, "* Password *", "Password succesfully set. Please restart the program.")
            Exit
        EndSelect
    WEnd
EndFunc

Func _Customizing()
EndFunc

Func _Homepage()
    ShellExecute("http://www.autoitscript.com/")
EndFunc

; # START - FUNCTIONS #
Func _Check()
    If FileExists("C:\temp\$~settings.ini") And IniRead("C:\temp\$~settings.ini", "Password", "Pass", "Not Found") <> "Not Found" Then
        $GetPassword = InputBox("* Password *", "Please enter the password", "", "*", 200, 130)
        $Read_Pass = IniRead("C:\temp\$~settings.ini", "Password", "Pass", "Not Found")
        $Read_EncPass = IniRead("C:\temp\$~settings.ini", "Password", "EncPass", "Not Found")
        $Read_EncLevel = IniRead("C:\temp\$~settings.ini", "Password", "EncLevel", "Not Found")
        If _StringEncrypt(0, $Read_Pass, $Read_EncPass, $Read_EncLevel) == $GetPassword Then
            MsgBox(64, "* Succes *", "Password Correct.")
        Else
            MsgBox(16, "* ERROR *", "Wrong Password!")
            Exit
        EndIf
    EndIf
EndFunc

Func _Refresh()
$List = WinList()
For $i = 1 To $List[0][0]
    If $List[$i][0] <> "" And IsVisible($List[$i][1]) Then
        GUICtrlSetData($WindowList, $List[$i][0])
    EndIf
Next
EndFunc

Func IsVisible($Handle)
    If BitAnd(WinGetState($Handle), 2) Then 
        Return 1
    Else
        Return 0
    EndIf
EndFunc

Func _GetColor()
    $pos = MouseGetPos()
    $GetColor = PixelGetColor($pos[0], $pos[1])
    $Hex = "0x" & Hex($GetColor, 6)
    GUICtrlSetData($PixelColor, $Hex)
EndFunc

Func _GetMousePos()
    $pos = MouseGetPos()
    GUICtrlSetData($xPos, $pos[0])
    GUICtrlSetData($yPos, $pos[1])
EndFunc

Func _GetLang($Param1)
    Select
    Case StringInStr("0413,0813", $Param1)
        Return "Dutch"
    Case StringInStr("0409,0809,0c09,1009,1409,1809,1c09,2009,2409,2809,2c09,3009,3409", $Param1)
        Return "English"
    Case StringInStr("040c,080c,0c0c,100c,140c,180c", $Param1)
        Return "French"
    Case StringInStr("0407,0807,0c07,1007,1407", $Param1)
        Return "German"
    Case StringInStr("0410,0810", $Param1)
        Return "Italian"
    Case StringInStr("0414,0814", $Param1)
        Return "Norwegian"
    Case StringInStr("0415", $Param1)
        Return "Polish"
    Case StringInStr("0416,0816", $Param1)
        Return "Portuguese"
    Case StringInStr("040a,080a,0c0a,100a,140a,180a,1c0a,200a,240a,280a,2c0a,300a,340a,380a,3c0a,400a,440a,480a,4c0a,500a", $Param1)
        Return "Spanish"
    Case StringInStr("041d,081d", $Param1)
        Return "Swedish"
    Case Else
        Return "Other"
    EndSelect
EndFunc

Func _GetKBLayout($Param1)
    Select
    Case StringInStr("0436", $Param1)
        Return "Afrikaans"
    Case StringInStr("041c", $Param1)
        Return "Albanian"
    Case StringInStr("0401,0801,0c01,1001,1401,1801,1c01,3001,3401,3801,3c01,4001", $Param1)
        Return "Arabic"
    Case StringInStr("042b", $Param1)
        Return "Armenian"
    Case StringInStr("042c,082c", $Param1)
        Return "Azeri"
    Case StringInStr("042d", $Param1)
        Return "Basque"
    Case StringInStr("0423", $Param1)
        Return "Belarusian"
    Case StringInStr("0402", $Param1)
        Return "Bulgarian"
    Case StringInStr("0403", $Param1)
        Return "Catalan"
    Case StringInStr("0404,0804,0c04,1004,1404", $Param1)
        Return "Chinese"
    Case StringInStr("041a", $Param1)
        Return "Croatian"
    Case StringInStr("0405", $Param1)
        Return "Czech"
    Case StringInStr("0406", $Param1)
        Return "Danish"
    Case StringInStr("0413,0813", $Param1)
        Return "Dutch"
    Case StringInStr("0409,0809,0c09,1009,1409,1809,1c09,2009,2409,2809,2c09,3009,3409", $Param1)
        Return "English"
    Case StringInStr("0425", $Param1)
        Return "Estonian"
    Case StringInStr("0438", $Param1)
        Return "Faeroese"
    Case StringInStr("0429", $Param1)
        Return "Farsi"
    Case StringInStr("040b", $Param1)
        Return "Finnish"
    Case StringInStr("040c,080c,0c0c,100c,140c,180c", $Param1)
        Return "French"
    Case StringInStr("0437", $Param1)
        Return "Georgian"
    Case StringInStr("0407,0807,0c07,1007,1407", $Param1)
        Return "German"
    Case StringInStr("408", $Param1)
        Return "Greek"
    Case StringInStr("040d", $Param1)
        Return "Hebrew"
    Case StringInStr("0439", $Param1)
        Return "Hindi"
    Case StringInStr("040e", $Param1)
        Return "Hungarian"
    Case StringInStr("040f", $Param1)
        Return "Icelandic"
    Case StringInStr("0421", $Param1)
        Return "Indonesian"
    Case StringInStr("0410,0810", $Param1)
        Return "Italian"
    Case StringInStr("0411", $Param1)
        Return "Japanese"
    Case StringInStr("034f", $Param1)
        Return "Kazakh"
    Case StringInStr("0412", $Param1)
        Return "Konkani"
    Case StringInStr("0412", $Param1)
        Return "Korean"
    Case StringInStr("0426", $Param1)
        Return "Latvian"
    Case StringInStr("0427", $Param1)
        Return "Lithuanian"
    Case StringInStr("042f", $Param1)
        Return "Macedonian"
    Case StringInStr("043e,083e", $Param1)
        Return "Malay"
    Case StringInStr("044e", $Param1)
        Return "Marathi"
    Case StringInStr("0414,0814", $Param1)
        Return "Norwegian"
    Case StringInStr("0415", $Param1)
        Return "Polish"
    Case StringInStr("0416,0816", $Param1)
        Return "Portuguese"
    Case StringInStr("0418", $Param1)
        Return "Romanian"
    Case StringInStr("0419", $Param1)
        Return "Russian"
    Case StringInStr("044f", $Param1)
        Return "Sanskrit"
    Case StringInStr("081a,0c1a", $Param1)
        Return "Serbian"
    Case StringInStr("041b", $Param1)
        Return "Slovak"
    Case StringInStr("0424", $Param1)
        Return "Slovenian"
    Case StringInStr("040a,080a,0c0a,100a,140a,180a,1c0a,200a,240a,280a,2c0a,300a,340a,380a,3c0a,400a,440a,480a,4c0a,500a", $Param1)
        Return "Spanish"
    Case StringInStr("0441", $Param1)
        Return "Swahili"
    Case StringInStr("041d,081d", $Param1)
        Return "Swedish"
    Case StringInStr("0449", $Param1)
        Return "Tamil"
    Case StringInStr("0444", $Param1)
        Return "Tatar"
    Case StringInStr("041e", $Param1)
        Return "Thai"
    Case StringInStr("041f", $Param1)
        Return "Turkish"
    Case StringInStr("0422", $Param1)
        Return "Ukrainian"
    Case StringInStr("0420", $Param1)
        Return "Urdu"
    Case StringInStr("0443,0843", $Param1)
        Return "Uzbek"
    Case StringInStr("042a", $Param1)
        Return "Vietnamese"
    Case Else
        Return "Other"
    EndSelect
EndFunc
; # END - FUNCTIONS #

I need some help on the _Check() to check if password is set. If password is set, display a Inputbox for the password, decrypt is and set * Set Password * button disable. Fixed that one.

Now I need some help on the _Customizing(). The idea is to create a GUI where you can select all colors for the program. Example: GUI Bk Color, Font, Font Color, Button Color etc. I have an idea how to do that, but its with IniWrite and IniRead again ($~settings.ini). But I dont know how to get it on all those others GUI's then.

Any ideas are welcome

AlmarM

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Pretty Nifty App.. Would be cool to maybe have the app launcher setup to add/remove buttons. I like it! Thanks for sharing...

edit: typo

Edited by gesller

Share this post


Link to post
Share on other sites

Pretty Nifty App.. Would be cool to maybe have the app launcher setup to add/remove buttons. I like it! Thanks for sharing...

edit: typo

Hmm, what do you mean with 'add/remove' buttons?

I think its a good idea :P but can you explain me some more :(?

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Updated! Added Window Manager.

Now I need to some help on _Check().

Description in the first post!

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Hmm, what do you mean with 'add/remove' buttons?

I think its a good idea :P but can you explain me some more :(?

AlmarM

I think he means the ability to customize the app launcher.

Very neat. :idea:

Share this post


Link to post
Share on other sites

I like the idea!

Suggestion 1: hide the main gui instead of deleting it and recreating it again and again... by hiding it it won't center itself on and on and it's more efficient

Suggestion 2: let the user customize his tool; dunno - colors, buttons if you can...

Keep up the good work

Share this post


Link to post
Share on other sites

Yeah! Your right!

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

It works great. One problem (maybe), if go to create password and then just click exit, the whole program exits.

I don't use stuff like this because hotkeys, startmenu and quick launch are all faster.


My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post


Link to post
Share on other sites

thanks for sharing this.

same "problem here" when closing the password window the whole tool closes.

possible fix:

Case $nMsg = -3

GUIDelete($GUI)

_Menu()

instead of Exit command

*******

you were asking:

I need some help on the _Check() to check if password is set. If password is set, display a Inputbox for the password, decrypt is and set * Set Password * button disable.

try this:

Func _Menu()

$GUI = GUICreate("Menu~", 170, 285, -1, -1)

$ApplicationLauncher = GUICtrlCreateButton("Application Launcher", 10, 10, 150)

$ComputerInformation = GUICtrlCreateButton("Computer Information", 10, 40, 150)

$MouseInformation = GUICtrlCreateButton("Mouse Information", 10, 70, 150)

$Hexing = GUICtrlCreateButton("Hexing", 10, 100, 150)

$ComputerPrograms = GUICtrlCreateButton("Computer Programs", 10, 130, 150)

$Games = GUICtrlCreateButton("Games", 10, 160, 150)

$WindowManager = GUICtrlCreateButton("Window Manager", 10, 190, 150)

$Password = GUICtrlCreateButton("* Set Password *", 10, 220, 150)

$Homepage = GUICtrlCreateButton("AutoIt Homepage", 10, 250, 150)

$ConfigFile = "C:\temp\$~settings.ini"

$k = _FileCountLines ($ConfigFile)

For $i = 1 to $k Step 1

$ReadFile = FileReadLine($ConfigFile, $i)

If StringInStr($ReadFile,"Pass=") Then

$Split = StringSplit($ReadFile,"Pass=",1)

$ReadSplit = $Split[$Split[0]]

If $ReadSplit <> "" Then

GUICtrlSetState($Password,$GUI_DISABLE)

EndIf

EndIf

Next

[........]

This will read the settings.ini and if there is a password stored it will disable the button in the main gui.

You need to #include<File.au3> for the _FileCountLines command or leave it out and use a number (possible number of lines in the final settings.ini) instead of $k

hope this helps

cheers

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

thanks for sharing this.

same "problem here" when closing the password window the whole tool closes.

possible fix:

Case $nMsg = -3

GUIDelete($GUI)

_Menu()

instead of Exit command

*******

you were asking:

I need some help on the _Check() to check if password is set. If password is set, display a Inputbox for the password, decrypt is and set * Set Password * button disable.

try this:

Func _Menu()

$GUI = GUICreate("Menu~", 170, 285, -1, -1)

$ApplicationLauncher = GUICtrlCreateButton("Application Launcher", 10, 10, 150)

$ComputerInformation = GUICtrlCreateButton("Computer Information", 10, 40, 150)

$MouseInformation = GUICtrlCreateButton("Mouse Information", 10, 70, 150)

$Hexing = GUICtrlCreateButton("Hexing", 10, 100, 150)

$ComputerPrograms = GUICtrlCreateButton("Computer Programs", 10, 130, 150)

$Games = GUICtrlCreateButton("Games", 10, 160, 150)

$WindowManager = GUICtrlCreateButton("Window Manager", 10, 190, 150)

$Password = GUICtrlCreateButton("* Set Password *", 10, 220, 150)

$Homepage = GUICtrlCreateButton("AutoIt Homepage", 10, 250, 150)

$ConfigFile = "C:\temp\$~settings.ini"

$k = _FileCountLines ($ConfigFile)

For $i = 1 to $k Step 1

$ReadFile = FileReadLine($ConfigFile, $i)

If StringInStr($ReadFile,"Pass=") Then

$Split = StringSplit($ReadFile,"Pass=",1)

$ReadSplit = $Split[$Split[0]]

If $ReadSplit <> "" Then

GUICtrlSetState($Password,$GUI_DISABLE)

EndIf

EndIf

Next

[........]

This will read the settings.ini and if there is a password stored it will disable the button in the main gui.

You need to #include<File.au3> for the _FileCountLines command or leave it out and use a number (possible number of lines in the final settings.ini) instead of $k

hope this helps

cheers

Notice the password is Encrypted when pressing 'Create Password'

AlmarM

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

HA!, Fixed _Check().

Now I need some help on _Customizing(). Description in the first post!

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Notice the password is Encrypted when pressing 'Create Password'

AlmarM

that wouldn't matter because the one I gave you only checks if a password was written to the ini file...

well, that was just an idea...

Share this post


Link to post
Share on other sites

Oh didnt read well!

Sorry dude :P

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Oh didnt read well!

Sorry dude :)

AlmarM

Sorry for bumping the old topic.

Nice and neat application. I really like it because I sometimes

refer to your source. Really helpfully to understand windows components.

Anyway, I'd just wanna make suggestion.

It could be really useful if user can launch application straight to the point without hassling to search program/app that can be launched.

Example, search for the *.exe extension and create a list where user can easily select. It maybe a little bit difficult or impossible as each software vendor provide different structure of folder or path of the *.exe.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0