Page 1 of 36 12345611 ... LastLast
Results 1 to 20 of 718
  1.    #1  
    I'm surprised that more people don't use MortScript. It is a very useful scripting language for mobile devices. It is freeware and can handle some pretty complex tasks with a few lines of code.

    Case in point. I was able to write a simple script to monitor notifications and turn on the led blink when any are active.

    MortScript can read and write to the registry, execute programs and subroutines and functions, send keystrokes and mouseclicks to applications, perform file manipulation and a lot more.

    There is a new version 4.0 available here.
    http://www.sto-helit.de/index.php?mo...st&category=17

    Documentations is here.
    http://www.sto-helit.de/downloads/po...4.0-Manual.pdf


    Example:
    Code:
    #
    # NLED.mscr - Monitors notifications and turns on and off the notification LED accordingly.
    #
    
    # check dependencies
    If ( NOT FileExists( "\Windows\LEDUp.exe" ) )
       Message ( "Installation of LEDUp.exe is required! Exiting...", "NLED script" )
       Exit
    EndIf
    
    # initialize variables
    LedOn = FALSE
    Notify = FALSE
    
    # start notification check loop
    While ( 1 )
    
    # check the registry for any notifications
       Notify = RegValueExists( "HKLM", "System\State\Shell\Notifications\Active", "CLSID" )
    
    # turn on the led if any notifications are pending. Keep turning on each iteration since
    # the OS turns it off whenever there is a new notification.
       If ( Notify )
          RunWait( "\Windows\LEDUp.exe", "0 1" )
          LedOn = TRUE
       EndIf
    
    # turn off the led if no notifications are pending
       If ( LedOn && NOT Notify )
          RunWait( "\Windows\LEDUp.exe", "0 0" )
          LedOn = FALSE
       EndIf
    
    # wait 5 seconds
       Sleep( 5000 )
    
    EndWhile

    People should post useful scripts they write to this thread for others to use. Attached is the above code zipped up. It requires installation of LEDUp.exe also attached. Install MortScript, LEDUp and copy the script to your device. Paste a shortcut of the script to \Windows\Startup to have it start at boot if it works for you.

    Edit: Changed sleep to 5 seconds to activate the led before the keyguard puts the device to sleep when locked.
    Attached Files Attached Files
    Last edited by hannip; 03/15/2007 at 12:17 AM. Reason: point to released MortScript 4.0
  2.    #2  
    Do you use AIM UK but are tired of having to manually make a data connection before you can sign in? Try this script to load AIM.

    Code:
    # RunAIM.mscr - start the default data connection and load AIM
    
    connActive = Connected()
    
    If ( NOT connActive )
       Connect( "The Internet" )
    EndIf
    
    Run ( "\Windows\Start Menu\Programs\AIM.lnk" )
    Attached Files Attached Files
  3. #3  
    Hannip, a problem I have with autoupdating on weatherpanel is that it won't disconnect my EVDO after it pulls down information ... is it possible to write a script that can detect such an event and then autodisconnect it?
  4.    #4  
    Sure, but I'm curious why you want to disconnect? EVDO in a dormant state shouldn't eat up the battery.
  5.    #5  
    Here is a simple script that you can assign to a button. I tried it assigned to the side button on my treo 700wx and it works great. If you have AE Button Plus you can assign it to any button.

    What this script does is open the mail folders for selection. If tmail isn't active it will launch it first. Before this you had to whip out your stylus to switch folders unless you have WM5 AKU3.0 or later.

    Code:
    # FolderSwitch.mscr - launches or makes tmail active and sends a
    #   screen tap to open mail folders.
    
    callTmail = True
    current = ActiveProcess()
    
    If ( current eq "tmail.exe" )
         callTmail = False
    EndIf
    
    If ( callTmail )
       Run( "\Windows\tmail.exe" )
       Sleep( 5000 )
    EndIf
    
    activeWin = ActiveWindow()
    MouseClick( activeWin, 10, 10 )
    Attached Files Attached Files
  6. #6  
    hmmm will this find make the BT hack possible for that pretty sound of VC and media player in the moto HS850 headset
  7.    #7  
    Quote Originally Posted by slingbox View Post
    hmmm will this find make the BT hack possible for that pretty sound of VC and media player in the moto HS850 headset

    No, but Bad Sector over at ppcgeeks is working on this solution.

    http://www.ppcgeeks.com/transfer-cal...set-t1559.html
  8. #8  
    cool.Get ready to be over run with request hannip.I posted a link in ppcgeeks.This thread is going to be pretty long
  9. #9  
    Quote Originally Posted by hannip View Post
    Sure, but I'm curious why you want to disconnect? EVDO in a dormant state shouldn't eat up the battery.
    I don't want to chance something else running in the background throwing the EVDO active and eating up battery Does that make sense?
  10. #10  
    Quote Originally Posted by isurus View Post
    I don't want to chance something else running in the background throwing the EVDO active and eating up battery Does that make sense?
    you'll probably waste more battery/cpu usage having to reconnect/sign in than forcing disconnect. leaving data in dormant uses no battery.

    WMExperts: News, Reviews & Podcasts + Twitter
  11. #11  
    hannip ive noticed the led actavates 50% of the time using keygaurd.
    Call comes in then missed.missed call icon apperars keygaurd turns off screen with no led flash.I wait about 2 min wake up screen then led missed call flash starts.
    Is there a setting to delay keygaurd from starting giving time for led to start or change in code to speed up led before keylock

    UPDATE-It would of helped if I put the MSCR file in the right place
    Works perfect
    Last edited by slingbox; 12/27/2006 at 06:46 PM.
  12.    #12  
    Try lowering the sleep from 15000 to 10000 to see if that works better.
  13. #13  
    Quote Originally Posted by hannip View Post
    Try lowering the sleep from 15000 to 10000 to see if that works better.
    after reinstalling file it did the same thing.I will lower the sleep and see what happens
  14.    #14  
    5000 seems to work well with keyguard on.
  15. #15  
    still hit and miss.It may be my treo considering ive been working it to death for the last 5 hours
    update 5 sec at 5000 seems to be the keeper Palm always makes it so hard haha
    Last edited by slingbox; 12/27/2006 at 08:28 PM.
  16.    #16  
    probably need to break up the script. The guts of the while loop needs to be separated out to its own script. That script then would be called in two ways. From a parent script that runs the loop and from the notification queue right before power off. That should catch all cases.

    That is your homework assignment. I'll check back in 10 minutes and grade your results.
  17. #17  
    We have led function in 7 out of 10 test calls.As stated above(needs to be seperated into it,s own loop) will be the answer.PA led comes one 3-5sec after call is missed with screen still on then keygaurd lockdown.Were that comes into play with your build--I dont know What I do know is that my wx is much faster without pa
    Update-Question..would it do any good changing to sec 1
    Last edited by slingbox; 12/27/2006 at 09:11 PM. Reason: question
  18.    #18  
    You can try 1 second. It won't hurt anything, tho I'd like to find a better solution. I tried breaking up the scripts, but I'm having trouble setting up the notification queue to run the script before power off. Need to do some research. I'll update once I have it all working.
  19. #19  
    1 sec made no diffrence
    Must Have Sleep
    Great work hannip Catch you tommrow
    Last edited by slingbox; 12/27/2006 at 10:47 PM.
  20. #20  
    i'm sorry to be such any *****, but I don't quite understand this script thing. can someone post a link like " scripts for dummies" or something. I would like to better understand it before I start using it.

    thanks, cody
Page 1 of 36 12345611 ... LastLast

Posting Permissions