yucatan Posted April 28, 2008 Share Posted April 28, 2008 (edited) but i have one more problem and i dont know why it dont work i wanne do the same with the $mhz$mhz = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "~MHz")MsgBox(4096, "Test", $mhz )MsgBox(0, "CPU SPEED (MHZ):", round($mhz[1] / 1024,1))when i run this i get a error can u tell me why? i have one more problemthe new computer has something 2 cpu's so i wanne detect thatHKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0 (patch of the first processor)HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\1 (patch of the secend processor)can somebody not help me with something like if HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\1exsist then write ""i have one more problem its a simpel thing but i just can figure it outwhy this dont work$mem = MemGetStats()$memmb = round($mem[1] / 1024,1))$memgb = ($mem[1] / 1024 / 1024,1))when i run it i get a errorD:\Documents and Settings\Yucatan\Bureaublad\testers.au3 (15) : ==> Unbalanced brackets in expression.: $memmb = round($mem[1] / 1024,1)) $memmb = ^ ERROR Edited April 28, 2008 by yucatan Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 28, 2008 Share Posted April 28, 2008 For $i = 0 To 10 $mhz = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\" & $i, "~MHz") If @error Then ExitLoop MsgBox(0, "CPU SPEED (GHz) Processor " & $i & " :", Round($mhz / 1024, 1)) Next May switch to Do until in lieu of For Next 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 Link to comment Share on other sites More sharing options...
yucatan Posted April 28, 2008 Author Share Posted April 28, 2008 (edited) why this dont work$mem = MemGetStats()$memmb = round($mem[1] / 1024,1))$memgb = ($mem[1] / 1024 / 1024,1))when i run it i get a errorD:\Documents and Settings\Yucatan\Bureaublad\testers.au3 (15) : ==> Unbalanced brackets in expression.:$memmb = round($mem[1] / 1024,1))$memmb = ^ ERRORi want this because i dont what that number in a msgbox it just needs to go in a $var Edited April 28, 2008 by yucatan Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 28, 2008 Share Posted April 28, 2008 There is one ) at the end which doesn't belong there 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 Link to comment Share on other sites More sharing options...
yucatan Posted April 28, 2008 Author Share Posted April 28, 2008 (edited) For $i = 0 To 10 $mhz = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\" & $i, "~MHz") If @error Then ExitLoop FileWrite($file, "CPU SPEED (GHz) Processor " & $i & " :", Round($mhz / 1024, 1)) Next why i this dont work then? Edited April 28, 2008 by yucatan Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 28, 2008 Share Posted April 28, 2008 (edited) For $i = 0 To 10 $mhz = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\" & $i, "~MHz") If @error Then ExitLoop FileWrite($file, "CPU SPEED (GHz) Processor " & $i & " :", Round($mhz / 1024, 1))Nextwhy i this dont work then?You need to learn from what Scite tells you! FileWrite($file, "CPU SPEED (GHz) Processor " & $i & " :", Round($mhz / 1024, 1))should be FileWrite($file, "CPU SPEED (GHz) Processor " & $i & " :" & Round($mhz / 1024, 1))Mega Edited April 28, 2008 by Xenobiologist 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 Link to comment Share on other sites More sharing options...
yucatan Posted April 28, 2008 Author Share Posted April 28, 2008 (edited) hi thx alot i only have one more problem look at this pleas now it does this CPU SPEED (GHz) Processor 0: 2.9 CPU SPEED (GHz) Processor 1: 2.9 CPU Name 0: Intel® Pentium® D CPU 3.00GHz CPU Name 1: Intel® Pentium® D CPU 3.00GHz RAM Memory in KB 2096300 RAM Memory in MB 2047.2 look at this 2 lines CPU Name 0: Intel® Pentium® D CPU 3.00GHz CPU Name 1: Intel® Pentium® D CPU 3.00GHz in the register is it like this Intel® Pentium® D CPU 3.00GHz and not like this Intel® Pentium® D CPU 3.00GHz can i not make a little kind of loop to look when the first letter comes then starts to write or something like haha lol i see you cant see what i mean with i attach the log just look in compuinfo.txt then you shall understand what i meencompuinfo.txt Edited April 28, 2008 by yucatan Link to comment Share on other sites More sharing options...
weaponx Posted April 28, 2008 Share Posted April 28, 2008 (edited) So there is whitespace in front of Intel® Pentium® D CPU 3.00GHz, like this "................Intel® Pentium® D CPU 3.00GHz". Try StringStripWS($var, 1) or StringStripWS($var, 5) Edited April 28, 2008 by weaponx Link to comment Share on other sites More sharing options...
yucatan Posted April 28, 2008 Author Share Posted April 28, 2008 (edited) hi weaponx i did it a try but with 1 dont work i now already tryed every modes 1 until 8 all of the dont do anything but i have found a script look here (test.au3) in you see my processor good so why i cant use this fuction. i dont understand the code its a little high for me i tryed to merge but i failed but look @ compuinfo2.txt the funny things is it works realy perfect nice log only one problem when i read the code i see nothing i realy dont understand what the code do somthing with obj but can somebody make a little bit more clear what it does?test.au3 Edited April 28, 2008 by yucatan Link to comment Share on other sites More sharing options...
weaponx Posted April 28, 2008 Share Posted April 28, 2008 I don't see a problem... Maybe the last line: FileWrite($file, "script" & $PcInfo & @CRLF) To... FileWrite($file,$PcInfo & @CRLF) 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