Check all or clear all checkboxes

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

26 Nov 2018, 14:23

Excellent
i've added

Startbuttonprogrammas:
gui, Submit, NoHide

and

Startbuttonregisters:
gui, Submit, NoHide

this is even better then a few days ago

i'm happy
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

27 Nov 2018, 07:40

just me wrote:A different approach you might want to try or not:
loek3000 wrote:Thanx Just me :) i see what it is doing -> coloring, but i dont want to screw up the main script... but then again, maybe i can use some of it (i like the coloring)

I did take a look at the script, and the coloring can be copied literally from there to the ButtonSelectAll: and ButtonSelectNone:
I then reused the same examples from v3.00.zip and discovered:
  • some files in the zip are encoded in UTF-8 BOM, others are not.
  • We should make sure to check for our input for consistency, eg, in the example there are two buttons, both green, both unchecked.
I did the copying outside of your main script, tested it, with new aspects like change color correctly when going back and forth, and have found, given consistent Input, we get expected results. All the changes in one zip-file, the Color+BOM update.
loek3000.Installatiemenu.v4.00.zip
(9.73 KiB) Downloaded 87 times
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

27 Nov 2018, 08:30

i did entered all the changes and it works very well, thanx!!

when select none, the unchecked ones, will turn green instead of red, which might be an fault in the script, but it is VERY usefull to leave out the others which were selected in the 1st place, do you get whay i am saying or should i put up the code or picture?
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

27 Nov 2018, 09:55

I tried to reproduce what I think you're saying and came across a short-sight I did, sorry.
Copying over these two lines of code to have coloring will not do us any good. There is no response to manally clicking any CheckBox, they always stay the same.
I liked the colors, too. but unless you decide to implement on your side of the code something to take care of basic colour management.

The best I can do is full speed retreat on the color front.
This coloring part is not in our reach.
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

27 Nov 2018, 10:02

I'ts ok Wolf_II i like it alot i really do

thanx again for all the help, you had alot of work on your hands with this, so i appriciate it!
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

27 Nov 2018, 10:31

OK, the task is done. But I'm not done yet. I consider the stuff in the zip-files to be an excellent boilerplate for my next task.
It will be entirely independent of your work, it is a coding challenge: Try and learn from the master.
I see for example right in front of my eyes bitmanipulation is used where the corresponding point in my code, is awful. (IX & 1) versus toggle this then exit or not. I am inspired to tackle this weakness. My target is to remove the need for empty calls, which is currently enforced.

I do that entirely for my own good and pleasure.
I will however post again if I succeed.
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

27 Nov 2018, 10:36

Good to hear, i was thinking about you using part of the script, but do you mean some of the regwrite and settings in w10 too or just the code you written?
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

27 Nov 2018, 11:03

your code is in the real-life examples that are currently 4 boxes each on two pages, the last fraction of your code, that nobody touched yet, will go.
All the reg stuff, and paths, and tools, which are scary, are gone. I am left with two pages of real-life examples.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

27 Nov 2018, 11:23

This is my boilerplate in a zip, containing my lesson-learned solution.
I am not saying yet, the solution is sound, I am saying this is how the boilerplate looks.
Lets not forget lesson one already, don't release untested, you get a preview of look-and-feel, with an encouragement to test.
The preview is for ease of your mind, in case you have need for clarity.
loek3000.Installatiemenu.v5.00.zip
(2.49 KiB) Downloaded 83 times
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

27 Nov 2018, 13:49

Well the scripts i added can be in potential be risky, for the last 5 or 6 ones especially... i want to make an script to turn everything back in the original state (1 script does it all)

Why this script? i re-install w10 for at least 4 times a year on my own machine and for other people 8 times orso, so a script which is still not complete i can use time and time again with all of the things i always wanted (do unattended install, load scripts etc etc) the only thing is i wanted to streamslip the w10 with autohotkey installed, but thats on a later process...
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

27 Nov 2018, 21:31

That is very interesting. Re-install win 10? I like that. ... a LOT!!

I used to have (starting from ~Win98) a need for that. The reason why I don't do that regularly any more: I'm also scared to touch my SDD, with a new partition manager. I will prepare a virtual Win10 machine and do a few test runs, before I dare to move anywhere. I have interest in potentially writing a batch-file, similar to your AllMyWork.ahk. From a distance, I get the impression of seeing a batch-file with option to en/disable every Line. I will come back to you on this later, for sure.
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

