ahmeddzcom Posted November 2, 2019 Share Posted November 2, 2019 (edited) Hello i need checkbox with cross mark (x) Edited November 2, 2019 by ahmeddzcom Link to comment Share on other sites More sharing options...
water Posted November 2, 2019 Share Posted November 2, 2019 What have you tried so far (code, forum search, google ...)? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki Link to comment Share on other sites More sharing options...
ahmeddzcom Posted November 2, 2019 Author Share Posted November 2, 2019 27 minutes ago, water said: What have you tried so far (code, forum search, google ...)? Of Course i searched ... but nothing )= Link to comment Share on other sites More sharing options...
Developers Jos Posted November 2, 2019 Developers Share Posted November 2, 2019 So, please explain what exactly you want to accomplish here as your initial post doesn't explain anything! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ahmeddzcom Posted November 2, 2019 Author Share Posted November 2, 2019 (edited) 11 minutes ago, Jos said: So, please explain what exactly you want to accomplish here as your initial post doesn't explain anything! i edit the topic Edited November 2, 2019 by ahmeddzcom Link to comment Share on other sites More sharing options...
Nine Posted November 2, 2019 Share Posted November 2, 2019 You will have to think outside the box ( ? checkbox ? ). Take a look at the Wingdings 2 character set for example... “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Developers Jos Posted November 2, 2019 Developers Share Posted November 2, 2019 10 minutes ago, ahmeddzcom said: i edit the topic Still not enough information! Is this your own script checkbox or some other program? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ahmeddzcom Posted November 2, 2019 Author Share Posted November 2, 2019 1 minute ago, Jos said: Still not enough information! Is this your own script checkbox or some other program? Jos Yes this my script 😃 Link to comment Share on other sites More sharing options...
abberration Posted November 2, 2019 Share Posted November 2, 2019 Nine, great idea with the wingdings. Here's an example how that could work. #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 625, 443) $Label1 = GUICtrlCreateLabel("S", 88, 96, 36, 17) GUICtrlSetFont(-1, 12, 400, 0, "Wingdings 2") GUICtrlSetCursor (-1, 0) $Label2 = GUICtrlCreateLabel("Click Me", 104, 98, 70, 17) GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Label1 _ReverseSelection() Case $Label2 _ReverseSelection() EndSwitch WEnd Func _ReverseSelection() $current = GUICtrlRead($Label1) If $current = "S" Then GUICtrlSetData($Label1, Chr("163")) Else GUICtrlSetData($Label1, "S") EndIf EndFunc ahmeddzcom 1 Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Nine Posted November 2, 2019 Share Posted November 2, 2019 Another solution is to have the checkbox be $BS_PUSHLIKE + $BS_BITMAP. You simply need to have 2 .bmp (check and uncheck) of the same size. And you toggle between both .bmp. Easy to make... ahmeddzcom 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Nine Posted November 2, 2019 Share Posted November 2, 2019 @abberration You could streamlined your code like this : #include <GUIConstants.au3> GUICreate ("Test") $idCheckBox = GUICtrlCreateLabel (ChrW (0xA3),100, 70, 18, 18) GUICtrlSetFont(-1, 15, 500, -1, "Wingdings 2") $idLabelCheckBox = GUICtrlCreateLabel ("CheckBox", 122, 74, 100, 18) GUISetState () While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $idCheckBox, $idLabelCheckBox GUICtrlSetData ($idCheckBox, GUICtrlRead ($idCheckBox) = ChrW (0xA3) ? ChrW (0x51) : ChrW (0xA3)) EndSwitch Wend abberration and ahmeddzcom 2 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
abberration Posted November 3, 2019 Share Posted November 3, 2019 Nine, that is really cool. I learned a few things from your example. First, I used to try and have a case for two items and used OR and it never worked. Now I know to use a comma. Also, I looked up in the help file and found the conditional operator you used for switching the between the characters. Nice. I have seen some videos on how to program with Autoit, but they were all simple stuff, nothing advanced. I wish there were a better way to learn. ahmeddzcom 1 Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Nine Posted November 3, 2019 Share Posted November 3, 2019 1 hour ago, abberration said: I wish there were a better way to learn. Help file is one of the greatest assets of the language. Most of the functions have a runable example, and many are not that trivial. Reading it and studying the examples is probably the best way to learn AutoIt. Glad you liked my example ahmeddzcom 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
abberration Posted November 3, 2019 Share Posted November 3, 2019 Yes, I love the help file. It is very useful. I have spent more time reading it than actually programming. The biggest problem with it is more complicated things like regular expressions cannot be fully explained. That could be a book on its own. And functions were explained how parameters are used, but not the underlying concept of what a function does, why we use them or when is the best time to use them. I fully understand them now, but it took a while to get it. Unless I just stumbled upon the section that talked about conditional operators, I would never have known it existed. In other words, until today, I thought the way I wrote the script was the only way to do it. The help file cannot tell you "hey, there's a better way - check out this section...". And looking at the Case section, I now see the comma separating the two variable expressions, but the help file did not make that clear to me or show an example of more than one variable. ahmeddzcom 1 Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Nine Posted November 3, 2019 Share Posted November 3, 2019 It takes time to understand the "know-how" of most parts of AutoIt, time and experience. But you can always rely to this community when you need help. Or sometimes, just to attest if the code you made is optimal. abberration and ahmeddzcom 2 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy 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