Page 1 of 2 12 LastLast
Results 1 to 20 of 29
  1.    #1  
    Cool. I didn't know this forum existed...

    I'm making a simple date script, which replaces the date on the logo field of the 700wx (see image)...



    I like the field, since it contains the BT icon. If my headset is paired, it will change color, so at least I don't have to guess if my headset is disconnected or not.

    It's working well so far, but I would like to have the ability to click on the date to run the Clock & Alarms in the Settings tab. Is there any way I can do that?

    Thanks.


    EDIT: Including code....
    ****************************************************
    Code:
    # CarrierDate.mscr
    # Author: Crazie.Eddie@Flashmail.com
    # Description: Carrier logo date replacement
    #
    # 2007.04.05 - Initial creation (Crazie.Eddie@Flashmail.com)
    # 2007.04.07 - Write to logo field into a seperate module (Crazie.Eddie@Flashmail.com)
    
    #Set_Date
    GetTime MonthVal, "m"
    
    MonthName[01]="January"
    MonthName[02]="February"
    MonthName[03]="March"
    MonthName[04]="April"
    MonthName[05]="May"
    MonthName[06]="June"
    MonthName[07]="July"
    MonthName[08]="August"
    MonthName[09]="September"
    MonthName[10]="October"
    MonthName[11]="November"
    MonthName[12]="December"
    
    MonthName=MonthName[%MonthVal%]
    
    GetTime DayVal, "w"
    
    DayName[0]="Sunday"
    DayName[1]="Monday"
    DayName[2]="Tuesday"
    DayName[3]="Wednesday"
    DayName[4]="Thursday"
    DayName[5]="Friday"
    DayName[6]="Saturday"
    
    CarrierField=DayName[%DayVal%]
    
    GetTime Date, " d, Y"
    
    #Combines to display the field  as example Friday, April 06, 2007
    CarrierField = %DayName%&", "&%MonthName%&""&%Date%
    
    CallScript ("\Program Files\Carrier Date\CarrierField.mscr")
    
    #Executes the script again after 60 seconds
    StartTime = Timestamp()+60
    RunAt( StartTime, "\Program Files\Carrier Date\CarrierDate.mscr" )
    ****************************************************

    Code:
    # CarrierField.mscr
    # Author: Crazie.Eddie@Flashmail.com
    # Description: Script to write to the Carrier logo field
    #
    # 2007.04.07 - Initial creation (Crazie.Eddie@Flashmail.com)
    
    RegWriteString "HKLM","System\State\Phone","Current Operator Name", %CarrierField%
    RegWriteString "HKLM","Software\Microsoft\Ril","CarrierName", %CarrierField%
    Last edited by crazie.eddie; 04/07/2007 at 06:02 PM. Reason: Created a seperate module to write to the Carrier logo field
  2. #2  
    Great work ed.Post that reg trick or program my friend...nice work
  3. #3  
    nice. We really need that standard way to share the carrier string. It seems everyone likes to put stuff there.
  4. #4  
    The hannip project
  5.    #5  
    Quote Originally Posted by slingbox View Post
    Great work ed.Post that reg trick or program my friend...nice work
    Thanks. I edited my 1st post to include the code. The hardest part was trying to figure out how to get the day and month to display the full name. Mortscript allowed a numerical value to be returned for the month/day. So I just made an array and set values, as you can see from the above.

    Quote Originally Posted by hannip View Post
    nice. We really need that standard way to share the carrier string. It seems everyone likes to put stuff there.
    Yeah, I've thought if it already, during my planning phase of my script. I brought it up in one of the Treo Alert threads.

    It's actually easy to do. Just make that a separate module. Who ever wants to use it, will just initiate a call to that module, passing the parameters to write on the field.
    Last edited by crazie.eddie; 04/07/2007 at 01:00 AM.
  6. #6  
    hmm a reg value count down.Set a 30 sec loop with each scrpting having a #
    script 1 has value 2.
    Have the loop call 1=value 2...on the next loop if value 2 call value 3 which script 2 and so on and so on.Pretty easy really.
  7. #7  
    The loop starts when device is turned on and when device turned remove notify = loop stops to save that much need bat life.
  8. #8  
    Im adding that to the refresh in the Alert control.mscr right now
  9.    #9  
    Actually, a little more simpler than that. I was thinking like this...

    ****************************************************
    Code:
    #CarrierDate.mscr
    #Author: Crazie.Eddie@Flashmail.com
    #
    #Description: Carrier logo date replacement
    #
    
    
    #Set_Date
    GetTime MonthVal, "m"
    
    MonthName[01]="January"
    MonthName[02]="February"
    MonthName[03]="March"
    MonthName[04]="April"
    MonthName[05]="May"
    MonthName[06]="June"
    MonthName[07]="July"
    MonthName[08]="August"
    MonthName[09]="September"
    MonthName[10]="October"
    MonthName[11]="November"
    MonthName[12]="December"
    
    MonthName=MonthName[%MonthVal%]
    
    GetTime DayVal, "w"
    
    DayName[0]="Sunday"
    DayName[1]="Monday"
    DayName[2]="Tuesday"
    DayName[3]="Wednesday"
    DayName[4]="Thursday"
    DayName[5]="Friday"
    DayName[6]="Saturday"
    
    DayName=DayName[%DayVal%]
    
    
    GetTime Date, " d, Y"
    CarrierField = %DayName%&", "&%MonthName%&""&%Date%
    
    
    CallScript ("\Program Files\Carrier Logo\CarrierField.mscr")
    
    
    #Executes the script again after 60 seconds
    StartTime = Timestamp()+60
    RunAt( StartTime, "\Windows\Startup\CarrierDate.mscr" )
    ****************************************************

    Code:
    #CarrierField.mscr
    #
    #Description: Writes to carrier logo field
    #
    
    
    RegWriteString "HKLM","System\State\Phone","Current Operator Name", %CarrierField%
    RegWriteString "HKLM","Software\Microsoft\Ril","CarrierName", %CarrierField%
    If I wanted my script to not write to that field, I would just comment out the Runwait statement, so it looks like this...
    Code:
    #CallScript ("\Program Files\Carrier Logo\CarrierField.mscr", %CarrierField%)

    ****************************************************

    To make it user friendly, we can make the installer to ask the user if they want that app to write to the field. If no, write to a registry. If the app sees the registry sees a Y, then write to the field. Otherwise, don't bother.
    Last edited by crazie.eddie; 04/07/2007 at 02:01 AM.
  10.    #10  
    Quote Originally Posted by slingbox View Post
    Im adding that to the refresh in the Alert control.mscr right now
    I've been wanting to talk to you about your script. Is there a way to design it to display an icon instead? Red for Treo Alert Off, Green for On? If so, I would like to collaborate with you to use it in conjunction to my Carrier Date script.
  11. #11  
    hmm to many place to post lol moved
  12.    #12  
    Ooops. I got carried away with my own script. Anyways, back to my original questions...

    ...I would like to have the ability to click on the date to run the Clock & Alarms in the Settings tab. Is there any way I can do that?
  13. #13  
    Off the carrier plugin no
  14. #14  
    Would it be possible to make this script alternate with XCast? I'd sure appeciate the benefits of both!
  15.    #15  
    Quote Originally Posted by neill View Post
    Would it be possible to make this script alternate with XCast? I'd sure appeciate the benefits of both!
    I already modified my script to use a seperate module to execute the write to that field, which is this...

    Code:
    # CarrierField.mscr
    # Author: Crazie.Eddie@Flashmail.com
    # Description: Script to write to the Carrier logo field
    #
    # 2007.04.07 - Initial creation (Crazie.Eddie@Flashmail.com)
    
    RegWriteString "HKLM","System\State\Phone","Current Operator Name", %CarrierField%
    RegWriteString "HKLM","Software\Microsoft\Ril","CarrierName", %CarrierField%
    You just need to modify your script to execute the script, so it should look like this...

    Code:
    CallScript ("\Program Files\Carrier Date\CarrierField.mscr")
    Make sure you set the variable to whatever you want to put into CarrierField. In Mortscript, the values of the variables are passed on from one script to another AS LONG as the variable is kept the same between each script. So whatever you want to write, just assign it to CarrierField by doing the following:
    CarrierField="Whatever you want"

    If you need help, just PM me the code and I can modify it for you.

    We could probably copy the module to a central folder, like just under \Program Files, instead \Program Files\Carrier Date.

    I've already tweaked Sling's Treo Alert using the module, to test it out, and so far it works along with my Carrier Date script. It actually works real nice. Since my script reads the time and writes to the field every minute, Treo Alert will display the Welcome, Active, or InActive display on the field when it's activated/deactivated, but then the time is soon displayed.
    Last edited by crazie.eddie; 04/07/2007 at 06:12 PM.
  16. #16  
    Oh Yoda, all knowing soothsayer, please create a universal script for all to call to write to the carrier status line. I'd like to be able to have Xcast take it over for a few seconds, then append the current weather string to an ongoing .dat file that is read by the traffic cop app to scroll all the entries periodically.

    Suggest that the Default Carrier Name be an entry in some .ini such that it can be "ignored" if found in the field.


    -- JDC
  17. #17  
    Crazie.eddie,
    Does this work on the 700W?
  18.    #18  
    Quote Originally Posted by kinger2 View Post
    Crazie.eddie,
    Does this work on the 700W?
    It should. I've examined Xcast and Treo Alert and we all write to the same field. If you want to test it out, I can send you the version without the external module to write to the field, since it's a very simple 1 app install. I'm going to create a little app that reads those registries, to make sure.
  19. #19  
    That would be great. I'll test it out. Thanks
  20. #20  
    Great stuff! Two questions though...

    First, Is there any particular reason that this script needs to run every 60 seconds? So far it seems like the CarrierName line only gets changed when switching to and from flight mode. I've changed the StartTime line to

    Code:
    RunNextVal = 86400 - (((FormatTime("H")*60) + FormatTime("i"))*60 +FormatTime("s")) + 5
    StartTime = Timestamp() + %RunNextVal%
    so the script re-executes 5 seconds after midnight.


    Second, do you really need to edit the state\phone registry key? I only have it change ...RIL\CarrierName which seems to work fine. I'm on a 700w so maybe it's different for other phones.
Page 1 of 2 12 LastLast

Posting Permissions