xpMetal Posted December 18, 2008 Share Posted December 18, 2008 (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) EndFuncError:C:\Users\Marc\Documents\pardus.au3 (7) : ==> Error in expression.:$col = $value // 7$col = ^ ERROR>Exit code: 1 Time: 0.344Can you help me?Greetz xpMetal Edited December 18, 2008 by xpMetal Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 19, 2008 Share Posted December 19, 2008 (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 December 19, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
xpMetal Posted December 19, 2008 Author Share Posted December 19, 2008 (edited) hm, I read somewhere, that this would be the "Integer Division". Thanks for the quick post. Greetz xpMetal Edited December 19, 2008 by xpMetal Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted December 19, 2008 Share Posted December 19, 2008 (edited) 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 December 19, 2008 by AdmiralAlkex .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
xpMetal Posted December 19, 2008 Author Share Posted December 19, 2008 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. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now