# Sliders and Autoit script

• 07-15-2010, 05:58 AM
pierrotm777
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 !:hungry:
• 07-17-2010, 10:06 AM
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.
• 07-17-2010, 10:07 AM
pierrotm777
Quote:

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
• 07-17-2010, 10:20 AM
pierrotm777
Quote:

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")`
• 07-18-2010, 02:23 AM
pierrotm777
Who can say me why \$rr.getinfo("isunits") don't return me True or False?

Thanks:)
• 07-21-2010, 09:58 AM
guino
Quote:

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 )
• 07-22-2010, 01:24 AM
pierrotm777
Quote:

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:lol: