Code archives/Miscellaneous/ss3.0
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
computer check | |||||
AppTitle "deh - system status3.0" Graphics 790,800,16,2 tgd = CountGfxDrivers () tgm = CountGfxModes () Repeat Text 10,80,"time : " + CurrentTime() Text 10,100,"date : " + CurrentDate() Text 10,120, "mouseX : " + MouseX() Text 10,140,"mouseY : " + MouseY() Text 10,160,"mousez : " + MouseZ() Text 10,180,"mousexspeed : " + MouseXSpeed() Text 10,200,"mouseyspeed : " + MouseYSpeed() Text 10,220,"mousezspeed : " + MouseZSpeed() If KeyHit (32) Then Gosub drive If JoyType =0 Then Text 10,240,"no joystick" If JoyType =1 Then Text 10,240,"digital joystick" If JoyType =2 Then Text 10,240,"analog joystick" If JoyType >0 Then Text 10,290,"joy x : " + JoyX() If JoyType >0 Then Text 10,310,"joy y : " + JoyY() If JoyType >0 Then Text 10,330,"joy z : " + JoyZ() tvm = TotalVidMem () / 1000000 avm = AvailVidMem () / 1000000 Text 10,350,"you have " + tgd + " graphics card(s) on your computer" Text 10,370,"with a total of " + tgm + " modes and a total memory of " Text 10,390, tvm + " megabytes of which " + avm + " megabytes are available" l = 410 g = 0 Repeat g=g+1 Text 10,l,"the name of graphics card " + g + " is " + GfxDriverName$ (g) l=l+20 Until tgd = g k = GetKey() If k > 0 Then Text 10,260,"keypress : " + k Delay 499 EndIf Delay 101 Cls Until KeyHit (1) End .drive Cls Delay 100 FlushKeys Repeat Locate 200,100 Print "hidden harddrive checker" Locate 200,400 d$ = Input$ ("What harddrive do you want to check? ") If d$ = "exit" Then Exit If FileType (d$) = 0 Then Print "this harddrive does not exist" If FileType (d$) = 2 Then Print "this harddrive does exist" EndIf WaitKey Forever Return |
Comments
| ||
Please stop making Code archive entries. Just make a regular post in the forums instead. The code archives is supposed to be for useful things that others may learn from. |
| ||
this IS useful. It's EXTREMELY useful. I could use it in my game to detect the name of a graphics card itself, look it up online, and detect how well a user's graphics card works |
| ||
@ GW: Ouch... @ Rez: That's ridiculous. |
| ||
I'll choose the middle ground and say you should've just updated your last 'system status' entry, since that one was trash (this one probably is too, but I decided not to look at the actual code since I enjoy my eyesight) and nobody would have missed it had you updated it with a questionably improved version. |
| ||
Again, tvm is NEVER GOING TO CHANGE. The value returns the total available graphiics maemory. This combines two or more GPU memory available in the cases of Crossfire / SLi AGAIN, this is wrong: tvm = TotalVidMem () / 1000000 avm = AvailVidMem () / 1000000 1000000 bytes is not a megabyte. You should use Shr 20 to gain a faster and accurate result. |
| ||
Malice, last time you said "shr 10"! Also check this http://en.wikipedia.org/wiki/Byte and this http://myitforum.com/cs2/blogs/dhite/archive/2008/08/24/bits-and-bytes-conversion-tables.aspx and this |
| ||
GW, I think Rez learnt something from it. |
| ||
Malice, last time you said "shr 10"! Also check this http://en.wikipedia.org/wiki/Byte and this http://myitforum.com/cs2/blogs/dhite/archive/2008/08/24/bits-and-bytes-conversion-tables.aspx and this http://math123xyz.com/ and this Shr 10 would be to convert bytes to kB. 1 Shr 20 is equivalent to 1 / 2^20 = 1 / 1048576 = 1 / (1024*1024) Since: 1024 * Bytes = 1 kB 1024 * kB = 1 MB It is also faster than division which is the slowest of basic numerical calculations. Why post those links? I know what a Byte is, thanks. I do recommend you look at them, though - particularly the one that shows the table that defines a MegaByte as 1024 kiloBytes an a kiloByte as 1024 Bytes. That may help you understand what I'ev been trying to help you to see. If you want to disregard helpful advice, fine - but at least stop this spamming. |
Code Archives Forum