Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Slider for temperature from weather?

  1. #1
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463

    Slider for temperature from weather?

    I'm trying to make a slider for the current temperature based on the code "w_tmp" in the skincommands.txt.

    I've got it almost all the way working:

    Code:
    SETVARBYCODE;TEMPSLIDER;w_tmp||EVAL;TEMP;$TEMPSLIDER$*546
    This is designed so that if the temp is 120, the slider would be at or close to 100%

    Problem is the "w_tmp" label returns with the degrees symbol, and it doesn't calculate the slider's position because the label isn't strictly a number. (Can't calculate, so it always returns the position as 0, same as if you tried to divide 120 by orange, the answer is zero because the syntax is wrong.)

    Is there a way to get just the numeric value from the "w_tmp" label so that this can be done?
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  2. #2
    Super Moderator
    Auto Apps:loading...
    JohnWPB's Avatar
    Join Date
    Sep 2005
    Location
    West Palm Beach, Florida
    Posts
    4,703
    Blog Entries
    1
    Not sure if this will work, but in the RR.ini:
    weatherdegress=

    Maybe changing that to have nothing, could possibly work.
    Front End of Choice: Ride Runner (Is there anything else??? ) & Powered by the DFX5.1 Skin Available in the Mobile App Mart

    My Fiero Build Thread

  3. #3
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Doesn't seem like that works.

    I had a label display the calculations, it always comes up as 0.

    I had it display the $TEMPSLIDER$ variable, and it shows the temperature in this format:

    ##__F

    So I basically need to find a way to delete the "space degrees symbol space F" from the tag...
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  4. #4
    MGD
    MGD is offline
    FLAC
    Auto Apps:loading...
    MGD's Avatar
    Join Date
    Feb 2005
    Location
    Los Angeles
    Posts
    1,756
    you need to do this in Autoit and trim the sting of the degree symbol and then set a variable in RR and use that.

  5. #5
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Not familiar with autoit yet, but...

    I guess I'll D/L and


    off to learn...
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  6. #6
    MGD
    MGD is offline
    FLAC
    Auto Apps:loading...
    MGD's Avatar
    Join Date
    Feb 2005
    Location
    Los Angeles
    Posts
    1,756
    Something like this should do it.

    Code:
    $rr = ObjCreate("RoadRunner.sdk")
    $var = $rr.getinfo("w_tmp")
    $var = StringTrimLeft($var, 3)
    $var = StringStripWS($var, 8)
    ;MsgBox(4096, "Result", $var)
    $rr.execute("SETVAR;MYTEMP; &$var")
    Then you should have MYTEMP showing only 75 instead of 75*F

  7. #7
    MGD
    MGD is offline
    FLAC
    Auto Apps:loading...
    MGD's Avatar
    Join Date
    Feb 2005
    Location
    Los Angeles
    Posts
    1,756
    Ok, here is ascript what does exactly this. You can run it when ever you update the weather info. The VARIABLE is called "MYTEMP" and if you want to set a label then use
    as label code "=$MYTEMP$"
    Tested and working.
    Just rename the file to WeatherTemp.exe
    Attached Files Attached Files

  8. #8
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    since i'm still new with autoit...

    So, I would compile this into a script saved as an .exe and have the above code amended to look like this right?:

    Code:
    Run;$skinpath$myscript.exe||SETVARBYCODE;TEMPSLIDER;MYTEMP||EVAL;TEMP;$TEMPSLIDER$*546
    Or just have myscript.exe load "ONSKINSTART" (So that it doesn't try to load it again when I go back and click the above button again...)

    Edit:

    Didn't see you posted the script. I'll try this when I get to my home computer.

    Thanks
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

  9. #9
    MGD
    MGD is offline
    FLAC
    Auto Apps:loading...
    MGD's Avatar
    Join Date
    Feb 2005
    Location
    Los Angeles
    Posts
    1,756
    Just Rename it to weatherTemp.exe and put it in your scripts folder.
    On you menu.skin where you call the weather.skin, run this script.
    Code:
    "LOAD;Weather.skin||RUN;$SKINPATH$myscripts\weatherTemp.exe||SETVARBYCODE;TEMPSLIDER;$MYTEMP$||EVAL;TEMP;$TEMPSLIDER$*546"
    The script only returns the number, like 78 or 52 in the VARIABLE

  10. #10
    Wants to make it harder monkeyracer's Avatar
    Join Date
    May 2007
    Location
    Lakehood, CO
    Posts
    1,463
    Exactly what I was looking for, now it's a matter of time to wait for the official release of the RR update, so that weather AND solid slider styles work at the same time.
    2007 Chrysler PT Cruiser TE
    Car PC Progress:
    Planning.......[---------X-] 95%
    Parts...........[---------X-] 90%
    Fabrication...[---------X-] 90%
    RR Skin........[---------X-] 95%
    View my
    Worklog
    Road Runner Skins
    Website
    Favorite thread EVER!

Page 1 of 2 12 LastLast

Similar Threads

  1. Retreiving Custom SLider value help needed
    By JohnWPB in forum Road Runner
    Replies: 6
    Last Post: 02-21-2008, 04:24 PM
  2. Volume Slider
    By garto in forum Road Runner
    Replies: 0
    Last Post: 05-13-2007, 12:11 PM
  3. How do i setup Weather?
    By liquid_smoke in forum RR FAQ
    Replies: 0
    Last Post: 09-17-2006, 02:32 AM
  4. Weather Cache
    By danl in forum Road Runner
    Replies: 8
    Last Post: 05-28-2006, 04:50 AM
  5. Weather program for Map Monkey
    By warnockm in forum Other Cool Stuff
    Replies: 5
    Last Post: 12-10-2005, 08:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •