Results 1 to 10 of 10
  1.    #1  
    I need a little help here. I'm trying to write a script that shows battery percentage, signal strength, and free program memory in the carrier line. I found the regs for the battery and the signal strength but I can't find what to use for the memory. Any help would be appreciated.
  2. #2  
    Quote Originally Posted by kinger2 View Post
    I need a little help here. I'm trying to write a script that shows battery percentage, signal strength, and free program memory in the carrier line. I found the regs for the battery and the signal strength but I can't find what to use for the memory. Any help would be appreciated.
    Kinger, you can get free memory from: HKLM\Software\Apps\MortScript\RTFM

    Of course, that was a joke
    Seriously, you probably can't get it from the registry, but you can use the MortScript function "FreeMemory()" to get it.

    The manual is here:

    http://www.sto-helit.de/downloads/mo...ipt-Manual.pdf

    Cheers.

    Z.
  3. #3  
    Quote Originally Posted by kinger2 View Post
    I need a little help here. I'm trying to write a script that shows battery percentage, signal strength, and free program memory in the carrier line. I found the regs for the battery and the signal strength but I can't find what to use for the memory. Any help would be appreciated.
    I wrote this a while back for the Treo 700w.

    -- JDC

    Code:
    # Status.mscr
    tm = TotalMemory()/1024
    fm = FreeMemory()/1024
    fds = FreeDiskSpace("\")/1024
    fsc = FreeDiskSpace("\Storage Card")/1024
    # bl = BatteryLevel()
    bl = RegRead("HKLM", "System\State\Battery", "Percentage")
    xp = ExternalPowered()
    PhoneState = RegRead("HKLM", "System\State\Phone", "Cellular System Available" )
    SignalStrength = RegRead("HKLM", "System\State\Phone", "Signal Strength" )
    SpeakerPhoneState = RegRead("HKLM", "System\State\Hardware", "Speaker" )
    RingerState = RegRead("HKLM", "System\State\Hardware", "Ringer" )
    BlueToothState = RegRead("HKLM", "System\State\Hardware", "Bluetooth" )
    SyncState = RegRead("HKLM", "System\State\Hardware", "Cradled" )
    
    
    BlueTooth = "???"
    If (BlueToothState = 8)
    	BlueTooth = "OFF/NoBrdcst"
    EndIf
    If (BlueToothState = 9)
    	BlueTooth = "ON/NoBrdcst"
    EndIf
    If (BlueToothState = 11)
    	BlueTooth = "ON/Brdcst"
    EndIf
    
    Ringer = "???"
    If (RingerState = 1)
    	Ringer = "ACTIVE"
    EndIf
    If (RingerState = 0)
    	Ringer = "SILENT"
    EndIf
    
    Cradled = "???"
    If (SyncState = 1)
    	Sync = "CONNECTED"
    EndIf
    If (SyncState = 0)
    	Sync = "DISCONNECTED"
    EndIf
    SpeakerPhone = "???"
    If (SpeakerPhoneState = 1)
    	SpeakerPhone = "ON"
    EndIf
    If (SpeakerPhoneState = 0)
    	SpeakerPhone = "OFF"
    EndIf
    
    Phone = "???"
    If (PhoneState = 4)
    	Phone = "ON"
    EndIf
    If (PhoneState = 0)
    	Phone = "OFF"
    EndIf
    
    xpmsg = "NOT "
    
    if (xp)
      xpmsg = ""
    endif
    
    PlatformVer = SystemVersion( )
    Platform = SystemVersion( "platform") & " " & PlatformVer
    
    Message 	("System:  " & Platform & "^LF^^LF^" \
    		&"TotalMem:            " & tm & " MB ^LF^" \
    		&"FreeMainMem:         " & fm & " MB ^LF^" \
    		&"FreeMainRAM:   " & fds & " KB ^LF^" \
    		&"FreeCardMem: " & fsc & " KB ^LF^^LF^" \
    		&"BatteryLevel:    " & bl & "%^LF^" \
    		&"AC Pwr: " & xpmsg &"Connected" \
    		,"        System Capacity")
    
    Message	("PhoneRadio:   "& Phone & "^LF^" \
    		&"Ringer:       "& Ringer & "^LF^" \
    		&"SpeakerPhone: "& SpeakerPhone & "^LF^" \
    		&"BluetoothState: "& BlueTooth & "^LF^" \
    		&"SyncState: "& Sync & "^LF^" \
    		&"SgnlStrength: "& SignalStrength & "^LF^" \
    		,"        Phone Settings")
    
    
    
    #BT = 8 Off, Not Discoverable
    #BT = 9 On, Not Discoverable
    #BT = 11 On, Discoverable
    Attached Files Attached Files
  4.    #4  
    Thank You both for your response. This is exactly what I was looking for. Thank you again. Zbop if you get the script working for carrier wars hope you post it soon. That looks awesome.
  5. #5  
    Quote Originally Posted by kinger2 View Post
    Thank You both for your response. This is exactly what I was looking for. Thank you again. Zbop if you get the script working for carrier wars hope you post it soon. That looks awesome.
    The "carrier wars" thingy will actually be a today plugin .dll, not a script.

    It should be soon, everything is working. I'm just doing some cleanup and code review since you have to be a little more careful with a today plugin

    Z.
  6. #6  
    Quote Originally Posted by jdcochran View Post
    I wrote this a while back for the Treo 700w.

    -- JDC

    jdc is there anything you HAVEN't written? heheh

    I bet this isn't even really you, it's probably an auto-posting web-bot which you wrote, which somehow scans the forum for new posts, searches for keywords and then picks a suitable script from your enormous script archive.

    Hmmm... let me through out a keyword for you
    Jessica Alba

    Let's see what THAT drudges up...
  7. #7  
    Quote Originally Posted by zbop View Post
    jdc is there anything you HAVEN't written? heheh

    I bet this isn't even really you, it's probably an auto-posting web-bot which you wrote, which somehow scans the forum for new posts, searches for keywords and then picks a suitable script from your enormous script archive.

    Hmmm... let me through out a keyword for you
    Jessica Alba

    Let's see what THAT drudges up...
    Choice:

    1) Big scripts
    2) Big lips
    3) Big (another rhyming word, starts with the letter after "M")
    4) Not-so-big hips

    If you choose "1", you spend too much time in these forums.

    -- JDC
  8. #8  
    Quote Originally Posted by jdcochran View Post
    Choice:

    1) Big scripts
    2) Big lips
    3) Big (another rhyming word, starts with the letter after "M")
    4) Not-so-big hips

    If you choose "1", you spend too much time in these forums.

    -- JDC
    Well I definitely don't choose #1, and I'd ask to see script #3 but don't want the mods to shut down this thread!!

    Sorry for the threadjack kinger

    We now return you to your regularly scheduled programming...
  9. #9  
    Quote Originally Posted by zbop View Post
    Well I definitely don't choose #1, and I'd ask to see script #3 but don't want the mods to shut down this thread!!

    Sorry for the threadjack kinger

    We now return you to your regularly scheduled programming...
    Google her. She doesn't mind showing them.

    -- JDC
  10.    #10  
    No problem Zbop, just getting a kick out of you two. By the way got the script working. Thanks to the both od you and to Cody. Used some of his code , hope he doesn't mind.

Posting Permissions