AndreyS Posted October 11, 2016 Share Posted October 11, 2016 Try running the example from the help file and select the font color olive. In the next dialog, it will have turquoise. This happens with some other colors. #include <Misc.au3> #include <MsgBoxConstants.au3> Local $a_vFont = _ChooseFont() Local $sFontName = $a_vFont[2] Local $iFontSize = $a_vFont[3] Local $iColorRef = $a_vFont[5] Local $iFontWeight = $a_vFont[4] Local $bItalic = BitAND($a_vFont[1], 2) Local $bUnderline = BitAND($a_vFont[1], 4) Local $bStrikethru = BitAND($a_vFont[1], 8) $a_vFont = _ChooseFont($sFontName, $iFontSize, $iColorRef, $iFontWeight, $bItalic, $bUnderline, $bStrikethru) If (@error) Then MsgBox($MB_SYSTEMMODAL, "", "Error _ChooseFont: " & @error) Else MsgBox($MB_SYSTEMMODAL, "", "Font Name: " & $a_vFont[2] & @CRLF & "Size: " & $a_vFont[3] & @CRLF & "Weight: " & $a_vFont[4] & @CRLF & "COLORREF rgbColors: " & $a_vFont[5] & @CRLF & "Hex BGR Color: " & $a_vFont[6] & @CRLF & "Hex RGB Color: " & $a_vFont[7]) EndIf Autoit: 3.3.14.2. Windows: 8.1. How to fix it? Link to comment Share on other sites More sharing options...
JohnOne Posted October 11, 2016 Share Posted October 11, 2016 1 hour ago, AndreyS said: How to fix it? #include <Misc.au3> #include <MsgBoxConstants.au3> Local $a_vFont = _ChooseFont() Local $sFontName = $a_vFont[2] Local $iFontSize = $a_vFont[3] Local $iColorRef = $a_vFont[7] Local $iFontWeight = $a_vFont[4] Local $bItalic = BitAND($a_vFont[1], 2) Local $bUnderline = BitAND($a_vFont[1], 4) Local $bStrikethru = BitAND($a_vFont[1], 8) $a_vFont = _ChooseFont($sFontName, $iFontSize, $iColorRef) If (@error) Then MsgBox($MB_SYSTEMMODAL, "", "Error _ChooseFont: " & @error) Else MsgBox($MB_SYSTEMMODAL, "", "Font Name: " & $a_vFont[2] & @CRLF & "Size: " & $a_vFont[3] & @CRLF & "Weight: " & $a_vFont[4] & @CRLF & "COLORREF rgbColors: " & $a_vFont[5] & @CRLF & "Hex BGR Color: " & $a_vFont[6] & @CRLF & "Hex RGB Color: " & $a_vFont[7]) EndIf AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AndreyS Posted October 11, 2016 Author Share Posted October 11, 2016 Thank you, JohnOne! Perhaps for this purpose, this function returns the color representation so many options. ))) Link to comment Share on other sites More sharing options...
JohnOne Posted October 11, 2016 Share Posted October 11, 2016 The UDF is not documented very well. There is a thread for that if you care enough. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AndreyS Posted October 11, 2016 Author Share Posted October 11, 2016 (edited) I was looking for a more suitable, but not found. Tell me, please, in the future. But the problem is not really in the documentation, so as soon as this function to work properly as in the example. Apparently with the release of a new version Autoit something changed. Edited October 11, 2016 by AndreyS Link to comment Share on other sites More sharing options...
JohnOne Posted October 11, 2016 Share Posted October 11, 2016 Maybe it went from RGB to BGR. Only toiling through the changelog will tell. Or someone smarter than I. But the documentation is poor for that function. I'm unsure but I hope your immediate need is satisfied. OAO AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AndreyS Posted October 11, 2016 Author Share Posted October 11, 2016 8 minutes ago, JohnOne said: Maybe it went from RGB to BGR. Very similar to that! Since not all the colors so. Just green unchanged. Yes, thank you, you helped me! Link to comment Share on other sites More sharing options...
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