Leoj Posted June 1, 2008 Share Posted June 1, 2008 How to: If x is a multiple of y then... I've spent atleast 1.5 hours looking for an answer. Searching is just not wokring! An answer would be greatly appreciated! Like for multiples of 5... if X = 10 then Multiple=true if X = 14 then Multiple=false if X = 15 then Multiple=true Link to comment Share on other sites More sharing options...
Yraen Posted June 1, 2008 Share Posted June 1, 2008 How to: If x is a multiple of y then...I've spent atleast 1.5 hours looking for an answer. Searching is just not wokring! An answer would be greatly appreciated!Like for multiples of 5...if X = 10 then Multiple=trueif X = 14 then Multiple=falseif X = 15 then Multiple=true_MathCheckDiv Checks if NumA is divisable by NumB Link to comment Share on other sites More sharing options...
Leoj Posted June 1, 2008 Author Share Posted June 1, 2008 thank you very much for the quick responce - this will work =) but for reference isn't there something like calle "mod" or that uses a % sign?? I remember it from long ago and don't know if it was AI or not... Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 1, 2008 Share Posted June 1, 2008 thank you very much for the quick responce - this will work =)but for reference isn't there something like calle "mod" or that uses a % sign?? I remember it from long ago and don't know if it was AI or not...Do you not have a copy of the help file? If you look up "Mod", you find... wait for it... "Mod"! Quoting from the mysteriously missing help file: Mod --------------------------------------------------------------------------------Performs the modulus operation.Mod ( value1, value2 ) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Leoj Posted June 1, 2008 Author Share Posted June 1, 2008 lol I saw that but I'm no good with math and it made no sense to me... I didn't get how I was supposed to use it >.< And even now I'm not sure... I'm guessing it works like NumA and NumB for the one that's in Math.au3? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 1, 2008 Moderators Share Posted June 1, 2008 (edited) lol I saw that but I'm no good with math and it made no sense to me... I didn't get how I was supposed to use it >.< And even now I'm not sure... I'm guessing it works like NumA and NumB for the one that's in Math.au3?If Mod(x, 5) = 0 Then Edit: Just so you have a working example to see how it works: For $i = 1 To 100 If Mod($i, 5) = 0 Then ToolTip("Current count by five: "& $i, 0, 0) Sleep(100) Next Edited June 1, 2008 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. Link to comment Share on other sites More sharing options...
Leoj Posted June 1, 2008 Author Share Posted June 1, 2008 Thanks! I love you guys 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