pageone Posted February 15, 2006 Posted February 15, 2006 Hi, I need to create the same function as the VB MOD operator in Autoit. Is it possible msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vaoprmod.asp I have used the round function but have the problem that it rounds up as well as down. To recreate the MOD operator i need it to only round down .. Is this possible ? I think i have got most of the way there except for the problem of rounding up as well as down. $callight = ((GUICtrlRead($light) / 8) * GUICtrlRead($lvl) )-round (((GUICtrlRead($light) / 8) * GUICtrlRead($lvl) )/ 16777216)*(16777216) Can anyone advise please.
Dickb Posted February 15, 2006 Posted February 15, 2006 Hi, I need to create the same function as the VB MOD operator in Autoit. Is it possible msdn.microsoft.com/library/default.asp?url=/library/en-us/vblr7/html/vaoprmod.asp I have used the round function but have the problem that it rounds up as well as down. To recreate the MOD operator i need it to only round down .. Is this possible ? I think i have got most of the way there except for the problem of rounding up as well as down. $callight = ((GUICtrlRead($light) / 8) * GUICtrlRead($lvl) )-round (((GUICtrlRead($light) / 8) * GUICtrlRead($lvl) )/ 16777216)*(16777216) Can anyone advise please. $Result =Mod ( value1, value2 ) It is in the AutoIt Help
pageone Posted February 15, 2006 Author Posted February 15, 2006 $Result =Mod ( value1, value2 )It is in the AutoIt HelpThankyou, i am new to autoit. I did search the help and forums but alas to no avail. Thanks again.
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