Jump to content

# Newbie Question. How to solve this error?

## Recommended Posts

Hey there,

I'm new to this Forum and just started proging with AutoIt. Now I tried to create Functions, but I get an error which I cant solve. It will be just some newbie fail, but I just dont see the cause.

Code:

Sleep(50)

MoveTo(13)

Func MoveTo(\$value)

\$col = \$value // 7

\$row = Mod(\$value,7)

\$col = \$col * 77,5+485+38

\$row = \$row * 95+230+48

MouseMove(\$col,\$row)

EndFunc

Error:

C:\Users\Marc\Documents\pardus.au3 (7) : ==> Error in expression.:

\$col = \$value // 7

\$col = ^ ERROR

>Exit code: 1 Time: 0.344

Can you help me?

Greetz xpMetal

Edited by xpMetal

#### Share this post

##### Share on other sites

There is no "//" in AutoIt, that is your problem. To see which assignment, mathematical, comparison, and logical operators exist is AutoIt open the helpfile and go to "Language Reference">Operators

Edited by AdmiralAlkex

#### Share this post

##### Share on other sites

hm,

I read somewhere, that this would be the "Integer Division".

Thanks for the quick post.

Greetz xpMetal

Edited by xpMetal

#### Share this post

##### Share on other sites

Maybe you meant to write "\$col = \$value / 7" ?? That is a division.

Edit: And for making sure that it is an integer check Int() and IsInt() in the helpfile.

Edited by AdmiralAlkex

#### Share this post

##### Share on other sites

Maybe you meant to write "\$col = \$value / 7" ?? That is a division.

No, I meant to write "\$col = Int(\$value / 7)" to just get the number in front of the dot.

## Create an account or sign in to comment

You need to be a member in order to leave a comment

## Create an account

Sign up for a new account in our community. It's easy!

Register a new account

## Sign in

Already have an account? Sign in here.

Sign In Now

×

• Wiki

• Back

• Git