Announcement

Collapse
No announcement yet.

Sliders and Autoit script

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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."

    Comment


    • #3
      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

      Comment


      • #4
        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")

        Comment


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

          Thanks

          Comment


          • #6
            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."

            Comment


            • #7
              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

              Comment

              Working...
              X