Sign in to follow this  
Followers 0
pageone

Help with VB MOD Operator to Autoit ?

3 posts in this topic

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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0