Results 1 to 7 of 7

Thread: Sliders and Autoit script

  1. #1
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,840

    Smile Sliders and Autoit script

    Hello all,

    I try to undertand how the slider run with autoit.

    Into my screen , i have these lines:
    Code:
    /Slider verticaux
    Y02,"DistanceSliderImages\SLIDER_*.png"
    S02,185,316,35,223,545,75,35,30,V,02,"",015,"!DISTANCESLIDER",""
    I look for an autoit example , how to program .

    If i understand the variable must to go from 0 to 65536

    So, if my autoit is $distance and go from 0 to 500 (by example)
    What i do to write .

    Thanks for all help !

  2. #2
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    You'll have to do a conversion from the 0-500 range into the 0-65536 range.. you just set:

    DISTANCESLIDER = $DISTANCE * 137.05 ( 65536/500 = 137.05 or 500 steps of 137.05)

    Then you just do SETVAR with the DISTANCESLIDER value.
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  3. #3
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,840

    Smile

    Quote Originally Posted by guino View Post
    You'll have to do a conversion from the 0-500 range into the 0-65536 range.. you just set:

    DISTANCESLIDER = $DISTANCE * 137.05 ( 65536/500 = 137.05 or 500 steps of 137.05)

    Then you just do SETVAR with the DISTANCESLIDER value.
    Cool Guino,

    I try that as soon as possible !

    Thanks

  4. #4
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,840

    Cool

    Quote Originally Posted by guino View Post
    You'll have to do a conversion from the 0-500 range into the 0-65536 range.. you just set:

    DISTANCESLIDER = $DISTANCE * 137.05 ( 65536/500 = 137.05 or 500 steps of 137.05)

    Then you just do SETVAR with the DISTANCESLIDER value.
    I have tried that but nothing !

    Code:
    $rr.execute("SETVAR;!DISTANCESLIDER;"&$distance * 137.05 )
    I have tried also that without success !

    Code:
    $rr.execute("SETVAR;!DISTANCESLIDER;10000")

  5. #5
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,840

    Smile

    Who can say me why $rr.getinfo("isunits") don't return me True or False?

    Thanks

  6. #6
    RoadRunner Mastermind
    Auto Apps:loading...
    guino's Avatar
    Join Date
    Nov 2004
    Location
    Toronto, Canada
    Posts
    9,818
    Quote Originally Posted by pierrotm777 View Post
    Who can say me why $rr.getinfo("isunits") don't return me True or False?

    Thanks
    "isunits" is a variable/setting not a label code, so you should use: $rr.getinfo("=$isunits$")

    for the slider, you need to define a variable slider like:

    Code:
    /Slider verticaux
    Y02,"DistanceSliderImages\SLIDER_*.png"
    S02,185,316,35,223,545,75,35,30,V,02,"",015,"$DISTANCESLIDER$",""
    THEN you can use SETVAR with it:

    $rr.execute("SETVAR;DISTANCESLIDER;10000")
    $rr.execute("SETVAR;DISTANCESLIDER;"&$distance * 137.05 )
    Ride Runner RR's Myspace

    "Being happy is not about having what you want, it's about wanting what you have."
    "The best things in life are always free - but that doesn't mean money can't buy you good things."

  7. #7
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,840
    Quote Originally Posted by guino View Post
    "isunits" is a variable/setting not a label code, so you should use: $rr.getinfo("=$isunits$")

    for the slider, you need to define a variable slider like:

    Code:
    /Slider verticaux
    Y02,"DistanceSliderImages\SLIDER_*.png"
    S02,185,316,35,223,545,75,35,30,V,02,"",015,"$DISTANCESLIDER$",""
    THEN you can use SETVAR with it:

    $rr.execute("SETVAR;DISTANCESLIDER;10000")
    $rr.execute("SETVAR;DISTANCESLIDER;"&$distance * 137.05 )
    Thanks Guino, It's cool

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
  •