Jump to content

Newbie Question. How to solve this error?


xpMetal
 Share

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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...