PDA

View Full Version : Display System Informations


FoxLeader
11-15-2006, 07:38 PM
Hi everyone,

I'm practicing by doing some little apps. So, I wanted to display the OS Name. I suceeded.
But now, I want to display the User Info. Here is the code I used (Lines 08 to 10):

---Setup User Info
Name = System.GetUserInfo();
Paragraph.SetText("UserInfo", Name);
---Setup User Info Ends
So what's wrong ? The error message is:
Main -- On Show, Line 10: Argument 2 must be of type String.

It's the samething for this:
---Setup Memory Display
memory = System.GetMemoryInfo();
Paragraph.SetText("Memory", memory);
---Setup Memory Display Ends

Can someone help me? I'm sure yes :D

Thanks a lot,
FoxLeader

RizlaUK
11-16-2006, 06:36 AM
System.GetUserInfo(); returns a table so you have to access the the string in the table


here, this should work
---Setup User Info
name = System.GetUserInfo();
Paragraph.SetText("UserInfo", name.RegOwner);
---Setup User Info Ends

and for the memory
---Setup Memory Display
memory = System.GetMemoryInfo();
Paragraph.SetText("Memory", memory.AvailableRAM);
---Setup Memory Display Ends

FoxLeader
11-16-2006, 11:13 AM
Thanks a lot! I think I understand how it works !
I'll try with other systeminfos... just to see if I really got the trick :lol

Thanks and have a good day!