28 Nov 2018, 06:00

Here is my Win10 Tweaks boilerplate:
No more "A_GuiTab" needed, no more resets thereof, either. No empty calls to AddCheckbox() needed.
  1. You can split your AllMyWork.ahk into 3 parts, and fill up the pages. (This might be more interesting later)
  2. You can keep your AllMyWork.ahk, and #Include it again. (Win10 Tweaks boilerplate will not use this file any more)

Win10 Tweaks.v1.00.zip
(3.56 KiB) Downloaded 84 times
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

28 Nov 2018, 09:42

Good job Wolf_II

I've devided the scripts from the allthework etc etc and made multiple files to read from, easier to work with..

I've hide the other ahk's and only install.ahk is shown from 1st boot after installation of w10

now i'm busy understanding RegExMatch, FileRead
especially :

Code: Select all

FileCreateShortcut, Notepad.exe, %A_Desktop%\Kladblok.lnk , , , Mijn omschrijving, , i
and

Code: Select all

UrlDownloadToFile
that last one i already succeeded but it doesn't allow big files AND i want to make a script that waits until the download if finsihed before continuing the script

i'm still busy adding more registry tweaks, the list goes on and on, so i think i will make another seperate ahk file to include to install.ahk
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

28 Nov 2018, 10:09

loek3000 wrote:Good job Wolf_II
Thanks, :D I now like it too.
what were your concerns with the later points 5, 6?
I have not yet dug into what is going on, but I feel you might have advice what to watch out for?
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

28 Nov 2018, 10:16

:) those are registry enties that are personal (path to local paths) the other ones are useable to every pc, who doesn't want to have god mode in W10 :P
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

28 Nov 2018, 19:42

Thanks, I keep that in mind.

As an after-thought here is a list of supported options for AddCheckbox, aimed at new users and at future me.
  • make sure to not use any x or y options, the code tries to compensate by postfixing.
    That will present the interpreter with, say y+3 and y+5.
    Two simple tests led me to believe, there is some over-riding happening behind the scenes.
  • The title of each page == the header for the tabs == Name of the subroutine == FileName of the plug-in:
    They are all equal and must not contain blanks, but the script is nicer to use.
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

28 Nov 2018, 21:06

Thanx YOU for helping me with a great script!
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

28 Nov 2018, 22:07

Hi Loek,

I am still not done with the boilerplate. I will do more things, like remove all Labels.
Removing the Labels will break your code. Afterwards, you might not like the workload involved.

I will do this spin-off on my own. In case you are interested (maybe for your amusement/entertainment, maybe some other reason), I can share my work in either this thread (where it would be off-topic), or start my own thread.

I think, that the benefit will be:
no more #Includes needed, pages would be in their respective ahk-file, with the same name, but does not contain the Registers: label, it will contain a Registers() function. The boilerplate will use a local lib folder to achieve this.

Short: Main.ahk and lib-folder, rather than Main.ahk and a Pages-folder.
To visualze, remove all the #includes from Main.ahk, and the script will gather all the functions it needs on its own.
Maybe there will be a way to re-enable arbitrary strings for the display, currently they must not contain spaces (due to the Labels)
loek3000
Posts: 146
Joined: 12 Nov 2013, 03:24

Re: Check all or clear all checkboxes

28 Nov 2018, 22:12

Well i'm very intrested to see your work, so i will look into it when you are done. It's 4.11 am in the netherlands now, and still adding scripts to the files while i'm reading this :)
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Check all or clear all checkboxes

28 Nov 2018, 23:19

First iteration on the NoMoreLabels task: I ran into problem with auto-including, does not work for dynamic function calls. There may also be an accurate way to say this, but under the line, I still must #Include the files manually, :( But I got rid of the Labels. :D
Beware not to change any of your code yet. I must first go through the list of Variables and clean up some leftover "sub"-stuff.
Here is version 1.10 of Win10 Tweaks for your entertainment only. It already contains no more labels.
Win10 Tweaks.v1.10.zip
(22 Bytes) Downloaded 82 times

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: william_ahk and 167 guests