Skrip Posted June 30, 2006 Posted June 30, 2006 (edited) -->VERSION 1.0 -Detects Computer Name. -Detects IP Address. -Able to run a .exe though it. (Not Finished) -Detects Operating System. -Detects drives. -Detects cd-rom drives. -Detects removeable drives. -Detects Total space on any drive. -Detects FREE space on any drive. -Detects Monitor pixels. -Detects Montior refresh rate. -Detects where you place the program on your drive. -Detects Processes. -->VERSION 1.1 -Adds Process system. -Adds Title system. -->VERSION 1.2 -Fixed an error. -Detects if you're connected to the internet. -->VERSION 1.4-Adds Winshow. -Adds WinHide. -Fixes WinKill. -Adds Retest internet connection button. -Adds Credits, -Fixes Winlist -Fixes Process list -->VERSION 2.0 -New GUI -->Version 2.102 -All errors fixed -Seperated windows and exes for easier viewing -Added File Tree -Detects Username -Organized into groups -->VERSION 2.201 -Button text change -Added 'Run file' back in -working 100% -->VERSION 2.400 -Now Detect's Video Card -Now Detect's Sound Card -Now Detect's Processor -->VERSION 2.705 -Adds internet input box -Fixes Sound card detection -Fixes Processor Detection -Finds status of sound card -->VERSION 3.01 (LATEST) -Adds Installed programs list -Adds Windows information =-Serial Number =-Product Key =-Last boot time =-Install Date =-Registered owner =-Type -Changes to internet box Picture- --Blurred my personal info. Edited July 30, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
nitekram Posted June 30, 2006 Posted June 30, 2006 This is computer information v2 build 2.I have one comment and one question...Why not rename File Tree to Folder Tree as the file are never shown until you open the folder.Question - what is stopping most of the programs that I look at from getting to the internet - your program states that I am not on the internet - but I am writing this.I like the design better than the first one. - I thought in the first one that you could run a program from the input box? Is that gone? 2¢ All by me:"Sometimes you have to go back to where you started, to get to where you want to go." "Everybody catches up with everyone, eventually" "As you teach others, you are really teaching yourself." From my dad "Do not worry about yesterday, as the only thing that you can control is tomorrow." WIKI | Tabs; | Arrays; | Strings | Wiki Arrays | How to ask a Question | Forum Search | FAQ | Tutorials | Original FAQ | ONLINE HELP | UDF's Wiki | AutoIt PDF AutoIt Snippets | Multple Guis | Interrupting a running function | Another Send StringRegExp | StringRegExp Help | RegEXTester | REG TUTOR | Reg TUTOT 2 AutoItSetOption | Macros | AutoIt Snippets | Wrapper | Autoit Docs SCITE | SciteJump | BB | MyTopics | Programming | UDFs | AutoIt 123 | UDFs Form | UDF Learning to script | Tutorials | Documentation | IE.AU3 | Games? | FreeSoftware | Path_Online | Core Language Programming Tips Excel Changes ControlHover.UDF GDI_Plus Draw_On_Screen GDI Basics GDI_More_Basics GDI Rotate GDI Graph GDI CheckExistingItems GDI Trajectory Replace $ghGDIPDll with $__g_hGDIPDll DLL 101? Array via Object GDI Swimlane GDI Plus French 101 Site GDI Examples UEZ GDI Basic Clock GDI Detection Ternary operator
Coffee Posted June 30, 2006 Posted June 30, 2006 Just curious as it applies to this example as well. @OSVersion returns WIN_95 if run from script or from compiled script but returns WIN_98(the correct version) only if run from scite. OS - Win98 autoit build - autoit-v3.1.1.128-beta
Skrip Posted July 1, 2006 Author Posted July 1, 2006 (edited) @Nikekram -My program pings www.hiddensoft.com (www.autoitscript.com), then if it fails then it returns not connected, if you have dial-up or a slow internet then just change line 230 from$var = Ping("www.hiddensoft.com")To$var = Ping("www.hiddensoft.com",10000);from 4.5 seconds to 10 seconds of checkingor something like that.And about the program input box, I removed that because it didn't work correctly (type a program not in the windows dir or the script dir it will return an error) I'll add it back in with a path box next version.And i'll edit the folder tree thing.@CoffeeTry compiling by pressing ALT+F7 in scite, because I have XP so if that doesn't work, I'm not sure.Thanks for the comments!EDIT: Updated see first post! Edited July 1, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Skrip Posted July 1, 2006 Author Posted July 1, 2006 (edited) ~~~~Updated again!!! -->VERSION 2.400 (LATEST) -Now Detect's Video Card -Now Detect's Sound Card -Now Detect's Processor <--May get wrong info...I don't think I found the correct reg file Pretty sure that they all work correctly. Edited July 1, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
gamepin126 Posted July 1, 2006 Posted July 1, 2006 How about adding the real IP, not just local? Not really needed, but just a thougth.
Skrip Posted July 1, 2006 Author Posted July 1, 2006 How would I do that, I don't know how. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
joseedwin Posted July 1, 2006 Posted July 1, 2006 i created something like this for a pc repair program displaying the system's info, maybe this could help. expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> #NoTrayIcon $FREE = DriveSpaceFree("C:\") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") $colMemory = $objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") $colCPU = $objWMIService.ExecQuery ("Select * from CIM_Processor") ;~ $colVideoinfo = $objWMIService.ExecQuery ("Select * from Win32_VideoController") Dim $pcinfo, $pcinfo2, $clockspeed Dim $ffcase = 0 Dim $labelinc = 0 Dim $spy1 = 0 For $object In $colSettings $wininfo = String($object.Caption) $winsp = String($object.CSDVersion) ;~ $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colCPU $pcinfo = String($object.Name) $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colMemory $primaryowner = String($object.PrimaryOwnerName) $pcinfo2 = String(Int(Number($object.TotalPhysicalMemory) / (1024))) & " KB" & " (" & String(Int(Number($object.TotalPhysicalMemory) / (1024 * 1024)) + 1) & " MB)" Next $Form1 = GUICreate("System Information", 622, 441, 192, 125) GUISetIcon("shell32.dll", 169) ; will change icon $Group1 = GUICtrlCreateGroup("System Information", 16, 5, 585, 120) GUICtrlCreateLabel("Operating System:", 24, 24, 87, 17, $SS_RIGHT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Free Disk Space:", 24, 48, 87, 17, $SS_RIGHT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) $cpu = StringFormat("%.2f", $clockspeed) GUICtrlCreateLabel("Processor Type:", 240, 48, 80, 17, $SS_LEFT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Physical Memory:", 24, 72, 87, 17, $SS_RIGHT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Primary Owner:", 24, 96, 87, 17, $SS_RIGHT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) $RFREE = StringFormat("%.2f", $FREE) GUICtrlCreateLabel($RFREE & " MB [C:\]", 120, 48, 120, 17) GUICtrlCreateLabel($pcinfo & " , " & $cpu & " Ghz", 320, 48, 250, 17) GUICtrlCreateLabel($pcinfo2, 120, 72, 250, 17) GUICtrlCreateLabel($primaryowner, 120, 96, 250, 17) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select case $msg = $GUI_EVENT_CLOSE Exit EndSelect sleep(300) WEnd ~~~~Updated again!!! -->VERSION 2.400 (LATEST) -Now Detect's Video Card -Now Detect's Sound Card -Now Detect's Processor <--May get wrong info...I don't think I found the correct reg file Pretty sure that they all work correctly.
Skrip Posted July 1, 2006 Author Posted July 1, 2006 (edited) Thank you it did help! I know that it detects the vid card, what about the sound does that work too? I'm having trouble adding it into my script, If you implemented it in before I did that was work too. expandcollapse popup#region Start-up Vars AutoItSetOption("RunErrorsFatal", 0) $vid_card = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") $processer = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E966-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") $sound_card = Regread("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}\0000", "DriverDesc") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") $colMemory = $objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") $colCPU = $objWMIService.ExecQuery ("Select * from CIM_Processor") ;~ $colVideoinfo = $objWMIService.ExecQuery ("Select * from Win32_VideoController") Dim $pcinfo, $pcinfo2, $clockspeed Dim $ffcase = 0 Dim $labelinc = 0 Dim $spy1 = 0 For $object In $colSettings $wininfo = String($object.Caption) $winsp = String($object.CSDVersion) ;~ $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colCPU $pcinfo = String($object.Name) $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colMemory $primaryowner = String($object.PrimaryOwnerName) $pcinfo2 = String(Int(Number($object.TotalPhysicalMemory) / (1024))) & " KB" & " (" & String(Int(Number($object.TotalPhysicalMemory) / (1024 * 1024)) + 1) & " MB)" Next $cpu = StringFormat("%.2f", $clockspeed) #endregion Start-up Vars #region Main Script #include <GUIConstants.au3> ;VERSION 2.102 $GUI1 = GUICreate("Computer Details", 495, 441, @DesktopWidth / 2 - 250, @DesktopHeight / 2 - 250) $label_1 = GUICtrlCreateLabel("Computer Name: ", 24, 8, 86, 17) $Label_2 = GUICtrlCreateLabel(@ComputerName, 112, 8, 150, 17) $ID = GUICtrlCreateLabel("UserName: " & @UserName, 200, 8, 155, 17) $Group_8 = GUICtrlCreateGroup("Operating System", 176, 64, 127, 41) $Label_9 = GUICtrlCreateLabel(@OSVersion, 192, 80, 110, 17) $Group2 = GUICtrlCreateGroup("Monitor", 24, 56, 145, 121) $Label_4 = GUICtrlCreateLabel("Width: " & @DesktopWidth & " Pixels", 40, 72, 120, 17) $Label_5 = GUICtrlCreateLabel("Height: " & @DesktopHeight & " Pixels", 40, 96, 120, 17) $Label_6 = GUICtrlCreateLabel("Refresh Rate: " & @DesktopRefresh & " Pixels", 40, 120, 120, 17) $label_11 = GUICtrlCreateLabel("Depth: " & @DesktopDepth & " Pixels", 40, 140, 120, 17) $Label_14 = GUICtrlCreateLabel("The Full Path for this Program is: ", 24, 32, 159, 17) $Label_14 = GUICtrlCreateLabel(@ScriptFullPath, 184, 32, 300, 17) $Group3 = GUICtrlCreateGroup("Internet", 24, 184, 281, 73) $retest_c = GUICtrlCreateButton("Retest", 32, 200, 97, 25) $Internet = GUICtrlCreateLabel("Testing Internet Connection...", 32, 232, 250, 17) $Label_7 = GUICtrlCreateLabel("IP:" & @IPAddress1, 150, 205, 150, 17) $Group4 = GUICtrlCreateGroup("Drives", 24, 264, 233, 169) $Button_11 = GUICtrlCreateButton("Find All Drives", 32, 280, 121, 25) $Button_12 = GUICtrlCreateButton("Find CD-Drives", 32, 312, 121, 25) $Button_13 = GUICtrlCreateButton("Find Removable Drives", 32, 344, 121, 25) $Button_15 = GUICtrlCreateButton("Get Size of Drive:", 32, 376, 121, 25) $cd_o = GUICtrlCreateButton("Open Drive", 168, 280, 73, 25) $Label_10 = GUICtrlCreateLabel("Home Drive:" & @HomeDrive, 160, 320, 80, 17) $Credits = GUICtrlCreateButton("Credits", 420, 10, 65, 25) $Group5 = GUICtrlCreateGroup("Windows", 264, 264, 225, 169) $winCombo_C = GUICtrlCreateCombo("", 272, 280, 209, 21) $winClose_R = GUICtrlCreateRadio("Win Close", 272, 328, 73, 17) $winKill_R = GUICtrlCreateRadio("Win Kill", 360, 328, 65, 17) $winshow_R = GUICtrlCreateRadio("Win Show", 272, 304, 73, 17) $winhide_R = GUICtrlCreateRadio("Win Hide", 360, 304, 65, 17) $Go_B = GUICtrlCreateButton("Activate", 272, 376, 209, 25) $status_L = GUICtrlCreateLabel("Ready...", 272, 408, 210, 17) $GroupP = GUICtrlCreateGroup("Programs", 312, 156, 177, 101) $processClose_R = GUICtrlCreateRadio("Process End", 320, 212, 161, 17) $Go_A = GUICtrlCreateButton("Activate...", 320, 232, 161, 20) $processCombo_C = GUICtrlCreateCombo("", 320, 180, 161, 21) $tree = GuiCtrlCreateButton("Folder Tree", 355, 10, 65, 25) $r_input = GUICtrlCreateInput("Enter program to run", 174, 117, 130, 20) $rp_input = GUICtrlCreateInput("Enter path to program", 174, 137, 130, 20) $rr_run = GUICtrlCreateButton("Run program", 174, 157, 130, 20) $hard_group = GUICtrlCreateGroup("Hard Ware", 310, 50, 180, 90) $vid_card_L = GUICtrlCreateLabel("Vid Card: " & $vid_card, 315, 66, 174, 20) ;~ $processer_L = GUICtrlCreateLabel("Processor: " & $processer, 315, 86, 174, 20) GUICtrlCreateLabel($pcinfo & "," & $cpu & " Ghz", 315, 86, 174, 20) $sound_car_L = GUICtrlCreateLabel("Sound Card: " & $sound_card, 315, 106, 174, 20) GuiSetState() _INITIATE() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_11 $pass = 1 $dr_all = DriveGetDrive("all") If @error Then Msgbox(0, "ERROR", "No Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_all[0] & " drives") For $i = 1 to $dr_all[0] MsgBox(4096,"Drive " & $i, $dr_all[$i]) Next EndIf EndIf Case $msg = $Button_12 $pass = 1 $dr_cd = DriveGetDrive("CDROM") If @error Then Msgbox(0, "ERROR", "No CDROM Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_cd[0] & " drives") For $i = 1 to $dr_cd[0] MsgBox(4096,"Drive " & $i, $dr_cd[$i]) Next EndIf EndIf Case $msg = $Button_13 $pass = 1 $dr_removable = DriveGetDrive("REMOVABLE") If @error Then Msgbox(0, "ERROR", "No Removable Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_removable[0] & " drives") For $i = 1 to $dr_removable[0] MsgBox(4096,"Drive " & $i, $dr_removable[$i]) Next EndIf EndIf Case $msg = $Button_15 $SD = InputBox("Selection", "Please Enter the drive path that you want the size of.", "C:\") $SDI = DriveSpaceTotal($SD) $SDI2 = DriveSpaceFree($SD) If Not @error Then MsgBox(0, "Drive Space for Drive: " & $SD, "Drive total space: " & $SDI & " MegaBytes") MsgBox(0, "Drive Free Space for Drive: " & $SD, "Drive free space: " & $SDI2 & " MegaBytes") EndIf If @error Then MsgBox(0, "ERROR: DRIVE NOT FOUND!!!", "---That is an invalid drive path, please enter correct path!!!---") EndIf Case $msg = $Go_B If GUICtrlRead($winClose_R) = $GUI_CHECKED Then _winClose() If GUICtrlRead($winKill_R) = $GUI_CHECKED Then _winKill() If GUICtrlRead($winshow_R) = $GUI_CHECKED Then _winshow() If GUICtrlRead($winhide_R) = $GUI_CHECKED Then _winhide() Case $msg = $processClose_R _processCombo() Case $msg = $winKill_R Or $msg = $winClose_R _winListCombo() Case $msg = $cd_o $o = InputBox("Open", "Please enter the Drive you want to open. If it is a CD drive the disk will eject", "C:\") CDTray($o, "OPEN") If @error = 0 Then Run('Explorer.exe "' & $o & '"', @WorkingDir, @SW_SHOW) EndIf Case $msg = $retest_c GuiCtrlSetData($Internet, GetToggle3r(GuiCtrlRead($Internet))) _Internet() Case $msg = $Credits MsgBox(0, "Credits", "This program was made by Firestorm.") MsgBox(0, "Q/C", "Questions? Comments? Errors? E-mail me at firestorm037@hotmail.com!") Case $msg = $tree $Path = FileSelectFolder("Choose a folder.", "") Run('Explorer.exe "' & $Path & '"', @WorkingDir, @SW_SHOW) Case $msg = $Go_A If GuiCtrlRead($processClose_R) = $GUI_CHECKED Then _processClose() Case $msg = $rr_run $program = GUICtrlRead($r_input) $program_path = GUICtrlRead($rp_input) Run($program & ".exe", $program_path) If @error = 1 Then MsgBox(48, "ERROR", "That is an invailid file or file path.") EndIf EndSelect WEnd Exit #endregion Main Script #region Functions Func _INITIATE() _processCombo() _winListCombo() _Internet() EndFunc Func _winClose() If WinExists(GUICtrlRead($winCombo_C)) Then WinClose(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winClose Func _winKill() If WinExists(GUICtrlRead($winCombo_C)) Then WinKill(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winKill Func _processClose() If ProcessExists(GUICtrlRead($processCombo_C)) Then ProcessClose(GUICtrlRead($processCombo_C)) Else GUICtrlSetData($status_L, "Process doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_processClose ;~ Func _killByPID() ;~ If _ProcessGetName(GUICtrlRead($processCombo_C)) <> '' Then ;~ $rc = _RunDOS("start taskkill /PID " & GUICtrlRead($processCombo_C) & " /T") ;~ GUICtrlSetData($status_L, "ProcessID " & GUICtrlRead($processCombo_C) & " - (" & _ProcessGetName(GUICtrlRead($processCombo_C)) & ")" & " killed") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ Else ;~ GUICtrlSetData($status_L, "ProcessID doesn't exist") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ EndIf ;~ EndFunc;==>_killByPID Func _processCombo() Dim $processArray = ProcessList() For $i = 1 To $processArray[0][0] GUICtrlSetData($processCombo_C, $processArray[$i][0]) Next EndFunc;==>_processCombo Func _winListCombo() Dim $windowArray = WinList() For $i = 1 To $windowArray[0][0] ; Only display visble windows that have a title If $windowArray[$i][0] <> "" Then;AND IsVisible($var[$i][1]) Then GUICtrlSetData($winCombo_C, $windowArray[$i][0]) EndIf Next EndFunc;==>_winListCombo Func _winshow() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_SHOW) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winshow Func _winhide() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_HIDE) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winhide Func _Internet() Sleep(500) $var = Ping("www.hiddensoft.com") If $var Then; also possible: If @error = 0 Then ... GuiCtrlSetData($Internet, GetToggle1(GuiCtrlRead($Internet))) Else GuiCtrlSetData($Internet, GetToggle2(GuiCtrlRead($Internet))) EndIf EndFunc Func GetToggle1($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0x0000ff") return "You are connected to the internet!" else return " " endif EndFunc Func GetToggle2($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0xff0000") return "WARNING! You are NOT connected to the internet!" else return " " endif EndFunc Func GetToggle3r($stext) if $stext = "WARNING! You are NOT connected to the internet!" OR "You are connected to the internet!" then GUICtrlSetColor($Internet, "0x000000") return "Testing Internet Connection..." else return " " endif EndFunc #endregion Functions Run that and look at the processor thing, why is there a HUGE indent? Edited July 1, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
joseedwin Posted July 1, 2006 Posted July 1, 2006 try this: $audiocardquery = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice") Dim $audiocardinfo,$devices For $object In $audiocardquery $devices = String($object.DeviceID) $firstaudiocard = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice.DeviceID=" & $devices) $audiocardinfo = String($object.Name) $audiocardinfo2 = String($object.Status) ConsoleWrite(@CRLF & $audiocardinfo & @CRLF) Next GUICtrlCreateLabel("Audio Card:", 240, 70, -1, -1, $SS_LEFT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel($audiocardinfo & " Status: " & $audiocardinfo2, 320, 70, -1, -1)
Skrip Posted July 1, 2006 Author Posted July 1, 2006 Perhaps it would be better to expand the GUI a bit, or make buttons that make a message box that show it, but i'm no sure what to do. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
WTS Posted July 1, 2006 Posted July 1, 2006 (edited) added input box for internet connect and rounded the drive sizes.. expandcollapse popup#region Start-up Vars AutoItSetOption("RunErrorsFatal", 0) $vid_card = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") $processer = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E966-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") $sound_card = Regread("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}\0000", "DriverDesc") #endregion Start-up Vars #region Main Script #include <GUIConstants.au3> ;VERSION 2.102 $GUI1 = GUICreate("Computer Details", 495, 441, @DesktopWidth / 2 - 250, @DesktopHeight / 2 - 250) $label_1 = GUICtrlCreateLabel("Computer Name: ", 24, 8, 86, 17) $Label_2 = GUICtrlCreateLabel(@ComputerName, 112, 8, 150, 17) $ID = GUICtrlCreateLabel("UserName: " & @UserName, 200, 8, 155, 17) $Group_8 = GUICtrlCreateGroup("Operating System", 176, 64, 127, 41) $Label_9 = GUICtrlCreateLabel(@OSVersion, 192, 80, 110, 17) $Group2 = GUICtrlCreateGroup("Monitor", 24, 56, 145, 121) $Label_4 = GUICtrlCreateLabel("Width: " & @DesktopWidth & " Pixels", 40, 72, 120, 17) $Label_5 = GUICtrlCreateLabel("Height: " & @DesktopHeight & " Pixels", 40, 96, 120, 17) $Label_6 = GUICtrlCreateLabel("Refresh Rate: " & @DesktopRefresh & " Pixels", 40, 120, 120, 17) $label_11 = GUICtrlCreateLabel("Depth: " & @DesktopDepth & " Pixels", 40, 140, 120, 17) $Label_14 = GUICtrlCreateLabel("The Full Path for this Program is: ", 24, 32, 159, 17) $Label_14 = GUICtrlCreateLabel(@ScriptFullPath, 184, 32, 300, 17) $Group3 = GUICtrlCreateGroup("Internet", 24, 184, 281, 73) $retest_c = GUICtrlCreateButton("Retest", 32, 200, 97, 25) $Internet = GUICtrlCreateLabel("Testing Internet Connection...", 32, 232, 250, 17) $Label_7 = GUICtrlCreateLabel("IP:" & @IPAddress1, 150, 205, 150, 17) $Group4 = GUICtrlCreateGroup("Drives", 24, 264, 233, 169) $Button_11 = GUICtrlCreateButton("Find All Drives", 32, 280, 121, 25) $Button_12 = GUICtrlCreateButton("Find CD-Drives", 32, 312, 121, 25) $Button_13 = GUICtrlCreateButton("Find Removable Drives", 32, 344, 121, 25) $Button_15 = GUICtrlCreateButton("Get Size of Drive:", 32, 376, 121, 25) $cd_o = GUICtrlCreateButton("Open Drive", 168, 280, 73, 25) $Label_10 = GUICtrlCreateLabel("Home Drive:" & @HomeDrive, 160, 320, 80, 17) $Credits = GUICtrlCreateButton("Credits", 420, 10, 65, 25) $Group5 = GUICtrlCreateGroup("Windows", 264, 264, 225, 169) $winCombo_C = GUICtrlCreateCombo("", 272, 280, 209, 21) $winClose_R = GUICtrlCreateRadio("Win Close", 272, 328, 73, 17) $winKill_R = GUICtrlCreateRadio("Win Kill", 360, 328, 65, 17) $winshow_R = GUICtrlCreateRadio("Win Show", 272, 304, 73, 17) $winhide_R = GUICtrlCreateRadio("Win Hide", 360, 304, 65, 17) $Go_B = GUICtrlCreateButton("Activate", 272, 376, 209, 25) $status_L = GUICtrlCreateLabel("Ready...", 272, 408, 210, 17) $GroupP = GUICtrlCreateGroup("Programs", 312, 156, 177, 101) $processClose_R = GUICtrlCreateRadio("Process End", 320, 212, 161, 17) $Go_A = GUICtrlCreateButton("Activate...", 320, 232, 161, 20) $processCombo_C = GUICtrlCreateCombo("", 320, 180, 161, 21) $tree = GuiCtrlCreateButton("Folder Tree", 355, 10, 65, 25) $r_input = GUICtrlCreateInput("Enter program to run", 174, 117, 130, 20) $rp_input = GUICtrlCreateInput("Enter path to program", 174, 137, 130, 20) $rr_run = GUICtrlCreateButton("Run program", 174, 157, 130, 20) $hard_group = GUICtrlCreateGroup("Hard Ware", 310, 50, 180, 90) $vid_card_L = GUICtrlCreateLabel("Vid Card: " & $vid_card, 315, 66, 174, 20) $processer_L = GUICtrlCreateLabel("Processor: " & $processer, 315, 86, 174, 20) $sound_car_L = GUICtrlCreateLabel("Sound Card: " & $sound_card, 315, 106, 174, 20) GuiSetState() _INITIATE() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_11 $pass = 1 $dr_all = DriveGetDrive("all") If @error Then Msgbox(0, "ERROR", "No Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_all[0] & " drives") For $i = 1 to $dr_all[0] MsgBox(4096,"Drive " & $i, $dr_all[$i]) Next EndIf EndIf Case $msg = $Button_12 $pass = 1 $dr_cd = DriveGetDrive("CDROM") If @error Then Msgbox(0, "ERROR", "No CDROM Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_cd[0] & " drives") For $i = 1 to $dr_cd[0] MsgBox(4096,"Drive " & $i, $dr_cd[$i]) Next EndIf EndIf Case $msg = $Button_13 $pass = 1 $dr_removable = DriveGetDrive("REMOVABLE") If @error Then Msgbox(0, "ERROR", "No Removable Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_removable[0] & " drives") For $i = 1 to $dr_removable[0] MsgBox(4096,"Drive " & $i, $dr_removable[$i]) Next EndIf EndIf Case $msg = $Button_15 $SD = InputBox("Selection", "Please Enter the drive path that you want the size of.", "C:\") $SDI = DriveSpaceTotal($SD) $SDI2 = DriveSpaceFree($SD) If Not @error Then MsgBox(0, "Drive Space for Drive: " & $SD, "Drive total space: " & Round($SDI/ 1024, 2) & " MegaBytes") MsgBox(0, "Drive Free Space for Drive: " & $SD, "Drive free space: " & Round($SDI2/ 1024, 2) & " MegaBytes") EndIf If @error Then MsgBox(0, "ERROR: DRIVE NOT FOUND!!!", "---That is an invalid drive path, please enter correct path!!!---") EndIf Case $msg = $Go_B If GUICtrlRead($winClose_R) = $GUI_CHECKED Then _winClose() If GUICtrlRead($winKill_R) = $GUI_CHECKED Then _winKill() If GUICtrlRead($winshow_R) = $GUI_CHECKED Then _winshow() If GUICtrlRead($winhide_R) = $GUI_CHECKED Then _winhide() Case $msg = $processClose_R _processCombo() Case $msg = $winKill_R Or $msg = $winClose_R _winListCombo() Case $msg = $cd_o $o = InputBox("Open", "Please enter the Drive you want to open. If it is a CD drive the disk will eject", "C:\") CDTray($o, "OPEN") If @error = 0 Then Run('Explorer.exe "' & $o & '"', @WorkingDir, @SW_SHOW) EndIf Case $msg = $retest_c GuiCtrlSetData($Internet, GetToggle3r(GuiCtrlRead($Internet))) _Internet() Case $msg = $Credits MsgBox(0, "Credits", "This program was made by Firestorm.") MsgBox(0, "Q/C", "Questions? Comments? Errors? E-mail me at firestorm037@hotmail.com!") Case $msg = $tree $Path = FileSelectFolder("Choose a folder.", "") Run('Explorer.exe "' & $Path & '"', @WorkingDir, @SW_SHOW) Case $msg = $Go_A If GuiCtrlRead($processClose_R) = $GUI_CHECKED Then _processClose() Case $msg = $rr_run $program = GUICtrlRead($r_input) $program_path = GUICtrlRead($rp_input) Run($program & ".exe", $program_path) If @error = 1 Then MsgBox(48, "ERROR", "That is an invailid file or file path.") EndIf EndSelect WEnd Exit #endregion Main Script #region Functions Func _INITIATE() _processCombo() _winListCombo() _Internet() EndFunc Func _winClose() If WinExists(GUICtrlRead($winCombo_C)) Then WinClose(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winClose Func _winKill() If WinExists(GUICtrlRead($winCombo_C)) Then WinKill(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winKill Func _processClose() If ProcessExists(GUICtrlRead($processCombo_C)) Then ProcessClose(GUICtrlRead($processCombo_C)) Else GUICtrlSetData($status_L, "Process doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_processClose ;~ Func _killByPID() ;~ If _ProcessGetName(GUICtrlRead($processCombo_C)) <> '' Then ;~ $rc = _RunDOS("start taskkill /PID " & GUICtrlRead($processCombo_C) & " /T") ;~ GUICtrlSetData($status_L, "ProcessID " & GUICtrlRead($processCombo_C) & " - (" & _ProcessGetName(GUICtrlRead($processCombo_C)) & ")" & " killed") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ Else ;~ GUICtrlSetData($status_L, "ProcessID doesn't exist") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ EndIf ;~ EndFunc;==>_killByPID Func _processCombo() Dim $processArray = ProcessList() For $i = 1 To $processArray[0][0] GUICtrlSetData($processCombo_C, $processArray[$i][0]) Next EndFunc;==>_processCombo Func _winListCombo() Dim $windowArray = WinList() For $i = 1 To $windowArray[0][0] ; Only display visble windows that have a title If $windowArray[$i][0] <> "" Then;AND IsVisible($var[$i][1]) Then GUICtrlSetData($winCombo_C, $windowArray[$i][0]) EndIf Next EndFunc;==>_winListCombo Func _winshow() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_SHOW) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winshow Func _winhide() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_HIDE) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winhide Func _Internet() Local $sInputBoxAnswer = InputBox("Test Connection","Do you want to test connection?" & @CRLF & _ "You may get a firewall warning dialog warning this will only ping the website you specify to test your connection.","www.hiddensoft.com") If @Error = 0 Then;The Okay button was pushed Sleep(500) $var = Ping($sInputBoxAnswer) If $var Then; also possible: If @error = 0 Then ... GuiCtrlSetData($Internet, GetToggle1(GuiCtrlRead($Internet))) Else GuiCtrlSetData($Internet, GetToggle2(GuiCtrlRead($Internet))) EndIf ElseIf @Error = 1 Then;The Cancel button was pushed GuiCtrlSetData($Internet, 'Internet Connection Test canceled') ElseIf @Error = 3 Then;error GuiCtrlSetData($Internet, 'Internet Connection Test an error has occured') EndIf EndFunc Func GetToggle1($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0x0000ff") return "You are connected to the internet!" else return " " endif EndFunc Func GetToggle2($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0xff0000") return "WARNING! You are NOT connected to the internet!" else return " " endif EndFunc Func GetToggle3r($stext) if $stext = "WARNING! You are NOT connected to the internet!" OR "You are connected to the internet!" then GUICtrlSetColor($Internet, "0x000000") return "Testing Internet Connection..." else return " " endif EndFunc #endregion Functions Edited July 1, 2006 by WTS
Skrip Posted July 1, 2006 Author Posted July 1, 2006 Erm, for some reason my copy and paste puts in in all 1 line, can yuo just use tags or [autoit] tags please. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
joseedwin Posted July 1, 2006 Posted July 1, 2006 expandcollapse popup#include <GUIConstants.au3> #NoTrayIcon $FREE = DriveSpaceFree("C:\") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") $colMemory = $objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") $colCPU = $objWMIService.ExecQuery ("Select * from CIM_Processor") $audiocardquery = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice") ;~ $colVideoinfo = $objWMIService.ExecQuery ("Select * from Win32_VideoController") Dim $pcinfo, $pcinfo2, $clockspeed,$audiocardinfo,$audiocardinfo2,$devices Dim $ffcase = 0 Dim $labelinc = 0 Dim $spy1 = 0 For $object In $audiocardquery $devices = String($object.PNPDeviceID) $firstaudiocard = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice.DeviceID=" & $devices) $audiocardinfo = String($object.Name) $audiocardinfo2 = String($object.Status) ConsoleWrite(@CRLF & $audiocardinfo & @CRLF) Next ;~ For $object In $firstaudiocard ;~ $audiocardinfo = String($object.Caption) ;~ Next ;~ ConsoleWrite(@CRLF & $audiocardinfo & @CRLF) For $object In $colSettings $wininfo = String($object.Caption) $winsp = String($object.CSDVersion) ;~ $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colCPU $pcinfo = String($object.Name) $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colMemory $primaryowner = String($object.PrimaryOwnerName) $pcinfo2 = String(Int(Number($object.TotalPhysicalMemory) / (1024))) & " KB" & " (" & String(Int(Number($object.TotalPhysicalMemory) / (1024 * 1024)) + 1) & " MB)" Next $Form1 = GUICreate("System Information", 622, 441, 192, 125) GUISetIcon("shell32.dll", 169) ; will change icon $Group1 = GUICtrlCreateGroup("System Information", 16, 5, 585, 120) GUICtrlCreateLabel("Free Disk Space:", 24, 48, 87, 17, $SS_RIGHT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) $cpu = StringFormat("%.2f", $clockspeed) GUICtrlCreateLabel("Processor Type:", 240, 48, 80, 17, $SS_LEFT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Physical Memory:", 24, 72, 87, 17, $SS_RIGHT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Primary Owner:", 24, 96, 87, 17, $SS_RIGHT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) $RFREE = StringFormat("%.2f", $FREE) GUICtrlCreateLabel($RFREE & " MB [C:\]", 120, 48, 120, 17) GUICtrlCreateLabel($pcinfo & " , " & $cpu & " Ghz", 320, 48, 250, 17) GUICtrlCreateLabel($pcinfo2, 120, 72, 250, 17) GUICtrlCreateLabel($primaryowner, 120, 96, 250, 17) GUICtrlCreateLabel("Audio Card:", 240, 70, -1, -1, $SS_LEFT) GUICtrlSetFont(-1, 5, 400, 0, "MS Sans Serif") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel($audiocardinfo & " Status: " & $audiocardinfo2, 320, 70, -1, -1) GUISetState(@SW_SHOW) while 1 $msg = GUIGetMsg() Select case $msg = $GUI_EVENT_CLOSE Exit EndSelect sleep(300) WEnd
Skrip Posted July 1, 2006 Author Posted July 1, 2006 (edited) Try this one, I think I got everything working! expandcollapse popup#region Start-up Vars SplashTextOn("Loading...", "Please wait while the program gathers nessesary data...", 400, 50, @DesktopWidth / 2 - 200, @DesktopHeight / 2 - 200) AutoItSetOption("RunErrorsFatal", 0) $vid_card = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") $processer = RegRead("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E966-E325-11CE-BFC1-08002BE10318}\0000", "DriverDesc") $sound_card = Regread("HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{71A27CDD-812A-11D0-BEC7-08002BE2092F}\0000", "DriverDesc") $objWMIService = ObjGet("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") $colSettings = $objWMIService.ExecQuery ("Select * from Win32_OperatingSystem") $colMemory = $objWMIService.ExecQuery ("Select * from Win32_ComputerSystem") $colCPU = $objWMIService.ExecQuery ("Select * from CIM_Processor") ;~ $colVideoinfo = $objWMIService.ExecQuery ("Select * from Win32_VideoController") Dim $pcinfo, $pcinfo2, $clockspeed Dim $ffcase = 0 Dim $labelinc = 0 Dim $spy1 = 0 For $object In $colSettings $wininfo = String($object.Caption) $winsp = String($object.CSDVersion) ;~ $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colCPU $pcinfo = String($object.Name) $clockspeed = String(Int(Number($object.CurrentClockSpeed))) / 1000 Next For $object In $colMemory $primaryowner = String($object.PrimaryOwnerName) $pcinfo2 = String(Int(Number($object.TotalPhysicalMemory) / (1024))) & " KB" & " (" & String(Int(Number($object.TotalPhysicalMemory) / (1024 * 1024)) + 1) & " MB)" Next $audiocardquery = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice") $cpu = StringFormat("%.2f", $clockspeed) Dim $audiocardinfo,$devices For $object In $audiocardquery $devices = String($object.DeviceID) $firstaudiocard = $objWMIService.ExecQuery ("Select * from Win32_SoundDevice.DeviceID=" & $devices) $audiocardinfo = String($object.Name) $audiocardinfo2 = String($object.Status) ConsoleWrite(@CRLF & $audiocardinfo & @CRLF) SplashOff() Next #endregion Start-up Vars #region Main Script #include <GUIConstants.au3> ;VERSION 2.102 $GUI1 = GUICreate("Computer Details", 495, 441, @DesktopWidth / 2 - 250, @DesktopHeight / 2 - 250) $label_1 = GUICtrlCreateLabel("Computer Name: ", 24, 8, 86, 17) $Label_2 = GUICtrlCreateLabel(@ComputerName, 112, 8, 150, 17) $ID = GUICtrlCreateLabel("UserName: " & @UserName, 200, 8, 155, 17) $Group_8 = GUICtrlCreateGroup("Operating System", 176, 64, 127, 41) $Label_9 = GUICtrlCreateLabel(@OSVersion, 192, 80, 110, 17) $Group2 = GUICtrlCreateGroup("Monitor", 24, 56, 145, 121) $Label_4 = GUICtrlCreateLabel("Width: " & @DesktopWidth & " Pixels", 40, 72, 120, 17) $Label_5 = GUICtrlCreateLabel("Height: " & @DesktopHeight & " Pixels", 40, 96, 120, 17) $Label_6 = GUICtrlCreateLabel("Refresh Rate: " & @DesktopRefresh & " Pixels", 40, 120, 120, 17) $label_11 = GUICtrlCreateLabel("Depth: " & @DesktopDepth & " Pixels", 40, 140, 120, 17) $Label_14 = GUICtrlCreateLabel("The Full Path for this Program is: ", 24, 32, 159, 17) $Label_14 = GUICtrlCreateLabel(@ScriptFullPath, 184, 32, 300, 17) $Group3 = GUICtrlCreateGroup("Internet", 24, 184, 281, 73) $retest_c = GUICtrlCreateButton("Retest", 32, 200, 97, 25) $Internet = GUICtrlCreateLabel("Testing Internet Connection...", 32, 232, 250, 17) $Label_7 = GUICtrlCreateLabel("IP:" & @IPAddress1, 150, 205, 150, 17) $Group4 = GUICtrlCreateGroup("Drives", 24, 264, 233, 169) $Button_11 = GUICtrlCreateButton("Find All Drives", 32, 280, 121, 25) $Button_12 = GUICtrlCreateButton("Find CD-Drives", 32, 312, 121, 25) $Button_13 = GUICtrlCreateButton("Find Removable Drives", 32, 344, 121, 25) $Button_15 = GUICtrlCreateButton("Get Size of Drive:", 32, 376, 121, 25) $cd_o = GUICtrlCreateButton("Open Drive", 168, 280, 73, 25) $Label_10 = GUICtrlCreateLabel("Home Drive:" & @HomeDrive, 160, 320, 80, 17) $Credits = GUICtrlCreateButton("Credits", 420, 10, 65, 25) $Group5 = GUICtrlCreateGroup("Windows", 264, 264, 225, 169) $winCombo_C = GUICtrlCreateCombo("", 272, 280, 209, 21) $winClose_R = GUICtrlCreateRadio("Win Close", 272, 328, 73, 17) $winKill_R = GUICtrlCreateRadio("Win Kill", 360, 328, 65, 17) $winshow_R = GUICtrlCreateRadio("Win Show", 272, 304, 73, 17) $winhide_R = GUICtrlCreateRadio("Win Hide", 360, 304, 65, 17) $Go_B = GUICtrlCreateButton("Activate", 272, 376, 209, 25) $status_L = GUICtrlCreateLabel("Ready...", 272, 408, 210, 17) $GroupP = GUICtrlCreateGroup("Programs", 312, 156, 177, 101) $processClose_R = GUICtrlCreateRadio("Process End", 320, 212, 161, 17) $Go_A = GUICtrlCreateButton("Activate...", 320, 232, 161, 20) $processCombo_C = GUICtrlCreateCombo("", 320, 180, 161, 21) $tree = GuiCtrlCreateButton("Folder Tree", 355, 10, 65, 25) $r_input = GUICtrlCreateInput("Enter program to run", 174, 117, 130, 20) $rp_input = GUICtrlCreateInput("Enter path to program", 174, 137, 130, 20) $rr_run = GUICtrlCreateButton("Run program", 174, 157, 130, 20) $hard_group = GUICtrlCreateGroup("Hard Ware", 310, 50, 180, 90) $vid_card_L = GUICtrlCreateLabel("Vid Card: " & $vid_card, 315, 66, 174, 20) ;~ $processer_L = GUICtrlCreateLabel("Processor: " & $processer, 315, 86, 174, 20) GUICtrlCreateLabel("Processer: " & $pcinfo, 315, 86, 174, 30) ;~ $sound_car_L = GUICtrlCreateLabel("Sound Card: " & $sound_card, 315, 116, 174, 20) GUICtrlCreateLabel("Sound Card: " & $audiocardinfo & " Status: " & $audiocardinfo2, 315, 116, 174, 30) GuiSetState() _INITIATE() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button_11 $pass = 1 $dr_all = DriveGetDrive("all") If @error Then Msgbox(0, "ERROR", "No Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_all[0] & " drives") For $i = 1 to $dr_all[0] MsgBox(4096,"Drive " & $i, $dr_all[$i]) Next EndIf EndIf Case $msg = $Button_12 $pass = 1 $dr_cd = DriveGetDrive("CDROM") If @error Then Msgbox(0, "ERROR", "No CDROM Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_cd[0] & " drives") For $i = 1 to $dr_cd[0] MsgBox(4096,"Drive " & $i, $dr_cd[$i]) Next EndIf EndIf Case $msg = $Button_13 $pass = 1 $dr_removable = DriveGetDrive("REMOVABLE") If @error Then Msgbox(0, "ERROR", "No Removable Drives found.") $pass = 0 EndIf If $pass = 1 Then If NOT @error Then MsgBox(4096,"", "Found " & $dr_removable[0] & " drives") For $i = 1 to $dr_removable[0] MsgBox(4096,"Drive " & $i, $dr_removable[$i]) Next EndIf EndIf Case $msg = $Button_15 $SD = InputBox("Selection", "Please Enter the drive path that you want the size of.", "C:\") $SDI = DriveSpaceTotal($SD) $SDI2 = DriveSpaceFree($SD) If Not @error Then MsgBox(0, "Drive Space for Drive: " & $SD, "Drive total space: " & Round($SDI/ 1024, 2) & " MegaBytes") MsgBox(0, "Drive Free Space for Drive: " & $SD, "Drive free space: " & Round($SDI2/ 1024, 2) & " MegaBytes") EndIf If @error Then MsgBox(0, "ERROR: DRIVE NOT FOUND!!!", "---That is an invalid drive path, please enter correct path!!!---") EndIf Case $msg = $Go_B If GUICtrlRead($winClose_R) = $GUI_CHECKED Then _winClose() If GUICtrlRead($winKill_R) = $GUI_CHECKED Then _winKill() If GUICtrlRead($winshow_R) = $GUI_CHECKED Then _winshow() If GUICtrlRead($winhide_R) = $GUI_CHECKED Then _winhide() Case $msg = $processClose_R _processCombo() Case $msg = $winKill_R Or $msg = $winClose_R _winListCombo() Case $msg = $cd_o $o = InputBox("Open", "Please enter the Drive you want to open. If it is a CD drive the disk will eject", "C:\") CDTray($o, "OPEN") If @error = 0 Then Run('Explorer.exe "' & $o & '"', @WorkingDir, @SW_SHOW) EndIf Case $msg = $retest_c GuiCtrlSetData($Internet, GetToggle3r(GuiCtrlRead($Internet))) _Internet() Case $msg = $Credits MsgBox(0, "Credits", "This program was made by Firestorm.") MsgBox(0, "Q/C", "Questions? Comments? Errors? E-mail me at firestorm037@hotmail.com!") Case $msg = $tree $Path = FileSelectFolder("Choose a folder.", "") Run('Explorer.exe "' & $Path & '"', @WorkingDir, @SW_SHOW) Case $msg = $Go_A If GuiCtrlRead($processClose_R) = $GUI_CHECKED Then _processClose() Case $msg = $rr_run $program = GUICtrlRead($r_input) $program_path = GUICtrlRead($rp_input) Run($program & ".exe", $program_path) If @error = 1 Then MsgBox(48, "ERROR", "That is an invailid file or file path.") EndIf EndSelect WEnd Exit #endregion Main Script #region Functions Func _INITIATE() _processCombo() _winListCombo() _Internet() EndFunc Func _winClose() If WinExists(GUICtrlRead($winCombo_C)) Then WinClose(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winClose Func _winKill() If WinExists(GUICtrlRead($winCombo_C)) Then WinKill(GUICtrlRead($winCombo_C)) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winKill Func _processClose() If ProcessExists(GUICtrlRead($processCombo_C)) Then ProcessClose(GUICtrlRead($processCombo_C)) Else GUICtrlSetData($status_L, "Process doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_processClose ;~ Func _killByPID() ;~ If _ProcessGetName(GUICtrlRead($processCombo_C)) <> '' Then ;~ $rc = _RunDOS("start taskkill /PID " & GUICtrlRead($processCombo_C) & " /T") ;~ GUICtrlSetData($status_L, "ProcessID " & GUICtrlRead($processCombo_C) & " - (" & _ProcessGetName(GUICtrlRead($processCombo_C)) & ")" & " killed") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ Else ;~ GUICtrlSetData($status_L, "ProcessID doesn't exist") ;~ Sleep(2500) ;~ GUICtrlSetData($status_L, "Ready...") ;~ EndIf ;~ EndFunc;==>_killByPID Func _processCombo() Dim $processArray = ProcessList() For $i = 1 To $processArray[0][0] GUICtrlSetData($processCombo_C, $processArray[$i][0]) Next EndFunc;==>_processCombo Func _winListCombo() Dim $windowArray = WinList() For $i = 1 To $windowArray[0][0] ; Only display visble windows that have a title If $windowArray[$i][0] <> "" Then;AND IsVisible($var[$i][1]) Then GUICtrlSetData($winCombo_C, $windowArray[$i][0]) EndIf Next EndFunc;==>_winListCombo Func _winshow() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_SHOW) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winshow Func _winhide() If WinExists(GUICtrlRead($winCombo_C)) Then WinSetState(GUICtrlRead($winCombo_C),"", @SW_HIDE) Else GUICtrlSetData($status_L, "Window doesn't exist") Sleep(2500) GUICtrlSetData($status_L, "Ready...") EndIf EndFunc;==>_winhide Func _Internet() Local $sInputBoxAnswer = InputBox("Test Connection","Do you want to test connection?" & @CRLF & _ "You may get a firewall warning dialog warning this will only ping the website you specify to test your connection.","www.hiddensoft.com") If @Error = 0 Then;The Okay button was pushed Sleep(500) $var = Ping($sInputBoxAnswer) If $var Then; also possible: If @error = 0 Then ... GuiCtrlSetData($Internet, GetToggle1(GuiCtrlRead($Internet))) Else GuiCtrlSetData($Internet, GetToggle2(GuiCtrlRead($Internet))) EndIf ElseIf @Error = 1 Then;The Cancel button was pushed GuiCtrlSetData($Internet, 'Internet Connection Test canceled') ElseIf @Error = 3 Then;error GuiCtrlSetData($Internet, 'Internet Connection Test an error has occured') EndIf EndFunc Func GetToggle1($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0x0000ff") return "You are connected to the internet!" else return " " endif EndFunc Func GetToggle2($stext) if $stext = "Testing Internet Connection..." then GUICtrlSetColor($Internet, "0xff0000") return "WARNING! You are NOT connected to the internet!" else return " " endif EndFunc Func GetToggle3r($stext) if $stext = "WARNING! You are NOT connected to the internet!" OR "You are connected to the internet!" then GUICtrlSetColor($Internet, "0x000000") return "Testing Internet Connection..." else return " " endif EndFunc #endregion Functions Edited July 1, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Skrip Posted July 3, 2006 Author Posted July 3, 2006 Over 40 downloads on my newest version, and only comments from a few people, like 5\40. Come on, tell me what to add, what to work on, what needs fixing, what you like/hate about it. Something. [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
Daniel W. Posted July 3, 2006 Posted July 3, 2006 Nice nice nice and nice object handling --------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]
Xenobiologist Posted July 4, 2006 Posted July 4, 2006 Hi, nice script. Some lines of code look very familiar to me. Go on. Maybe you could combine it with my WinInformation script (in my sig). Maybe one day, there'll be something like siw.exe (google for it, if you dunno it) written in Autoit. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Skrip Posted July 4, 2006 Author Posted July 4, 2006 (edited) I'll get back to work on adding more things to it when I get back to my computer (tommorow) i'm out of town at the moment. I'll take a look at your win-information thing soon, and i'll google siw.exe EDIT::: Google-d and i think you are right about that one, or maybe something like PC-Wizard. EDIT AGAIN::: I don't see it in your sig, is it the bottem one? Edited July 4, 2006 by Firestorm [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]
taurus905 Posted July 4, 2006 Posted July 4, 2006 Erm, for some reason my copy and paste puts in in all 1 line, can yuo just use tags or [autoit] tags please.Firestorm, I am not sure who Erm is or where the code is that you are referring to, but try this for a solution. Copy and paste the code to WordPad and then copy and paste to your editor, such as SciTe. taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs
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