# Thread: Sliders and Autoit script

1. ## 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.

3. Originally Posted by guino
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. Originally Posted by guino
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. Who can say me why \$rr.getinfo("isunits") don't return me True or False?

Thanks

6. Originally Posted by pierrotm777
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 )

7. Originally Posted by guino
"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

#### Posting Permissions

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