Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)

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
Posted (edited)

hm,

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

Thanks for the quick post.

Greetz xpMetal

Edited by xpMetal
Posted

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
×
×
  • Create New...