Kiti Posted June 15, 2008 Share Posted June 15, 2008 (edited) I've used locodarwin's UDF to colour up some cells in Excel. But almost everytime, I get another color than the one I've specified. For example: #include <ExcelCOM_UDF.au3> Local $oExcel = _ExcelBookNew(1) _ExcelCellColorSet($oExcel, 1, 1, 5, 1, 255, 0xFF0000) Colors in 0x0000FF Had anyone this problem before, or know how to solve it? Is there any workaround? Edited June 15, 2008 by Kiti Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Kiti Posted June 15, 2008 Author Share Posted June 15, 2008 Ideas anyone? Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 15, 2008 Moderators Share Posted June 15, 2008 I've used locodarwin's UDF to colour up some cells in Excel. But almost everytime, I get another color than the one I've specified. For example: #include <ExcelCOM_UDF.au3> Local $oExcel = _ExcelBookNew(1) _ExcelCellColorSet($oExcel, 1, 1, 5, 1, 255, 0xFF0000) Colors in 0x0000FF Had anyone this problem before, or know how to solve it? Is there any workaround?Well it's obviously using BGR rather than RGB... and I believe they removed the Opt("ColorMode") option... I wrote a simple converter that converts RGB to BGR or BGR to RGB just by passing the colorref. _ColorConvert So in your instance, you would do: _ExcelCellColorSet($oExcel, 1, 1, 5, 1, 255, _ColorConvert(0xFF0000)) Let me know if that worked for a quick fix. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Kiti Posted June 15, 2008 Author Share Posted June 15, 2008 Thaaaank you, thank you, thank you! It worked perfect! Think outside the box.My Cool Lego Technic Website -- see walking bipeds and much more!My YouTube account -- see cool physics experimentsMy scripts:Minesweeper bot: Solves advanced level in 1 second (no registry edit), very improved GUI, 4 solving stylesCan't go to the toilet because of your kids closing your unsaved important work? - Make a specific window uncloseableCock Shooter Bot -- 30 headshots out of 30 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