Results 1 to 5 of 5
  1.    #1  
    ok, i am having trouble removing some notification ques. need help from the teachers.

    i start the script out with this...

    Code:
    #runner.mscr - switches scripts on at set times 5, 8, 16, 18, 22
    
    # 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 )
       EndIf
       Copy( instPath \ "MortScript.exe", msPath \ "MortScript.exe", 1 )
    Else
       msPath = instPath
    EndIf
    
    # Get my path
    myPath = SystemPath( "ScriptPath" )
    and then within the script i write a notification que like this....

    Code:
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 16, 0, msPath \ "MortScript.exe", """" & instPath \ "Profile Home.mscr" )
    this writes the notification que just fine. no matter if it is installed on the sd card or main memory, it writes and runs just fine.

    my problem is how do i write the remove notification que?

    i have tried everything. here are some things that didn't work.

    Code:
    RemoveNotifications( msPath \ "MortScript.exe", """" & instPath \ "Profile Home.mscr" )
    Code:
    RemoveNotifications ("\Program Files\Profile X\Profile Work.mscr" )

    and this one...
    Code:
    RemoveNotifications ("\Program Files\Profile X\MortScript.exe" )
    which is the way memmaid is showing the notification que.

    thanks, cody
  2. #2  
    Try:
    RemoveNotifications( SystemPath("ScriptPath")\"Profile Work.mscr" )

    or

    RemoveNotifications( instPath\"Profile Work.mscr" )
    Palm III > HS Visor > Treo 600 > Treo 650 > Treo 750 > Treo Pro > PrePlus GSM

    "95% of all software issues are due to USER ERROR."
  3.    #3  
    thanks, trying now.
  4.    #4  
    nope scotty, neither one worked. could it be because i dont have dsomething like....

    SystemPath("ScriptPath")

    or

    SystemPath = ("ScriptPath")

    at the begining or the script?

    thanks for your help, cody
  5.    #5  
    i also tried rewriting the runat and remove like in this post...

    http://discussion.treocentral.com/sh...&postcount=113

    step 4 and 5. still didnt work.


    Code:
    #my runner.mscr - switches scripts on at set times 5, 8, 16, 18, 22
    
    # 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 )
       EndIf
       Copy( instPath \ "MortScript.exe", msPath \ "MortScript.exe", 1 )
    Else
       msPath = instPath
    EndIf
    
    # Get my path
    myPath = SystemPath( "ScriptPath" )
    
    sleep (15000)
    
    #remove old notification queues
    
    RemoveNotifications( msPath \ "MortScript.exe", "/wait=15 """ & myPath \ "Profile Wake.mscr""" )
    RemoveNotifications( msPath \ "MortScript.exe", "/wait=15 """ & myPath \ "Profile Home.mscr""" )
    RemoveNotifications( msPath \ "MortScript.exe", "/wait=15 """ & myPath \ "Profile Work""" )
    RemoveNotifications( msPath \ "MortScript.exe", "/wait=15 """ & myPath \ "Profile Sleep.mscr""" )
    RemoveNotifications( msPath \ "MortScript.exe", "/wait=15 """ & myPath \ "runner.mscr""" )
    
    Sleep (15000)
    
    # initialize variables
    CurrentHour = 0
    CurrentMinute = 0
    CurrentSecond = 0
    CurrentDay = 0
    CurrentMonth = 0
    CurrentYear = 0
    CurrentDayOfWeek = 9
    
    #Figure out what year, month, and day it is
    GetTime ( CurrentHour, CurrentMinute, CurrentSecond, CurrentDay, CurrentMonth, CurrentYear )
    CurrentDayOfWeek = FormatTime( "w" )
    
    #write notification ques
    
    ##############tuesday###################
    If (CurrentHour < 5 && CurrentDayOfWeek = 2)
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 5, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Wake.mscr" )
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 8, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Profile Work.mscr" )
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 16, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Profile Home.mscr" )
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 22, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Sleep.mscr" )
    Rerun = Timestamp()+86401
    RunAt( Rerun, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "runner.mscr" )
    EndIf
    
    If ((CurrentHour >= 5 && CurrentDayOfWeek = 2) AND (CurrentHour < 8 && CurrentDayOfWeek = 2))
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 8, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Profile Work.mscr" )
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 16, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Profile Home.mscr" )
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 22, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Sleep.mscr" )
    Rerun = Timestamp()+68401
    RunAt( Rerun, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "runner.mscr" )
    EndIf
    
    If ((CurrentHour >= 8 && CurrentDayOfWeek = 2) AND (CurrentHour < 16 && CurrentDayOfWeek = 2))
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 16, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Profile Home.mscr" )
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 22, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Sleep.mscr" )
    Rerun = Timestamp()+57601
    RunAt( Rerun, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "runner.mscr" )
    EndIf
    
    If ((CurrentHour >= 16 && CurrentDayOfWeek = 2) AND (CurrentHour < 22 && CurrentDayOfWeek = 2))
    RunAt( CurrentYear, CurrentMonth, CurrentDay, 22, 0, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "Sleep.mscr" )
    Rerun = Timestamp()+21601
    RunAt( Rerun, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "runner.mscr" )
    EndIf
    
    If (CurrentHour >= 22 && CurrentDayOfWeek = 2) 
    Rerun = Timestamp()+7201
    RunAt( Rerun, msPath \ "MortScript.exe", "/wait=15""" & instPath \ "runner.mscr" )
    EndIf

Posting Permissions