# Send \$var wont show two digits.

## Recommended Posts

My test script goes 12345678111111111222222222333333333444444444.....etc......when I want it to count with two digits like 123456789101112131415161718192021....etc

```\$var = 0
\$Loop = 1
While \$Loop=1
\$Var =  \$Var + 1
Send("{" & \$VAR & "}")
Sleep(1000)
Wend```

Ive tried makeing the origonal variable more than one digit, ive tried puting it in quotes with no success...any ideas?

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

##### Share on other sites

My test script goes 12345678111111111222222222333333333444444444.....etc......when I want it to count with two digits like 123456789101112131415161718192021....etc

```\$var = 0
\$Loop = 1
While \$Loop=1
\$Var =  \$Var + 1
Send("{" & \$VAR & "}")
Sleep(1000)
Wend
ÈBBPÛÛÛÛUÜ]J  ÌÍÝ  [ÈNÔÙ[
][ÝÞÉ][ÝÈ  [È ÌÍÕT [È ][ÝßI][ÝÊBBTÛY
L
BUÙ[```

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

##### Share on other sites

Yes, but when you use it in..say.....notepad it wont go into two digit numbers it will go as 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3........it will still have the first digit but wont show seccond, third, fourth...etc digits it willl just show the first for how ever many times it needs to >.<

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

##### Share on other sites

I would try taking out the "{" and the "}"

##### Share on other sites

I would try taking out the "{" and the "}"

Then it repeats

`& \$VAR &`

over and over...

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

##### Share on other sites

I would try taking out the "{" and the "}"

Yes that will fix it, I was hoping for him/her seeing that I didn't use those that they would change them, I meant to type that in last time... nice catch gm2360.

Edit:

Then it repeats

`& \$VAR &`

over and over...

Send(\$Var) Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

\$var = 0

\$Loop = 1

While \$Loop=1

\$Var = \$Var + 1

Send( \$VAR)

Sleep(1000)

Wend

##### Share on other sites

also you dont need \$loop = 1, 1 registers as true

In fact, anything registers as true if its not a 0 or a ""(blank string)

Edit: Also not the keyword false.

Edited by gamerman2360

##### Share on other sites

Thank you both, ^^ its working now.

EDIT:

I have the variable loop so friends can configure it how they need, just kinda took a snipit out of my code.

Edited by Vivvic

[quote name='DaleHohm']You have a strange habit of posting error messages that don't match your code.[/quote][quote name='SmOke_N']Forget the learning... straight to the scripting :lol: (laugh.gif)[/quote]

## Create an account

Register a new account

×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...