Results 1 to 8 of 8
  1.    #1  
    what would i put and the end of a script to make it repeat itself after 60 seconds?

    this is a script that is just reading and writing to the registry.

    i have been reading the manual and looking through scripts and nothing seems to work.

    i have been trying this....

    Rerun = Timestamp()+60
    RunAt( Rerun, "\Windows\StartUp\name of my script.mscr" )

    thanks, cody
  2.    #2  
    up date. i do think it is working know that i have played with it more.

    is there any other way to set a script to repeat, or a part of a script to stay in a loop?
  3. #3  
    you can While loop forever and use the sleep command in between instead of rerunning.
  4. #5  
    Quote Originally Posted by codyppc View Post
    what would i put and the end of a script to make it repeat itself after 60 seconds?

    this is a script that is just reading and writing to the registry.

    i have been reading the manual and looking through scripts and nothing seems to work.

    i have been trying this....

    Rerun = Timestamp()+60
    RunAt( Rerun, "\Windows\StartUp\name of my script.mscr" )

    thanks, cody
    Look cody
    #########################################################
    #CODY TIMER.mscr-starts script.

    ErrorLevel ("syntax")


    Run( PATH ) <---Put your script you want to start here.


    #Set when the script should run again, 60 minutes from the current time
    Rerun = Timestamp()+60
    RunAt( Rerun, "\PATH\PATH\CODY TIMER.mscr" )
    #########################################################

    Cody
    CODY TIMER.mscr loops calling it's self every 60.
    Run(path) is the script you want to start.
    Last edited by slingbox; 03/29/2007 at 08:09 PM.
  5. #6  
    If you want script to me called on softreset.

    #########################################################
    #STARTER.mscr-calls CODY TIMER

    CallScript (" PATH\PATH\CODY TIMER.mscr ")
    #########################################################

    Put shortcut to script above in windows startup....Dont forget to add the path were it,s calling
    Last edited by slingbox; 03/29/2007 at 08:08 PM.
  6.    #7  
    i will use all this for the next build. i have finished my first script.

    check it out here
  7.    #8  
    ok, i posted my first script back up.

    here is what i had.

    #TA Remember1.0.MSCR - remember treo alert settings afert reset

    Sleep 20000
    #create the remember setting spot
    A = RegValueExists ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember")
    If (A = 0)
    RegWriteDword ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember", 3 )
    EndIf

    #read the reminder setting and change onoff
    B = RegRead ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember" )
    If (B = 1)
    C = RegRead ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "ONOFF" )
    If ( C = 0)
    Run("\Windows\Start Menu\Programs\TREO ALERT.lnk")
    EndIf

    #check onoff and remember the setting
    D = RegRead ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "ONOFF" )
    If (D = 1)
    RegWriteDword ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember", 1 )
    else
    RegWriteDword ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember", 0 )
    EndIf

    Rerun = Timestamp()+40
    RunAt( Rerun, "\Windows\StartUp\TA Remember1.0.mscr" )


    and this is what ended up working...
    #TA Remember 1.1.MSCR - remember treo alert settings afert reset

    Sleep 30000
    #create the remember setting spot
    a = RegValueExists ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember")
    If (A = 0)
    RegWriteDword ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember", 3 )
    EndIf

    #read the reminder setting and change onoff
    c = RegRead ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember" )
    If (c = 1)
    Run("\Windows\Start Menu\Programs\TREO ALERT.lnk")
    EndIf

    While(1)
    #check onoff and remember the setting
    B = RegRead ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "ONOFF" )
    If (B = 1)
    RegWriteDword ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember", 1 )
    else
    RegWriteDword ("HKLM", "System\CurrentControlSet\Control\Power\State\led", "remember", 0 )
    EndIf
    Sleep(1000)
    EndWhile


    i dont know why the first one didn't want to repeat, but i like the "while" better cause i was able to repeat just part of the script.

    thanks everyone, cody

Posting Permissions