Page 1 of 2 12 LastLast
Results 1 to 20 of 26
  1.    #1  
    I love xCast but wanted an easy way to manage it as I move around and didn't want to edit the ini file each time, nor did I want to have to remember the zip codes that I frequent.

    Attached is a mortscript that reads a file xcastzip.lst (xml format) and let's you choose the zip code and optionally launches xcast. Just add your own zip codes to the file and luanch the script.

    Note: I do expect xcast.mscr to be in the same folder.

    Enjoy.

    JSACKS<<
    Need a Condo in Killington, VT: http://vtcondo.jsacks.com
    Attached Files Attached Files
  2. #2  
    Quote Originally Posted by jsacks View Post
    I love xCast but wanted an easy way to manage it as I move around and didn't want to edit the ini file each time, nor did I want to have to remember the zip codes that I frequent.

    Attached is a mortscript that reads a file xcastzip.lst (xml format) and let's you choose the zip code and optionally launches xcast. Just add your own zip codes to the file and luanch the script.

    Note: I do expect xcast.mscr to be in the same folder.

    Enjoy.

    JSACKS<<
    Need a Condo in Killington, VT: http://vtcondo.jsacks.com
    nice codings.... but similar functionality is already a feature of TheForceCast.mscr. the next version of this controlling app will build the .ini on the fly.

    -jdc
  3. #3  
    Nice job. Perfect for those that travel a lot.

    I was trying to do something similar based on which cell tower I was connected to and then got bored trying to find that info. This accomplishes what I want, albeit more of a manual process.

    I haven't done much mortscripting, is the center navigation button not the same as a stylus hit to the selected option?

    For example, I use the nav buttons to select "Yes" when the script first starts and then hit the center button. The script ends. If I tap the screen on "Yes", the script continues.

    Normal operation? Seems limiting for one-handed operation.

    I also changed the line with the inifile variable assignment to:
    iniFile = %ThisScriptpath% & "\Xcast.ini"
  4.    #4  
    Quote Originally Posted by reverged View Post
    For example, I use the nav buttons to select "Yes" when the script first starts and then hit the center button. The script ends. If I tap the screen on "Yes", the script continues.

    Normal operation? Seems limiting for one-handed operation.

    I also changed the line with the inifile variable assignment to:
    iniFile = %ThisScriptpath% & "\Xcast.ini"
    When using the nav button, I noticed that behavior as well, I think someone that knows mortscript better will need to answer. I did not see any way of coding a response from the screen or OK button different then pressing the nav button, someone chime in.

    As far as the inifile path, I lifted this from xCast ver 0.f date 3.14.2007, doesn't seem to matter from a performance standpoint the variable is estantiated in the statement above and not acted upon.

    Perhaps someone also knows the answer as to why I can't use the .XML file extension, that is why I use .lst. When you do an open you get a file not found?!?

    JSACKS<<
    Ski Killington? Need a Condo Rental: http://vtcondo.jsacks.com
  5. #5  
    Quote Originally Posted by reverged View Post
    For example, I use the nav buttons to select "Yes" when the script first starts and then hit the center button. The script ends. If I tap the screen on "Yes", the script continues.
    It should work the same. Which dialog is this? Btw, most buttons are going away in 4.01 so only stylus and softkeys will be used in the future.

    I also changed the line with the inifile variable assignment to:
    iniFile = %ThisScriptpath% & "\Xcast.ini"
    When concatenating paths use the \ concatenation operator. It inserts a \ if needed.

    ex.
    iniFile = %ThisScriptpath% \ "Xcast.ini"

    If %ThisScriptpath% doesn't end with a \ the \ operator will insert one for you.
  6. #6  
    Quote Originally Posted by jsacks View Post
    Perhaps someone also knows the answer as to why I can't use the .XML file extension, that is why I use .lst. When you do an open you get a file not found?!?
    I just created a test.xml and read it in fine using ReadFile. You did specify the full path right?
  7. #7  
    Quote Originally Posted by hannip View Post
    It should work the same. Which dialog is this? Btw, most buttons are going away in 4.01 so only stylus and softkeys will be used in the future.



    When concatenating paths use the \ concatenation operator. It inserts a \ if needed.

    ex.
    iniFile = %ThisScriptpath% \ "Xcast.ini"

    If %ThisScriptpath% doesn't end with a \ the \ operator will insert one for you.
    Excuse my ignorance on the syntax, I finally RTFM and realized that the %'s a re a hangover from the old syntax.

    My problem is with the center Nav button; it's as if it gives two key codes and one is left buffered. If I change things to:

    #------------ Ask User for City ------------------
    SelectedZip = Choice("City for xCast", "Select City", 0, 0, ChoiceDisplay)
    SelectedZip = Choice("City for xCast", "Select City", 0, 0, ChoiceDisplay)
    If (SelectedZip = 0)
    Exit
    EndIf
    the script works fine using the center nav button. It seems to sail right over the first Choice statement. If I put things back, it gets to the If (SelectedZip = 0) statement and then exits. Presumably the buffered character is a 0?

    I haven't debugged this much further than that. But may do more later tonight.

    I also found if I stick a Message("anything") after the first "Call QuestionHandler" it works OK as well.

    Weird. I didn't think my first mucking with a mscript would get this deep.

    700w by the way.
  8.    #8  
    Quote Originally Posted by hannip View Post
    I just created a test.xml and read it in fine using ReadFile. You did specify the full path right?
    I didn't change anything in the code other than .xml to .txt, then it worked, so I decided that since it wasn't a text file I would use the .lst (list?) extension.

    I can play with it again, but those were the results.

    JSACKS<<
  9. #9  
    Changing the lst to xml works fine for me.

    I have this as the zipfile assignment:

    #---------- Get Zip List from XML File ----------
    LocNumber = 0
    ZipFile = ThisScriptpath \ "xcastzip.xml"
    Still wigged about the center button thing....
  10. #10  
    why have an xml file at all? the loc'n info is available by passing the zip code to the web-based xml? what am I missing?

    -- jdc
  11. #11  
    Quote Originally Posted by jdcochran View Post
    why have an xml file at all? the loc'n info is available by passing the zip code to the web-based xml? what am I missing?

    -- jdc

    The xml file is a list of frequented locales. That way, you simply select the zip from a list, with the city and state as guidance. That zip is then used as it would be normally in xcast.

    Works great and I'm happy to have it!
  12. #12  
    I simply don't get it.... as in the need for parsing an .xml ini file when the same location info is available from the weather service.

    Have you tried TheForceCast.mscr?

    [edit] whoops, Dewpoint won't work unless you add this to xcast.mscr...

    FindIndex = Find(ContentsCC, "<dewp>")
    DewPoint = SubStr(ContentsCC, (%FindIndex% + 6) )
    FindIndex = Find(DewPoint, "</dewp>")
    DewPoint = SubStr(DewPoint, 1, (%FindIndex% - 1) )
    DewPoint0 = DewPoint

    -- JDC
    Attached Files Attached Files
    Last edited by jdcochran; 03/29/2007 at 08:15 PM.
  13. #13  
    JDCochran- is this an upgrade to your earlier version?
  14. #14  
    Quote Originally Posted by neill View Post
    JDCochran- is this an upgrade to your earlier version?
    well, officially, "no"... but I have been making some changes recently and did not save a previous version.

    there are a few new features to this version compared to previous releases. I'll document them "officially" in the xcast thread but post here as a pre-release to illustrate similar functionality.

    attached is even another tweak... to handle the multiple cities and provide a convenient way to change the default.

    -- JDC
    Attached Files Attached Files
  15. #15  
    I'll bite ;-)
  16. #16  
    still to come --- having TheForceCast create xCast.ini on the fly... passing the params for zip... update interval... display mode... etc.

    I may get cute and read an existing xcast.ini into TheForceCast... present the menus not with default settings, but with "last executed" settings.

    My thinking is to have 2 ini files. A static or "default" (xTheForceCast.ini) carrying things that don't change or that can be returned to a default... and a dynamic xCast.ini that is programmatically changed as a result of user menu options.
  17. #17  
    I don't mean to hijak this thread... but here's another update that's been looming in the wings.... still "unofficial". Try the 4th selection from the main menu.

    -- JDC
    Attached Files Attached Files
    Last edited by jdcochran; 03/29/2007 at 10:58 PM.
  18. #18  
    Quote Originally Posted by jdcochran View Post
    I simply don't get it.... as in the need for parsing an .xml ini file when the same location info is available from the weather service.

    Have you tried TheForceCast.mscr?
    I just tried TheForceCast (sort of) and I clearly see the difference. Think of this front end script as a list of favorites from which to launch xcast. No need to remember zip codes or do a search to find them. The places I travel to frequently are loaded up in a nice menu, easy to select.

    It's like TheForceCast off the steroids. I believe the world has space for both, the wonderful world of mort.

    Having said all that, I'm looking for RC11 so I can get TFC to run properly!! Bigmessage isn't happy.
  19. #19  
    Did you find RC11? If not, try the latest ver 4.0 (not the alpha 4.1).

    http://www.sto-helit.de/index.php?mo...=list&entry=18

    As for the need for the script... I'm still not convinced that maintaining an external .xml is necessary. One can easily put their favorite zipcodes (and location info) in an .ini or simply embed them, hard-coded, in the controlling script.

    It's just a preference thing. Seems a tad superfluous, IMHO. Since the bulk of the original code in xCastZipSelect.mscr was borrowed from me and my bud g-funkster, I am compelled to scrutinize any spawings of it. It's like a kid that you adopted at age 7, raised him in a particular environment to age 17, then he was lured away by a girl or the circus or by a cult for a few years. When he comes home with a few tattoos, surely you'd ask him a few what and why questions, aye?

    <grin, wink, roll eyes, etc.>

    -- JDC
  20. #20  
    Quote Originally Posted by jdcochran View Post
    As for the need for the script... I'm still not convinced that maintaining an external .xml is necessary. One can easily put their favorite zipcodes (and location info) in an .ini or simply embed them, hard-coded, in the controlling script.

    -- JDC
    Couple problems with an ini file where the xml route is good or seems like a cool idea (and what I'm playing with now for PodcastPlaylist, so thanks reverged for it):

    • INI file is good for simple name/value pairs but not so good when there are multiple data elements related together (like in his example zip, city, and state make up the "location"))
    • WriteINI only supports rewriting the entire thing currently, rather than sections of specific name/value pairs, although I guess this can be overcome with Writefile anyway


    just a thought...
    Palm III > HS Visor > Treo 600 > Treo 650 > Treo 750 > Treo Pro > PrePlus GSM

    "95% of all software issues are due to USER ERROR."
Page 1 of 2 12 LastLast

Posting Permissions