Results 1 to 3 of 3
  1.    #1  
    ok, as many may know, i'm not a script writer, but more of a script copier. i learn from examples and really just copy bits and pieces to paste in different projects. i am having problems doing something and cant find an example to copy from. so please help if you can.

    here is what i am trying to do. i want to write a notification qeu to run a script when device is woke up. i can write it just fine for devices that already have mortscript running on the device. i want to write it so it runs without mort preinstalled. i want to write it so that is first runs mort.exe and then the script. or both of them at the same time. treo alert has done this well. here is an example from treo alert...

    RunAt( Rerun, msPath \ "MortScript.exe", "/wait=15 """ & myPath \ "REMIND.mscr""" )

    here is what i got so far...

    #InstallNotification.mscr - adds myscript.mscr to notification que to start myscript on wake up

    # Get my path
    myPath = SystemPath( "ScriptPath" )

    RunOnPowerOn( myPath \ "myscript.mscr", "AppRunAfterWakeup" )

    how do i write it so that it runs mort at the same time? or just before?

    thanks, cody
  2. #2  
    TA installs a MortScript.exe on the device whether the app is being installed on the device or storage card. Your app would need to do the same. Your install.mscr should look like this.

    # what is our path?
    instPath = SystemPath( "ScriptPath" )
    # Make sure there is a MortScript.exe on the device for this app
    # even if installing to the storage card
    If ( Find( instPath, "\Storage Card" ) = 1 )
       msPath = SubStr( instPath, 14 )
       If ( NOT DirExists( msPath ) )
          MkDir( msPath )
       Copy( instPath \ "MortScript.exe", msPath \ "MortScript.exe", 1 )
       msPath = instPath
    # always remove from queue before adding to avoid dupe entries
    RemoveNotifications( msPath \ "MortScript.exe", """" & instPath \ "myscript.mscr""" )
    RunOnPowerOn( msPath \ "MortScript.exe", """" & instPath \ "myscript.mscr""" )
  3.    #3  
    thanks hannip. once agian... you be da man.

    i had every thing in it except.....
    RunOnPowerOn( msPath \ "MortScript.exe", """" & instPath \ "myscript.mscr""" )

    RunOnPowerOn( myPath \ "myscript.mscr", "AppRunAfterWakeup" )

    makes all the difference in the world.

    thanks agian, cody

Posting Permissions