Jump to content

Help with VB MOD Operator to Autoit ?


pageone
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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

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...