Source language: Translate to:

Reading memory stats

Questions about using NeoBook's scripting language

Moderator: Neosoft Support

Reading memory stats

Postby stevec » Sun Jan 14, 2007 3:29 pm

Hi all;

Looking for a way to read the following.

Total system memory
Total Free Memory

There is a plug-in that will read these, but they default into the same variable. I'd like to have two seperate variables, so I can use them in a
math calculation.

The calculation would be
[total memory] - [free memory] = [available memory]

Any help would be great.
Thanks;
Steve Christensen
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

Postby Wrangler » Sun Jan 14, 2007 6:12 pm

Or, just set the data in the common variable to a new variable right after you read it. Then do the math with the new variables.

Read total system memory
setvar to first variable

Read total free memory
setvar to second variable

math [firstvariable]-[secondvariable] = [available memory]
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Thanks

Postby stevec » Sun Jan 14, 2007 6:58 pm

Thanks for the reply. I'll try it.
Steve Christensen
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

I did this

Postby stevec » Sun Jan 14, 2007 7:12 pm

Here is what I did and it errored.

rtMemoryTotal
SetVar "[rtResult2]" "[MemTot]"
Delay "500"
rtMemoryFree
SetVar "[rtResult2]" "[MemFree]"
Math "=[MemTot]-[MemFree]" "0" "[AvMem]"

I don't know how to use the StrParse "" "" "" "" Command.

Steve Christensen
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho

This code worked

Postby stevec » Sun Jan 14, 2007 7:29 pm

Thanks;
This code worked.

rtMemoryTotal
SetVar "[MemTot]" "[rtResult2]"
Delay "500"
rtMemoryFree
SetVar "[MemFree]" "[rtResult2][MemFree]"
Math "[MemTot]-[MemFree]" "0" "[AvMem]"

Thanks;
Steve Christensen
Steve Christensen
stevec
 
Posts: 223
Joined: Fri Apr 15, 2005 7:33 am
Location: Boise, Idaho


Return to NeoBook Action Commands

Who is online

Users browsing this forum: No registered users and 1 guest