BrettF Posted November 13, 2007 Share Posted November 13, 2007 (edited) XO_Shell is my version of the OS shell for the competition. Features:OS_SHELLCustomizable backgroundCustomizable background for start menuSample image files (Backgrounds/Start Menu/Icons/Start-up Sound/User Icons...)Password Protection (User Logon)SettingsSearchEasy Identifiable CPU and Battery (Battery only displayed if you are on a laptop)Coming Soon:File ExplorerMy Programs ListMy ShortcutsKnown Bugs:Strange Flickering in User Taskbar (seems to be fixed) User Taskbar does not display the windowsHope you like Download Link V1.0.0.5Full Version with Full Resource Pack (13.8MB)Lite Version with Essential Resource Pack (2.29MB)Update Pack (898KB)NOTE: The update Pack is meant only to an update for XO_Shell. Please download any of the above installers for first time use. Instructions are provided inside the .zip.Screenies:Login Screen:Background/Main Desktop:Start Menu:Source Code:Main Code:expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseAnsi=y #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_plugin_funcs = MD5Hash #include <GUIConstants.au3> #Include <Date.au3> #include <Array.au3> #Include <GuiComboBox.au3> #Include <GuiListView.au3> #Include <WinAPI.au3> ;Opt("RunErrorsFatal", 0) Opt("WinTitleMatchMode", 2) ; Initialize error handler $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") ; Declare Global Vars Global $SYSTEM_POWER_STATUS = DllStructCreate("byte;byte;byte;byte;int;int") Global $timer = TimerInit() Global $liOldIdleTime = 0 Global $liOldSystemTime = 0 Global $numbercount Global $prgmenu, $user, $pass Global $size = _GetWorkingArea() Global $tasklabelNotepad Global $hnotes Global $width = $size[2] Global $height = $size[3] - 15 Global $refer Global $winlist[1] ; Create Main GUI Global $hGUI = GUICreate("XO-Shell", $width, $height + 20, 0, 0, BitOR($DS_SETFOREGROUND, $WS_CAPTION, $WS_BORDER, $WS_POPUP, $WS_SYSMENU, $WS_CLIPCHILDREN)) GUISetBkColor(0x004E98) GUISetState(@SW_SHOW) ; Checks if settings file is found. If FileExists(@ScriptDir & "\settings.ini") <> 1 Then _CreateUser() Else ;If so, log the user in. $user = IniRead(@ScriptDir & "\settings.ini", "USER", "USERNAME", "") $pass = IniRead(@ScriptDir & "\settings.ini", "USER", "PASSWORD", "") $plH = PluginOpen(@ScriptDir & "\MD5Hash.dll") $val = 0 Do $login = _LoginBox("Enter Credentials", "Please enter you username and password", $user, "", True, -1, -1, -1, -1, 0) If @error Then Exit Else If $pass == MD5Hash ($login[1], 2, True) Then $val += 1 Else $val = -1 EndIf If $user == $login[0] Then $val += 1 Else $val = -1 EndIf If $val < 0 Then MsgBox(16, "Error!", "Username or Password does not match!") EndIf EndIf Until $val >= 2 PluginClose($plH) EndIf ;Read the settings file for the bkg. if not, the current bkg is used and added to the settings file. #Region ### START Koda GUI section ### Form=d:\my documents\files\au3\my scripts\os_shell\maingui.kxf If IniRead(@ScriptDir & "\settings.ini", "SETTINGS", "BKG", "") = "" Then IniWrite(@ScriptDir & "\settings.ini", "SETTINGS", "BKG", RegRead('HKCU\Control Panel\Desktop', 'Wallpaper')) EndIf ;Plays startup sound SoundPlay(@ScriptDir & "\RES\Sounds\Startup.wav") ; Create the controls $picBKG = GUICtrlCreatePic(IniRead(@ScriptDir & "\settings.ini", "SETTINGS", "BKG", ""), 0, 0, $width, $height - 25, BitOR($SS_NOTIFY, $WS_GROUP)) GUICtrlSetState(-1, $GUI_DISABLE) $date = _NowDate() $timing = GUICtrlCreateLabel(_NowTime(), $width - 70, $height - 22, 60, 20, $WS_BORDER + $SS_RIGHT) GUICtrlSetTip(-1, $date) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0XFFFFFF) $lblCPU = GUICtrlCreateLabel("100 %", $width - 140, $height - 22, 65, 20, $WS_BORDER + $SS_RIGHT) GUICtrlSetTip(-1, "CPU Usage") GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0XFFFFFF) ; Get battery data $batt = _GetBattery() If $batt = -1 Then $batt = False Else $lblBatt = GUICtrlCreateLabel($batt, $width - 210, $height - 22, 65, 20, $WS_BORDER + $SS_RIGHT) GUICtrlSetTip(-1, "Battery") GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0XFFFFFF) $batt = True EndIf $btnStartMenu = GUICtrlCreateButton("Start", 0, $height - 25, 75, 25, -1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $var = _WindowList() If $var[0][0] <> 0 Then ReDim $winlist[$var[0][0]] $x = 80 For $i = 1 To $var[0][0] - 1 $len = StringLen($var[$i][0]) $title = StringLeft($var[$i][0], 11) If $len > 11 Then $title = StringLeft($title, 11) & "..." EndIf $winlist[$i] = GUICtrlCreateLabel($title, $x, $height - 22, 110, 20, $WS_BORDER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0XFFFFFF) GUICtrlSetTip(-1, $var[$i][0]) $x += 115 Next EndIf ; Enable the background func. AdlibEnable("BKGFUNC", 1) _CheckUpdates() While 1 $msg = GUIGetMsg() $var = _WindowList() Select Case $var[0][0] <> $winlist[0] For $x = 1 To $winlist[0] GUICtrlDelete($winlist[$x]) Next If $var[0][0] <> 0 Then ReDim $winlist[$var[0][0]] $x = 80 For $i = 1 To $var[0][0] - 1 $len = StringLen($var[$i][0]) $title = StringLeft($var[$i][0], 11) If $len > 11 Then $title = StringLeft($title, 11) & "..." EndIf $var[$i][2] = GUICtrlCreateLabel($title, $x, $height - 22, 110, 20, $WS_BORDER) GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0XFFFFFF) GUICtrlSetTip(-1, $var[$i][0]) $x += 115 Next EndIf Case Else For $i = 1 To $winlist[0] $msg = GUIGetMsg() Select Case $msg = $var[$i][2] WinSetState($var[$i][1], "", @SW_RESTORE) EndSelect Next EndSelect WEnd #region Bkg ;=============================================================================== ; Background Functions ;=============================================================================== ;=============================================================================== ; ; Function Name: _GetWorkingArea() ; Description: Returns the coordinates of desktop working area rectangle ; Parameter(s): None ; Return Value(s): On Success - Array containing coordinates: ; $a[0] = left ; $a[1] = top ; $a[2] = right ; $a[3] = bottom ; On Failure - 0 ; ;=============================================================================== Func _GetWorkingArea() #cs BOOL WINAPI SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni); uiAction SPI_GETWORKAREA = 48 #ce Local $dRECT = DllStructCreate("long; long; long; long") Local $spiRet = DllCall("User32.dll", "int", "SystemParametersInfo", _ "uint", 48, "uint", 0, "ptr", DllStructGetPtr($dRECT), "uint", 0) If @error Then Return 0 If $spiRet[0] = 0 Then Return 0 Local $aRet[4] = [DllStructGetData($dRECT, 1), DllStructGetData($dRECT, 2), DllStructGetData($dRECT, 3), DllStructGetData($dRECT, 4) ] Return $aRet EndFunc ;==>_GetWorkingArea ;=============================================================================== ; ; Function Name: _LoginBox ; Description:: Create a basic login box with Username, Password, and a prompt. ; Parameter(s): Title - [Required] ; - The title of the Form ; Prompt - [Required] ; - The prompt for the user ; uDefault - [Optional] - Default Value = "" ; - The default vaue for the Username Input ; pDefault - [Optional] - Default Value = "" ; - The default vaue for the Password Input ; bBlank - [Optional] - Default Value = True ; - Set whether the password or username can be blank. ; - True = Cannot be blank ; - False = Blank is allowed ; Width - [Optional] - Default Value = 250 ; - The width of the Login Box ; Height - [Optional] - Default Value = 130 ; - The height of the Login Box ; Left - [Optional] - Default Value = Auto Center Screen ; - The positioning (Left) of the Login Box ; Top - [Optional] - Default Value = Auto Center Screen ; - The positioning (Top) of the Login Box ; Timeout - [Optional] - Default Value = -1 (No Timeout) ; - The timeout of the Login Box ; ShowError - [Optional] - Default Value = 0 (Do Not Show) ; - Sets whether prompts are displayed to the user with timeout. ; - 0 = Do not Show ; - 1 = Show ; Requirement(s): none ; Return Value(s): Success: ; - Sets @error to 0 (@extended = 0 See exeptions below) ; - Returns a 1D array with the following ; - [0] = Username ; - [1] = Password ; - Exeptions: ; - When bBlank is True and ; The timeout has been reached ; - @extended = 1 ; - @error = 0 ; Failure ; - Sets @error to 0 ; - Sets @extended to: ; - 1 - The Cancel or Exit Button was Pressed ; - 2 - The Login Box Timed Out. ; Author(s): Brett Francis (exodus.is.me@hotmail.com) ; Note(s): none ; ;=============================================================================== Func _LoginBox($title, $prompt, $uDefault = "", $pDefault = "", $bBlank = True, $width = 250, $height = 130, $left = -1, $top = -1, $timeout = -1, $ShowError = 0) Select Case $uDefault = -1 $uDefault = "" ContinueCase Case $pDefault = -1 $pDefault = "" ContinueCase Case $bBlank = -1 $bBlank = True ContinueCase Case $width = -1 $width = 250 ContinueCase Case $height = -1 $height = 130 ContinueCase Case $left = -1 $left = (@DesktopWidth / 2) - ($width / 2) ContinueCase Case $top = -1 $top = (@DesktopHeight / 2) - ($height / 2) ContinueCase EndSelect Local $retarr[2] $gui = GUICreate($title, $width, $height, $left, $top) $username = GUICtrlCreateInput($uDefault, 72, 42, 173, 21) $password = GUICtrlCreateInput($pDefault, 72, 70, 173, 21, $ES_PASSWORD) $okbtn = GUICtrlCreateButton("&OK", 90, 96, 75, 25, 0) $cancelbtn = GUICtrlCreateButton("&Cancel", 171, 96, 75, 25, 0) $Label1 = GUICtrlCreateLabel("Password:", 4, 72, 62, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label1 = GUICtrlCreateLabel("Username:", 4, 44, 64, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel($prompt, 4, 4, 201, 17) GUICtrlSetState($okbtn, $GUI_DEFBUTTON) GUISetState(@SW_SHOW) $time = TimerInit() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE $case = 0 ExitLoop Case $msg = $okbtn If $bBlank = False Then $case = 1 ExitLoop Else If GUICtrlRead($username) <> "" And GUICtrlRead($password) <> "" Then $case = 1 ExitLoop Else Select Case GUICtrlRead($username) = "" And GUICtrlRead($password) = "" MsgBox(16, "Error!", "Username and Password cannot be blank!") Case GUICtrlRead($password) = "" MsgBox(16, "Error!", "Password cannot be blank!") GUICtrlSetState($password, $GUI_FOCUS) Case GUICtrlRead($username) = "" MsgBox(16, "Error!", "Username cannot be blank!") GUICtrlSetState($username, $GUI_FOCUS) EndSelect EndIf EndIf Case $msg = $cancelbtn $case = 0 ExitLoop Case TimerDiff($time) > $timeout And $timeout If $bBlank = False Then $case = 2 ExitLoop Else Select Case GUICtrlRead($username) = "" And GUICtrlRead($password) = "" $time = TimerInit() If $ShowError = 1 Then MsgBox(16, "Error!", "Username and Password cannot be blank!") Case GUICtrlRead($password) = "" $time = TimerInit() If $ShowError = 1 Then MsgBox(16, "Error!", "Password cannot be blank!") GUICtrlSetState($password, $GUI_FOCUS) EndIf Case GUICtrlRead($username) = "" $time = TimerInit() If $ShowError = 1 Then MsgBox(16, "Error!", "Username cannot be blank!") GUICtrlSetState($username, $GUI_FOCUS) EndIf Case Else If GUICtrlRead($username) <> "" And GUICtrlRead($password) <> "" Then $case = 3 ExitLoop EndIf EndSelect EndIf EndSelect WEnd If $case = 0 Then;Cancel/Exit Button Pressed GUIDelete($gui) Return SetError(1, 1, 0) ElseIf $case = 2 Then;Timed Out GUIDelete($gui) Return SetError(1, 2, 0) ElseIf $case = 1 Then;Ok Pressed $retarr[0] = GUICtrlRead($username) $retarr[1] = GUICtrlRead($password) GUIDelete($gui) Return SetError(0, 0, $retarr) ElseIf $case = 3 Then;Username Fields Not Blank, Timeout reached $retarr[0] = GUICtrlRead($username) $retarr[1] = GUICtrlRead($password) GUIDelete($gui) Return SetError(0, 1, $retarr) EndIf EndFunc ;==>_LoginBox ;=============================================================================== ; Creates a new user ;=============================================================================== Func _CreateUser() $gui = GUICreate("New User", 250, 130, -1, -1) $username = GUICtrlCreateInput("", 72, 42, 173, 21) $password = GUICtrlCreateInput("", 72, 70, 173, 21, $ES_PASSWORD) $okbtn = GUICtrlCreateButton("&OK", 90, 96, 75, 25, 0) $cancelbtn = GUICtrlCreateButton("&Cancel", 171, 96, 75, 25, 0) $Label1 = GUICtrlCreateLabel("Password:", 4, 72, 62, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label1 = GUICtrlCreateLabel("Username:", 4, 44, 64, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("Please enter a username and password to " & @CRLF & "create a new user.", 4, 4, 201, 30) GUICtrlSetState($okbtn, $GUI_DEFBUTTON) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Or $msg = $cancelbtn Exit Case $msg = $okbtn If GUICtrlRead($username) <> "" And GUICtrlRead($password) <> "" Then $plH = PluginOpen(@ScriptDir & "\MD5Hash.dll") IniWrite(@ScriptDir & "\settings.ini", "USER", "USERNAME", GUICtrlRead($username)) IniWrite(@ScriptDir & "\settings.ini", "USER", "PASSWORD", MD5Hash (GUICtrlRead($password), 2, True)) PluginClose($plH) ExitLoop Else Select Case GUICtrlRead($username) = "" And GUICtrlRead($password) = "" MsgBox(16, "Error!", "Username and Password cannot be blank!") Case GUICtrlRead($password) = "" MsgBox(16, "Error!", "Password cannot be blank!") GUICtrlSetState($password, $GUI_FOCUS) Case GUICtrlRead($username) = "" MsgBox(16, "Error!", "Username cannot be blank!") GUICtrlSetState($username, $GUI_FOCUS) EndSelect EndIf EndSelect WEnd GUIDelete($gui) EndFunc ;==>_CreateUser ;=============================================================================== ; CPU INFOMATION ;=============================================================================== Func _ProcessListCPU($init = 0) Local $SYS_BASIC_INFO = 0 Local $SYS_PERFORMANCE_INFO = 2 Local $SYS_TIME_INFO = 3 $SYSTEM_BASIC_INFORMATION = DllStructCreate("int;uint;uint;uint;uint;uint;uint;ptr;ptr;uint;byte;byte;short") $Status = DllCall("ntdll.dll", "int", "NtQuerySystemInformation", "int", $SYS_BASIC_INFO, _ "ptr", DllStructGetPtr($SYSTEM_BASIC_INFORMATION), _ "int", DllStructGetSize($SYSTEM_BASIC_INFORMATION), _ "int", 0) If $Status[0] Then Return -1 While 1 $SYSTEM_PERFORMANCE_INFORMATION = DllStructCreate("int64;int[76]") $SYSTEM_TIME_INFORMATION = DllStructCreate("int64;int64;int64;uint;int") $Status = DllCall("ntdll.dll", "int", "NtQuerySystemInformation", "int", $SYS_TIME_INFO, _ "ptr", DllStructGetPtr($SYSTEM_TIME_INFORMATION), _ "int", DllStructGetSize($SYSTEM_TIME_INFORMATION), _ "int", 0) If $Status[0] Then Return -2 $Status = DllCall("ntdll.dll", "int", "NtQuerySystemInformation", "int", $SYS_PERFORMANCE_INFO, _ "ptr", DllStructGetPtr($SYSTEM_PERFORMANCE_INFORMATION), _ "int", DllStructGetSize($SYSTEM_PERFORMANCE_INFORMATION), _ "int", 0) If $Status[0] Then Return -3 If $init = 1 Or $liOldIdleTime = 0 Then $liOldIdleTime = DllStructGetData($SYSTEM_PERFORMANCE_INFORMATION, 1) $liOldSystemTime = DllStructGetData($SYSTEM_TIME_INFORMATION, 2) Sleep(1000) If $init = 1 Then Return -99 Else $dbIdleTime = DllStructGetData($SYSTEM_PERFORMANCE_INFORMATION, 1) - $liOldIdleTime $dbSystemTime = DllStructGetData($SYSTEM_TIME_INFORMATION, 2) - $liOldSystemTime $liOldIdleTime = DllStructGetData($SYSTEM_PERFORMANCE_INFORMATION, 1) $liOldSystemTime = DllStructGetData($SYSTEM_TIME_INFORMATION, 2) $dbIdleTime = $dbIdleTime / $dbSystemTime $dbIdleTime = 100.0 - $dbIdleTime * 100.0 / DllStructGetData($SYSTEM_BASIC_INFORMATION, 11) + 0.5 Return Round($dbIdleTime, 0) EndIf $SYSTEM_PERFORMANCE_INFORMATION = 0 $SYSTEM_TIME_INFORMATION = 0 WEnd EndFunc ;==>_ProcessListCPU ;=============================================================================== ; Get Battery Stats ;=============================================================================== Func _GetBattery() Local $power $Status = DllStructGetData($SYSTEM_POWER_STATUS, 1) $test = DllCall("kernel32.dll", "int", "GetSystemPowerStatus", "ptr", DllStructGetPtr($SYSTEM_POWER_STATUS)) If DllStructGetData($SYSTEM_POWER_STATUS, 3) <> $power Then $battery_status = "Charging" $power = DllStructGetData($SYSTEM_POWER_STATUS, 3) Else $power = "N/A" EndIf If DllStructGetData($SYSTEM_POWER_STATUS, 1) = 1 And $Status = 1 Then $timeleft = Round((DllStructGetData($SYSTEM_POWER_STATUS, 3) * (TimerDiff($timer) / 1000)) / 60, 0) $power = DllStructGetData($SYSTEM_POWER_STATUS, 3) ElseIf DllStructGetData($SYSTEM_POWER_STATUS, 1) = 0 And $Status = 0 Then $timeleft = Round((DllStructGetData($SYSTEM_POWER_STATUS, 3) * (TimerDiff($timer) / 1000)) / 60, 0) $power = DllStructGetData($SYSTEM_POWER_STATUS, 3) EndIf Return $power EndFunc ;==>_GetBattery ;=============================================================================== ; Start Menu GUI ;=============================================================================== Func _CreateStartMenu() $bkg = "RES\STRMNU\IMAGE\" & IniRead(@ScriptDir & "\settings.ini", "STARTMNU", "BKG", "") MsgBox (0, "", $bkg) #Region ### START Koda GUI section ### Form=d:\my documents\Files\AU3\My Scripts\XO_Shell\StartMenu2.kxf $array = ControlGetPos($hGUI, "", $btnStartMenu) $top = $array[1] - 415 $strmenu = GUICreate($user, 334, 413, 0, $top) GUISwitch($strmenu) $Pic1 = GUICtrlCreatePic($bkg, 0, 0, 333, 412, BitOR($SS_NOTIFY, $WS_GROUP)) GUICtrlSetState(-1, $GUI_DISABLE) $MyDocs = GUICtrlCreatePic("RES\STRMNU\ITEMS\MyDocs.gif", 24, 64, 300, 50, BitOR($SS_NOTIFY, $WS_GROUP)) $MyProgs = GUICtrlCreatePic("RES\STRMNU\ITEMS\MyProgs.gif", 24, 8, 300, 50, BitOR($SS_NOTIFY, $WS_GROUP)) $MyControls = GUICtrlCreatePic("RES\STRMNU\ITEMS\Control.gif", 24, 119, 300, 50, BitOR($SS_NOTIFY, $WS_GROUP)) $MyShortcuts = GUICtrlCreatePic("RES\STRMNU\ITEMS\MyShorts.gif", 24, 176, 300, 50, BitOR($SS_NOTIFY, $WS_GROUP)) $Search = GUICtrlCreatePic("RES\STRMNU\ITEMS\search.gif", 24, 232, 300, 50, BitOR($SS_NOTIFY, $WS_GROUP)) $SeachInput = GUICtrlCreateInput("Quick Search", 24, 288, 269, 32) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $RunInput = GUICtrlCreateInput("Run", 24, 325, 269, 32) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") $SearchGo = GUICtrlCreateButton("Go", 296, 288, 32, 32, 0) $RunGo = GUICtrlCreateButton("Go", 296, 325, 32, 32, 0) $Shutdown = GUICtrlCreateButton("Shutdown", 228, 364, 103, 41, 0) GUICtrlSetFont(-1, 14, 400, 0, "MS Sans Serif") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg() $nmsg = WinGetState($strmenu) Select Case $msg = $GUI_EVENT_CLOSE Or Not BitAND($nmsg, 8) $exit = 1 ExitLoop Case $msg = $RunGo Or $msg = $RunInput $term = GUICtrlRead($RunInput) $exit = 2 ExitLoop Case $msg = $SearchGo Or $msg = $SeachInput $term = GUICtrlRead($SeachInput) $exit = 3 ExitLoop Case $msg = $Shutdown $exit = 4 ExitLoop Case $msg = $MyProgs $exit = 5 ExitLoop Case $msg = $MyDocs $exit = 6 ExitLoop Case $msg = $MyShortcuts $exit = 7 ExitLoop Case $msg = $MyControls $exit = 8 ExitLoop Case $msg = $Search $exit = 9 ExitLoop EndSelect WEnd GUIDelete($strmenu) If $exit = 1 Then ; Do Nothing ElseIf $exit = 2 Then $run = Run($term) If $run = 0 Then MsgBox(16, "ERROR!", "XOShell could not find the file specifed file or folder (" & $term & ") to open.") EndIf ElseIf $exit = 3 Then _SearchFor($term) ElseIf $exit = 4 Then _ShutDownDialouge() ElseIf $exit = 5 Then _MyProgs() ElseIf $exit = 6 Then _MYDocs() ElseIf $exit = 7 Then _MyShorts() ElseIf $exit = 8 Then _Settings() ElseIf $exit = 9 Then _SearchFor() EndIf EndFunc ;==>_CreateStartMenu ;=============================================================================== ; Shutdown box ;=============================================================================== Func _ShutDownDialouge() #Region ### START Koda GUI section ### Form=d:\my documents\Files\AU3\My Scripts\OS_Shell \Shutdown.kxf $shtdpwn = GUICreate("Shudown", 213, 183) $Label1 = GUICtrlCreateLabel("What would you like your computer to do?", 4, 4, 203, 17) $CboShutdown = GUICtrlCreateCombo("", 4, 28, 205, 25, $CBS_DROPDOWNLIST) GUICtrlSetData(-1, "Exit|Standby|Shutdown|Reboot|Hibernate", "Exit") $lblabout = GUICtrlCreateLabel("Exits this program", 4, 80, 203, 50) $btnOK = GUICtrlCreateButton("OK", 132, 152, 75, 25) GUICtrlSetState(-1, $GUI_DEFBUTTON) $btnCancel = GUICtrlCreateButton("Cancel", 52, 152, 75, 25) $chkForce = GUICtrlCreateCheckbox("Force", 4, 56, 201, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $CboShutdown Or $msg = $chkForce $Shutdown = GUICtrlRead($CboShutdown) Select Case $Shutdown = "Exit" $code = "Exits this program" Case $Shutdown = "Standby" $code = "Will send the computer into Standby Mode" Case $Shutdown = "Shutdown" $code = "Will shutdown this computer" Case $Shutdown = "Reboot" $code = "Will restart this computer" Case $Shutdown = "Hibernate" $code = "Will hibernate this computer, saving the current settings." EndSelect If GUICtrlRead($chkForce) = $GUI_CHECKED Then $code += @CRLF & @CRLF & "Force the current action" EndIf GUICtrlSetData($lblabout, $code) Case $msg = $btnOK $Shutdown = GUICtrlRead($CboShutdown) $code = 0 Select Case $Shutdown = "Exit" $code = 0 Case $Shutdown = "Standby" $code = 32 Case $Shutdown = "Shutdown" $code = 1 Case $Shutdown = "Reboot" $code = 2 Case $Shutdown = "Hibernate" $code = 64 EndSelect If GUICtrlGetState($chkForce) = $GUI_CHECKED Then $code += 4 EndIf If $code = 0 Then Exit Else MsgBox(0, "", "SHUTDOWN: " & $code) ;Shutdown ($code) Exit EndIf Case $msg = $btnCancel ExitLoop EndSelect WEnd GUIDelete($shtdpwn) EndFunc ;==>_ShutDownDialouge ;=============================================================================== ; Settings ;=============================================================================== #endregion Func _Settings() $PID = Run("Settings.exe", "", @SW_HIDE) _SetParentWindowPID($PID, $hGUI) EndFunc ;==>_Settings ;=============================================================================== ; My Docs ;=============================================================================== Func _MYDocs() #cs $PID = Run("Mydocs.exe") _SetParentWindowPID($PID, $hGUI) #ce EndFunc ;==>_MYDocs ;=============================================================================== ; My Programs ;=============================================================================== Func _MyProgs() MsgBox(0, "Not Completed Yet", "Sorry, But this is still to be completed...") EndFunc ;==>_MyProgs ;=============================================================================== ; My Shortcuts ;=============================================================================== Func _MyShorts() MsgBox(0, "Not Completed Yet", "Sorry, But this is still to be completed...") EndFunc ;==>_MyShorts ;=============================================================================== ; Search Func ;=============================================================================== Func _SearchFor($term = "Enter A Term") $PID = Run('Searcher.exe "' & $term & '"', "", @SW_HIDE) _SetParentWindowPID($PID, $hGUI) EndFunc ;==>_SearchFor ;=============================================================================== ; Background Function ;=============================================================================== Func BKGFUNC() If _NowTime() <> GUICtrlRead($timing) Then GUICtrlSetData($timing, _NowTime()) If $date = _NowDate() Then $date = _NowDate() EndIf $aProcessCPU = _ProcessListCPU() $delim = "" If $aProcessCPU < 10 Then $delim = " %" $textc = 0XFFFFFF $bkg = 0x0de518 ElseIf $aProcessCPU < 100 Then $delim = " %" If $aProcessCPU > 44 Then $textc = 0X000000 $bkg = 0xfff33a Else $textc = 0XFFFFFF $bkg = 0x0de518 EndIf Else $delim = " %" $textc = 0XFFFFFF $bkg = 0xE10716 EndIf If $aProcessCPU > 99 Then $aProcessCPU = 100 EndIf GUICtrlSetData($lblCPU, $aProcessCPU & $delim) GUICtrlSetBkColor($lblCPU, $bkg) GUICtrlSetColor($lblCPU, $textc) If $batt = True Then $getBatt = _GetBattery() $delim = "" If $getBatt < 10 Then $delim = " %" $textc = 0XFFFFFF $bkg = 0xE10716 ElseIf $getBatt < 100 Then $delim = " %" If $getBatt < 44 Then $textc = 0X000000 $bkg = 0xfff33a Else $textc = 0XFFFFFF $bkg = 0x0de518 EndIf Else $delim = " %" $textc = 0XFFFFFF $bkg = 0x0de518 EndIf GUICtrlSetData($lblBatt, $getBatt & $delim) GUICtrlSetBkColor($lblBatt, $bkg) GUICtrlSetColor($lblBatt, $textc) EndIf EndIf $msg = GUIGetMsg($hGUI) Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $btnStartMenu _CreateStartMenu() EndSelect EndFunc ;==>BKGFUNC ;------------------------------ This is a COM Error handler -------------------------------- Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) MsgBox(0, "COM Error Test", "We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & $HexNumber & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) SetError(1) ; to check for after this function returns EndFunc ;==>MyErrFunc Func IsVisible($handle) If BitAND(WinGetState($handle), 2) Then Return 1 Else Return 0 EndIf EndFunc ;==>IsVisible Func _SetParentWindowPID($PID, $hGUI) $hWnd = 0 $stPID = DllStructCreate("int") Do $winlist2 = WinList() For $i = 1 To $winlist2[0][0] If $winlist2[$i][0] <> "" Then DllCall("user32.dll", "int", "GetWindowThreadProcessId", "hwnd", $winlist2[$i][1], "ptr", DllStructGetPtr($stPID)) If DllStructGetData($stPID, 1) = $PID Then $hWnd = $winlist2[$i][1] ExitLoop EndIf EndIf Next Sleep(100) Until $hWnd <> 0 $stPID = 0 If $hWnd <> 0 Then $nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20) $nExStyle = $nExStyle[0] DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", -20, "int", BitOR($nExStyle, $WS_EX_MDICHILD)) DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI) WinSetState($hWnd, "", @SW_SHOW) _WinAPI_RedrawWindow ($hWnd) EndIf GUISetState() EndFunc ;==>_SetParentWindowPID Func OnAutoItExit() $hWnd = 0 $var = WinList() $hGUI = 0 For $i = 1 To $var[0][0] ; Only display visble windows that have a title If $var[$i][0] <> "" And IsVisible($var[$i][1]) And $var[$i][0] <> "XO-Shell" Then $hWnd = $var[$i][1] DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI) WinSetState($hWnd, "", @SW_SHOW) _WinAPI_RedrawWindow ($hWnd) EndIf Next EndFunc ;==>OnAutoItExit Func _WindowList() $var = WinList() Dim $ret[$var[0][0]][3] $ret[0][0] = 0 $len = 0 $title = "" $hWnd = 0 $count = 0 For $i = 1 To $var[0][0] If $var[$i][0] <> "" And IsVisible($var[$i][1]) And $var[$i][0] <> "XO-Shell" And $var[$i][0] <> "Program Manager" Then $count += 1 $ret[0][0] += 1 $ret[$count][0] = $var[$i][0] $ret[$count][1] = $var[$i][1] $nExStyle = DllCall("user32.dll", "int", "GetWindowLong", "hwnd", $hWnd, "int", -20) $nExStyle = $nExStyle[0] DllCall("user32.dll", "int", "SetWindowLong", "hwnd", $hWnd, "int", -20, "int", BitOR($nExStyle, $WS_EX_MDICHILD)) DllCall("user32.dll", "int", "SetParent", "hwnd", $hWnd, "hwnd", $hGUI) WinSetState($hWnd, "", @SW_SHOW) _WinAPI_RedrawWindow ($hWnd) EndIf Next If $count >= 1 Then ReDim $ret[$count][3] Return $ret Else ReDim $ret[1][1] $ret[0][0] = 0 Return $ret EndIf EndFunc ;==>_WindowList Func _CheckUpdates() If @IPAddress1 <> "127.0.0.1" Then InetGet("http://www.exod-soft.sittingonair.com/XOSHELL/Update.dat", "RES\TEMP\update.dat", 1, 0) If FileExists("update.dat") Then $new = IniReadSection("RES\TEMP\update.dat", "Version") If @error Then Return 0 $old = IniReadSection("update.dat", "Version") If @error Then Return 0 $case = False $read1 = IniRead("RES\TEMP\update.dat", "Version", "Read", "") If $read1 <> 1 Then $filehnd = FileOpen("RES\TEMP\update.dat", 2) FileWriteLine($filehnd, "[Version]") FileWriteLine($filehnd, "Read=1") For $i = 2 To 7 FileWriteLine($filehnd, $new[$i][0] & "=" & $new[$i][1]) If $new[$i][1] <> $old[$i][1] Then $case = True EndIf Next If $case = True Then $msgbox = MsgBox(4, "New Updates!", "New Updates are Avalible! Click Yes to navigate to the download site.") If $msgbox = 6 Then ShellExecute("http://www.exod-soft.sittingonair.com/XOSHELL") EndIf EndIf EndIf EndIf FileCopy("RES\TEMP\update.dat", "update.dat", 1) EndIf EndFunc ;==>_CheckUpdatesSearcher.exe:expandcollapse popup#Region;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=..\searcher.exe #EndRegion;**** Directives created by AutoIt3Wrapper_GUI **** If Not ProcessExists ("XO_Shell.exe") Then MsgBox (0, "ERROR!", "What are you trying to do?") Exit EndIf #include <GUIConstants.au3> #Include <GuiCombo.au3> #Include <GuiListView.au3> $term = $CmdLine[$CmdLine[0]] #Region ### START Koda GUI section ### Form=d:\my documents\files\au3\my scripts\xo_shell\searcher.kxf $Form1 = GUICreate("Searching...", 633, 446, 193, 115) $Group1 = GUICtrlCreateGroup("Search", 4, 0, 193, 441) $searchterm = GUICtrlCreateInput($term, 12, 36, 177, 21) $Label1 = GUICtrlCreateLabel("Search Term", 12, 16, 65, 17) $Search = GUICtrlCreateButton("Search", 116, 156, 75, 25, 0) $Group2 = GUICtrlCreateGroup("Current Selected Result", 12, 184, 177, 253) $Label2 = GUICtrlCreateLabel("Viewing Result: 00/00", 20, 204, 165, 17) $name = GUICtrlCreateLabel("Name:", 20, 224, 163, 17) $path = GUICtrlCreateLabel("Path:", 20, 240, 163, 17) $size = GUICtrlCreateLabel("Size (KB)", 20, 256, 163, 17) $filetime = GUICtrlCreateLabel("File Time:", 20, 272, 163, 17) $ver = GUICtrlCreateLabel("Version:", 20, 288, 163, 17) $imagepic = GUICtrlCreatePic("", 16, 324, 168, 108, BitOR($SS_NOTIFY, $WS_GROUP)) $ranking = GUICtrlCreateLabel("Rank:", 20, 304, 163, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $Label9 = GUICtrlCreateLabel("File Type", 12, 60, 47, 17) $filetype = GUICtrlCreateCombo("*.*", 12, 80, 177, 25) $location = GUICtrlCreateInput("My Computer", 12, 128, 121, 21) $browse = GUICtrlCreateButton("Browse", 136, 126, 55, 25, 0) $Label8 = GUICtrlCreateLabel("Location", 12, 104, 45, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $ListView1 = GUICtrlCreateListView("|", 204, 4, 426, 438) _GUICtrlListViewInsertColumn($ListView1, 1, "", 0, 30) _GUICtrlListViewDeleteColumn($ListView1, 0) _GUICtrlListViewInsertColumn($ListView1, 2, "Filename", 0, 175) _GUICtrlListViewInsertColumn($ListView1, 3, "Location", 0, 200) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### $aReturned = _RegEnum('HKEY_CLASSES_ROOT') For $i = 1 To $aReturned[0] _GUICtrlComboInsertString($filetype, -1, $aReturned[$i]) Next If $term <> "Enter A Term" Then $text = "Searching... Please wait while we process your request." _GUICtrlListViewInsertItem($ListView1, 0, "|"&$text) $array = _Search($term) If $array = 0 Then _GUICtrlListViewInsertItem($ListView1, 0, "|No Results Found") GUICtrlSetData($Label2, "Viewing Result: 00/00") Else GUICtrlSetData($Label2, "Viewing Result: 00/" & $array[0][0]) For $i = 1 To $array[0][0] _GUICtrlListViewInsertItem($ListView1, $i - 1, $i & "|" & $array[$i][0] & "|" & $array[$i][1]) Next EndIf Else $text = "Search for a file or item using the |controls on the left." _GUICtrlListViewInsertItem($ListView1, 0, "|"&$text) EndIf $sel = _GUICtrlListViewGetSelectedIndices($ListView1) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Search _GUICtrlListViewDeleteAllItems($ListView1) _GUICtrlListViewInsertItem($ListView1, 0, "|Searching... Please Wait") $term = GUICtrlRead($searchterm) & " " & GUICtrlRead($filetype) $array = _Search($term) _GUICtrlListViewDeleteAllItems($ListView1) If $array = 0 Then _GUICtrlListViewInsertItem($ListView1, 0, "|No Results Found") GUICtrlSetData($Label2, "Viewing Result: 00/00") Else GUICtrlSetData($Label2, "Viewing Result: 00/" & $array[0][0]) For $i = 1 To $array[0][0] _GUICtrlListViewInsertItem($ListView1, $i - 1, $i & "|" & $array[$i][0] & "|" & $array[$i][1]) Next EndIf $sel = _GUICtrlListViewGetSelectedIndices($ListView1) Case $msg = $browse $file = FileSelectFolder("Select Folder", "", 6, "") GUICtrlSetData($location, $file) Case $sel <> _GUICtrlListViewGetSelectedIndices($ListView1) $sel = _GUICtrlListViewGetSelectedIndices($ListView1) GUICtrlSetData($Label2, "Viewing Result: " & $sel + 1 & "/" & $array[0][0]) $text = "" $len = StringLen($array[$sel + 1][0]) If $len > 22 Then $text = StringTrimRight($array[$sel + 1][0], $len - 22) & "..." Else $text = $array[$sel + 1][0] EndIf GUICtrlSetData($name, "Name: " & $text) $text = "" $len = StringLen($array[$sel + 1][1]) If $len > 25 Then $text = StringTrimRight($array[$sel + 1][1], $len - 22) & "..." Else $text = $array[$sel + 1][1] EndIf GUICtrlSetData($path, "Path: " & $text) $text = Round(FileGetSize($array[$sel + 1][1]) / 1024, 2) GUICtrlSetData($size, "Size (KB): " & $text) $array2 = FileGetTime($array[$sel + 1][1]) $text = $array2[2] & "/" & $array2[1] & "/" & $array2[0] & "/" & " " & $array2[3] & ":" & $array2[4] & ":" & $array2[5] GUICtrlSetData($filetime, "FileTime: " & $text) $text = FileGetVersion($array[$sel + 1][1]) GUICtrlSetData($ver, "Version: " & $text) GUICtrlSetData($ranking, "Rank: " & $array[$sel + 1][6]) EndSelect WEnd Func _Search($strQuery) Dim $objQuery ; The index server query object Dim $rstResults ; A recordset of results returned from I.S. Dim $objField ; Field object for loop Dim $sRet ; Retrieve Service State Dim $array[1][1];The output array Const $strComputer = @ComputerName _ServiceState() If StringInStr($sRet, "stopped") Then ;MsgBox(0,"State ","Sercice is not Running, I will start it ...") _ServiceStart() Sleep(1000) Else ; If the query isn't blank then proceed If $strQuery <> "" Then ; Create our index server object $objQuery = ObjCreate("ixsso.Query") ; $objQuery.Catalog = "query://search.microsoft.com/kb" ; query://hostname/indexname ; Set it's properties With $objQuery .Catalog = "query://" & $strComputer & "/System" ; Catalog to query .Query = $strQuery ; Query text ;.MaxRecords = 100 ; Max # of records to return ; What to sort records by. I'm sorting by rank [d] ; which is [d]escending by how pertinent Index Server ; thinks the result is. This way the most applicable ; result should be first. .SortBy = "rank [d]" ; Which columns to return. Column names must ; be the same as the catalog's properties. Some ; of them are: contents, filename, size, path, ; vpath, hitcount, rank, create, write, DocTitle ; DocSubject, DocAuthor, DocKeywords... .Columns = "filename, path, " _ & "DocTitle, DocAuthor, " _ & "DocKeywords, rank, hitcount" EndWith ; Get a recordset of our results back from Index Server $rstResults = $objQuery.CreateRecordset ("nonsequential") ;If @error Then ; Msgbox (0,"Error","Service not started") ; Exit ;EndIf ; Get rid of our Query object $objQuery = "" ; Check for no records If $rstResults.EOF Then ;Consolewrite( "Sorry. No results found." & @CRLF) Return SetError(0, 1, 0) Else ; Print out # of results ReDim $array[$rstResults.RecordCount + 1][7] $array[0][0] = $rstResults.RecordCount $count = 1 ; Loop through results While Not $rstResults.EOF ; Loop through Fields ; Formatting leaves something to be desired, ; but it'll work for now. $i = 0 For $objField In $rstResults.Fields $array[$count][$i] = $rstResults.Fields ($objField.Name).Value $i += 1 Next ; Move to next result $rstResults.MoveNext $count += 1 WEnd EndIf EndIf EndIf Return $array EndFunc ;==>_Search ;=============================================================================== ; INTERNAL: SEARCH ;=============================================================================== Func _ServiceState() Const $strComputer = @ComputerName $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2") $Services = $objWMIService.ExecQuery ("Select * from Win32_Service where Name Like 'cisvc%'") For $objService In $Services $sRet = ($objService.DisplayName & " | " & $objService.State) ;MsgBox(0,"Service State",$sRet) Next Return $sRet EndFunc ;==>_ServiceState ;=============================================================================== ; INTERNAL: SEARCH ;=============================================================================== Func _ServiceStart() Const $strComputer = @ComputerName $objWMIService = ObjGet("winmgmts:" & "{impersonationLevel=impersonate}!\\" & $strComputer & "\root\cimv2") $Services = $objWMIService.ExecQuery ("Select * from Win32_Service where Name Like 'cisvc%'") For $objService In $Services $objService.StartService () MsgBox(0, "Service State", "Service Started") Next EndFunc ;==>_ServiceStart ;=============================================================================== ; INTERNAL: SEARCH ;=============================================================================== Func _RegEnum($sKey) Local $sEnum, $sHold, $iCC While 1 $iCC += 1 $sEnum = RegEnumKey($sKey, $iCC) If @error Then ExitLoop If StringLeft($sEnum, 1) = '.' Then $sHold &= $sEnum & Chr(01) EndIf WEnd $aArray = StringSplit(StringTrimRight($sHold, 1), Chr(01)) Return $aArray EndFunc ;==>_RegEnumSettings.exe:expandcollapse popupIf Not ProcessExists ("XO_Shell.exe") Then MsgBox (0, "ERROR!", "What are you trying to do?") Exit EndIf #include <GUIConstants.au3> #Include <GuiCombo.au3> #AutoIt3Wrapper_plugin_funcs = MD5Hash $dbak = IniRead (@ScriptDir & "\settings.ini", "SETTINGS", "BKG","") $dstr = IniRead (@ScriptDir & "\settings.ini", "STARTMNU", "BKG", "") $dpic = IniRead (@ScriptDir & "\settings.ini", "USER", "PIC","") $duser = IniRead (@ScriptDir & "\settings.ini", "USER", "USERNAME", "") $SettingsForm = GUICreate("XO_SHELL- Settings", 633, 345, 193, 115) $Group1 = GUICtrlCreateGroup("Start Menu", 4, 160, 269, 153) $strpic = GUICtrlCreatePic("RES\STRMNU\IMAGE\" & $dstr, 12, 176, 93, 131, BitOR($SS_NOTIFY, $WS_GROUP)) $strlbl = GUICtrlCreateLabel($dstr, 108, 176, 72, 17) $strcombo = GUICtrlCreateCombo("", 108, 196, 161, 25) $strchange = GUICtrlCreateButton("Change", 192, 220, 75, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group2 = GUICtrlCreateGroup("Background", 4, 4, 625, 153) $bkgpic = GUICtrlCreatePic($dbak, 12, 20, 255, 128, BitOR($SS_NOTIFY, $WS_GROUP)) $bkglocation = GUICtrlCreateLabel($dbak, 272, 20, 351, 30) $bkgpath = GUICtrlCreateCombo($dbak, 272, 56, 301, 25) $bkgbrowse = GUICtrlCreateButton("Browse", 576, 53, 47, 25, 0) $bkgchange = GUICtrlCreateButton("Change Background", 517, 124, 107, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $Group3 = GUICtrlCreateGroup("User", 276, 160, 353, 153) $username = GUICtrlCreateInput("", 448, 172, 175, 21) $pass = GUICtrlCreateInput("", 448, 196, 175, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) $passcon = GUICtrlCreateInput("", 448, 220, 175, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL)) $userpic = GUICtrlCreatePic($dpic, 280, 176, 100, 100, BitOR($SS_NOTIFY, $WS_GROUP)) $Label3 = GUICtrlCreateLabel("Username:", 388, 175, 55, 17) $Label4 = GUICtrlCreateLabel("Password:", 388, 198, 53, 17) $Label5 = GUICtrlCreateLabel("Confim Password:", 388, 214, 55, 37) $passchange = GUICtrlCreateButton("Change Password", 524, 280, 99, 25, 0) $userpicchange = GUICtrlCreateButton("Change Picture", 284, 280, 95, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $btnOK = GUICtrlCreateButton("Ok", 552, 316, 75, 25, 0) $btnCancel = GUICtrlCreateButton("Cancel", 472, 316, 75, 25, 0) GUISetState(@SW_SHOW) $Search = FileFindFirstFile("RES\STRMNU\IMAGE\*.jpg") While 1 $file = FileFindNextFile($Search) If @error Then ExitLoop _GUICtrlComboInsertString($strcombo, 0, $file) WEnd FileClose($search) $Search = FileFindFirstFile("RES\BACKGROUNDS\*.jpg") While 1 $file = FileFindNextFile($Search) If @error Then ExitLoop _GUICtrlComboInsertString($bkgpath, 0, "RES\BACKGROUNDS\" & $file) WEnd FileClose($search) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $strchange $new = GUICtrlRead($strcombo) IniWrite(@ScriptDir & "\settings.ini", "STARTMNU", "BKG", $new) GUICtrlSetData($strlbl, $new) GUICtrlSetImage($strpic, "RES\STRMNU\IMAGE\" & $new) Case $msg = $bkgbrowse $file = FileOpenDialog("Open", "", "All Files (*.*)") GUICtrlSetData($bkglocation, $file) GUICtrlSetData($bkgpath, $file) Case $msg = $bkgchange $new = GUICtrlRead($bkgpath) IniWrite(@ScriptDir & "\settings.ini", "SETTINGS", "BKG", $new) GUICtrlSetImage($bkgpic, $new) Case $msg = $passchange $plH = PluginOpen(@ScriptDir & "\MD5Hash.dll") $USEROLD = IniRead(@ScriptDir & "\settings.ini", "USER", "USERNAME", "") $PASSOLD = IniRead(@ScriptDir & "\settings.ini", "USER", "PASSWORD", "") $passold2 = MD5Hash (InputBox("Enter Password", "Please Enter you old password", "", "*M"), 2, True) $NewPass = MD5Hash (GUICtrlRead($pass), 2, True) $NewPass2 = MD5Hash (GUICtrlRead($passcon), 2, True) If $PASSOLD <> $passold2 Then MsgBox(0, "Error!", "Error! Incorect Password Entered!") Else If $NewPass <> $NewPass2 Then MsgBox(0, "Error!", "New password entered does not match!") Else IniWrite(@ScriptDir & "\settings.ini", "USER", "PASSWORD", $NewPass) MsgBox(0, "Password Changed", "Password changed ok.") EndIf EndIf PluginClose($plH) Case $msg = $userpicchange $file = FileOpenDialog("Open", "", "All Files (*.*)") IniWrite(@ScriptDir & "\settings.ini", "USER", "PIC", $file) GUICtrlSetImage ($userpic, $file) Case $msg = $btnOK ExitLoop Case $msg = $btnCancel ExitLoop EndSelect WEnd GUIDelete($SettingsForm)Hope you like Comments? Criticism? Edited November 21, 2007 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Nahuel Posted November 13, 2007 Share Posted November 13, 2007 I see that the screenshots are all 1280x800. Will I have any problems with my 800x600 screen? Link to comment Share on other sites More sharing options...
BrettF Posted November 13, 2007 Author Share Posted November 13, 2007 I see that the screenshots are all 1280x800. Will I have any problems with my 800x600 screen?Most likely not. Its all pretty much dynamic... Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Josbe Posted November 13, 2007 Share Posted November 13, 2007 Download Link (13.8MB- Sorry for the large size, will make a lite version later tongue.gif)...Comments? Criticism?huh? 13.8MB for a toy OS simulator? Isn't much? I don't know about your EXE file and its contents, but I could imagine(and the screenshots) the reason: some BMPs there. • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Generator Posted November 13, 2007 Share Posted November 13, 2007 Just downloaded and Installed(Yes it is an installer and the total size is 24.4 MB). Turned out it didn't add a shortcut to All Programs(I had to go to install directory to launch). Now I am stuck with username and password. Any tips Bert? Link to comment Share on other sites More sharing options...
JustinReno Posted November 13, 2007 Share Posted November 13, 2007 Thats a very big shell, bigger than most shell replacements on the web. And they do more. Is it just because there are a lot of picture files on there? Link to comment Share on other sites More sharing options...
BrettF Posted November 13, 2007 Author Share Posted November 13, 2007 huh? 13.8MB for a toy OS simulator? Isn't much? I don't know about your EXE file and its contents, but I could imagine(and the screenshots) the reason: some BMPs there.Its an installer... Ahahaha... Toy Actually, most of the files in there are either .exe, .jpg, .gif or .ini Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BrettF Posted November 13, 2007 Author Share Posted November 13, 2007 Just downloaded and Installed(Yes it is an installer and the total size is 24.4 MB). Turned out it didn't add a shortcut to All Programs(I had to go to install directory to launch).Now I am stuck with username and password. Any tips Bert?Create the one of your choice... @Justin- Yes. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
JustinReno Posted November 13, 2007 Share Posted November 13, 2007 Whats with the telephone background and the "open road" background on the start menu? They don't seem to relate, but, I'll look around it more, actually its still downloading. Link to comment Share on other sites More sharing options...
Generator Posted November 13, 2007 Share Posted November 13, 2007 It launched, 2 windows are opened, one of them seem to be the MD5hash(only a title), and the other 1 seem to be the main window(My desktop background as default Image but i don't see anything else besides that. Link to comment Share on other sites More sharing options...
JustinReno Posted November 13, 2007 Share Posted November 13, 2007 (edited) Same to me, the window quit for a couple of seconds when I tried to move it, but it doesn't size over the taskbar right. Edit: It froze when I cliked the My documents under the start menu. Edited November 13, 2007 by JustinReno Link to comment Share on other sites More sharing options...
Generator Posted November 13, 2007 Share Posted November 13, 2007 Same to me, the window quit for a couple of seconds when I tried to move it, but it doesn't size over the taskbar right.Edit: It froze when I cliked the My documents under the start menu.How do you get start menu?? Link to comment Share on other sites More sharing options...
JustinReno Posted November 13, 2007 Share Posted November 13, 2007 (edited) CLick the top blue bar, and move it up. It is under the Windows taskbar. And I get an error when I open up the settings. Line -1. Edited November 13, 2007 by JustinReno Link to comment Share on other sites More sharing options...
Generator Posted November 13, 2007 Share Posted November 13, 2007 CLick the top blue bar, and move it up. It is under the Windows taskbar. And I get an error when I open up the settings. Line -1.Thanks for the tip, i had to move my window out of range to be able to see the Taskbar at the very bottom which was hidden from my screen. Link to comment Share on other sites More sharing options...
JustinReno Posted November 13, 2007 Share Posted November 13, 2007 (edited) Your welcome. I can't wait to see what this will turn into, its very advanced. Edit: Why did you pick XO? Edited November 13, 2007 by JustinReno Link to comment Share on other sites More sharing options...
BrettF Posted November 13, 2007 Author Share Posted November 13, 2007 (edited) It launched, 2 windows are opened, one of them seem to be the MD5hash(only a title), and the other 1 seem to be the main window(My desktop background as default Image but i don't see anything else besides that.Ok. I'll have to tweak the sizes. I had an idea while I was working home... I will create a basic one, including the necessary files, and another than includes the extras. And let you download what you want EDIT: @Justin- Thnx... XO came from exod which derived from Exodus. I know why My Docs don't work too... Will update in a sec. Edited November 13, 2007 by Bert Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
BrettF Posted November 13, 2007 Author Share Posted November 13, 2007 First post update. The download links should be active in the next 10mins. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Nahuel Posted November 13, 2007 Share Posted November 13, 2007 Well, the screen is really huge and I can't see a thing. The installer did as Generator said: no shortcuts. When I ran it, I entered a username and a password it seemed to work but 3 seconds later it crashed with a 'non array variable' error. I'll try the lite version... Link to comment Share on other sites More sharing options...
BrettF Posted November 13, 2007 Author Share Posted November 13, 2007 Well, the screen is really huge and I can't see a thing. The installer did as Generator said: no shortcuts. When I ran it, I entered a username and a password it seemed to work but 3 seconds later it crashed with a 'non array variable' error. I'll try the lite version...I was pretty sure I fixed the array error? Mustn't have updated... I fixed the installer up too. You should have shortcuts now. The screen is really huge? What size are you? It calculates the width/height using: ;=============================================================================== ; ; Function Name: _GetWorkingArea() ; Description: Returns the coordinates of desktop working area rectangle ; Parameter(s): None ; Return Value(s): On Success - Array containing coordinates: ; $a[0] = left ; $a[1] = top ; $a[2] = right ; $a[3] = bottom ; On Failure - 0 ; ;=============================================================================== Func _GetWorkingArea() #cs BOOL WINAPI SystemParametersInfo(UINT uiAction, UINT uiParam, PVOID pvParam, UINT fWinIni); uiAction SPI_GETWORKAREA = 48 #ce Local $dRECT = DllStructCreate("long; long; long; long") Local $spiRet = DllCall("User32.dll", "int", "SystemParametersInfo", _ "uint", 48, "uint", 0, "ptr", DllStructGetPtr($dRECT), "uint", 0) If @error Then Return 0 If $spiRet[0] = 0 Then Return 0 Local $aRet[4] = [DllStructGetData($dRECT, 1), DllStructGetData($dRECT, 2), DllStructGetData($dRECT, 3), DllStructGetData($dRECT, 4) ] Return $aRet EndFunc ;==>_GetWorkingArea and then populates everything else from those values so can you define huge? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Nahuel Posted November 13, 2007 Share Posted November 13, 2007 I tried the lite one and this is what happens when I enter my username and password: Link to comment Share on other sites More sharing options...
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