Jump to content

Recommended Posts

Posted

I'm trying a simple calculator example, but I've got a couple questions that are throwing me for a loop..

1)  How can you display the results in base 16 (hex) with the "0x" in front.. this doesn't seem to do it:

GUICtrlSetData($Input1,  "0x" + Hex(GUICtrlRead($Input1),4  ) )

Interestingly, the retrieving data part (GUICtrlRead), where the user entered data like "0x1234" works!

2) From the Language Reference Operators page, it doesn't seem like bit operations are supported..   i.e.  not (!) , left/right shift (<</>>), xor (^)..    

     or math operations like modulus (%),  not equal (!=)

    Is this correct?

 

3)  If they're not supported, having the Windows calculator app pop open and posting messages to it seems a little hacky (assuming the user still has the .exe)..   so instead, can autoit link to a dll and call functions from it, this way it's included and hidden?    Are there other ways to accomplish this?

Thanks!

 

 

Posted (edited)

1) The concatenation operator in AutoIt is an ampersand (&), not a plus (+) sign

2) Look at the Math functions in the Help file.  Not equal in AutoIt is "<>".  I guess you missed that on the operators page in the help file. ;)

image.thumb.png.e7fd89ad18bc72482b098537447fb34f.png

 

Edited by TheXman
Posted (edited)

Thanks!   I was looking at the 'operators' section of the  online docs.. no wonder I couldn't find it!

  

image.png.111af0cc142011c1ccdea217b66e702d.png

https://www.autoitscript.com/autoit3/docs/intro/lang_operators.htm

 

Edited by blipton

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
×
×
  • Create New...