Jump to content

Recommended Posts

Posted

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.

Posted

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

Posted

$Result =Mod ( value1, value2 )

It is in the AutoIt Help

Thankyou, i am new to autoit. I did search the help and forums but alas to no avail. Thanks again.

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
  • Recently Browsing   0 members

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