Search found 18 matches

by Gotjek
23 Feb 2023, 05:04
Forum: Wish List
Topic: Grid positioning of GUI controls
Replies: 2
Views: 1245

Grid positioning of GUI controls

Hi,
I found GridGUI here : viewtopic.php?style=17&f=6&t=93513
Sadly it's for v1 only and not native.
I think such a great feature would hugely benefit the GUI conception in AHK.
by Gotjek
25 Jan 2023, 11:44
Forum: Tips and Tricks
Topic: MVC pattern example
Replies: 15
Views: 5307

Re: MVC pattern example

@iPhilip : Great !
by Gotjek
05 Oct 2022, 06:34
Forum: Tips and Tricks
Topic: MVC pattern example
Replies: 15
Views: 5307

Re: MVC pattern example

Unfortunately, I don't feel experienced enough to explain this properly. I'm not even very sure I have well understood MVC. I'm trying to make small apps with GUI for my work and I'm not a developer at all. I learned Python as an amateur and I used to code with it. I always ended up creating code th...
by Gotjek
05 Oct 2022, 03:41
Forum: Wish List
Topic: Check if an Array contains something
Replies: 0
Views: 604

Check if an Array contains something

Hi, I want to know if an array contains some value. I searched for an integrated solution, like InStr ( https://lexikos.github.io/v2/docs/commands/InStr.htm ) but for an Array. I couldn't find it in AutoHotKey Help. I found this thread and the HasVal script : https://www.autohotkey.com/boards/viewto...
by Gotjek
03 Oct 2022, 08:33
Forum: Tips and Tricks
Topic: MVC pattern example
Replies: 15
Views: 5307

MVC pattern example

Hi, I like MVC pattern to prevent my GUI scripts from becoming unmanageable too quickly. I found great tutorials here but I lacked a functional sample in v2. Here is my attempt. I am not very experienced and this interpretation of MVC maybe isn't canonic. But I struggled some hours to do this and it...
by Gotjek
27 Sep 2022, 07:18
Forum: Scripts and Functions (v2)
Topic: Shuffle an array
Replies: 4
Views: 917

Re: Shuffle an array

Descolada : 1) It was not a good behavior, thanks for pointing that out. I think I could have messed some scripts with that. 2) I don't know either ! :D 3) My level is unfortunately not high enough to understand this well nor code this... I tried to understand this concept with the pencil and paper...
by Gotjek
25 Sep 2022, 07:10
Forum: Scripts and Functions (v2)
Topic: Shuffle an array
Replies: 4
Views: 917

Shuffle an array

I often need to shuffle an array, so I made this function. I hope it to be useful if you need this too. Shuffle_Array(array_in) { ; Shuffle an array. Supports array of objects. If (Type(array_in) != "Array") Throw TypeError("Parameter should be of Array type." , -1, array_in) array_clone := array_in...
by Gotjek
25 Sep 2022, 06:47
Forum: Wish List
Topic: [v2] Indentation instead of braces
Replies: 9
Views: 1710

Re: [v2] Indentation instead of braces

Thank you @RaptorX !

Sometimes I feel the "refactor" stage is like starting from scratch again and again.
At first, all is clear and simple. Then complexity sets in gradually and seems difficult to manage.
So seeing these smart pieces of code which resolves/avoids hours of hassle is great.
by Gotjek
23 Sep 2022, 07:38
Forum: Ask for Help (v2)
Topic: Variadic function call with named parameters ? Topic is solved
Replies: 3
Views: 763

Variadic function call with named parameters ? Topic is solved

Hi, I search for this for some time but I can't find the answer. I read the doc unsuccessfully ( https://lexikos.github.io/v2/docs/Functions.htm#VariadicCall ). We can use named parameters when week-end call a function. It is possible to store these named parameters in a variable, then pass this var...
by Gotjek
20 Sep 2022, 08:57
Forum: Wish List
Topic: [v2] Indentation instead of braces
Replies: 9
Views: 1710

Re: [v2] Indentation instead of braces

RaptorX Your code is exactly what I need. When I code, I try to translate my mere human logic into program logic. But it's not always very efficient/nice/optimized/legible. It's difficult to consider other ways to think, to order conditions and loops. I save this "Guard clauses" technique to apply ...
by Gotjek
19 Sep 2022, 06:15
Forum: Wish List
Topic: [v2] Indentation instead of braces
Replies: 9
Views: 1710

Re: [v2] Indentation instead of braces

Thank you for this nicer code !
by Gotjek
14 Sep 2022, 05:42
Forum: General Discussion
Topic: Thank you
Replies: 1
Views: 464

Thank you

Hi, I found AutoHotKey in 2008, liked it then forgot it. I rediscover it now and it's wonderful to see it is actively developed and distributed freely, with a great community. I use AutoHotKey to make small programs or scripts which help me a lot. As I'm not a developer, it's simple enough for me to...
by Gotjek
14 Sep 2022, 05:31
Forum: Wish List
Topic: [v2] Indentation instead of braces
Replies: 9
Views: 1710

[v2] Indentation instead of braces

Hi ! I have thi piece of code : Item_Btn_Messed_Phoneme__Click(gui_obj, info){ If phonemes_are_enabled = true{ For btn_clicked in messed_phonemes_buttons_list{ If (btn_clicked = gui_obj){ phoneme_clicked := item_opt__messed_phonemes[A_Index] Global last_messed_phoneme_clicked last_messed_phoneme_cli...
by Gotjek
23 Aug 2022, 11:00
Forum: Scripts and Functions (v2)
Topic: Get last lines : str_getTail for AHK v2
Replies: 0
Views: 356

Get last lines : str_getTail for AHK v2

Hi ! I wanted to get the last lines of a file or string. I searched the forum and found this post by Tuncay. I adapted it for AHK v2 ( with help ). As I am some AHK noob, it may not be perfect. I hope it will be useful ! str_getTail(input_str, last_lines := 1) { position := InStr(input_str, "`n",, -...
by Gotjek
22 Aug 2022, 14:04
Forum: Scripts and Functions (v2)
Topic: JSON Serializer - 2022/09/07 - beta.8
Replies: 43
Views: 19123

Re: JSON Serializer - 2022/01/03 - beta.3

The #include works now.
I downloaded this with HTML code... :facepalm:
Thank you !
by Gotjek
22 Aug 2022, 10:05
Forum: Scripts and Functions (v2)
Topic: JSON Serializer - 2022/09/07 - beta.8
Replies: 43
Views: 19123

Re: JSON Serializer - 2022/01/03 - beta.3

Hi !

I try to use your library with AHK v2 beta 7. I only included it but got this error :
image.png
image.png (11.48 KiB) Viewed 779 times
by Gotjek
12 Aug 2022, 03:45
Forum: Ask for Help (v2)
Topic: "This Func cannot be used as an output variable" Topic is solved
Replies: 2
Views: 928

Re: "This Func cannot be used as an output variable" Topic is solved

Exactly ! Thank you very much. This works : hide_word_btn := presenter_gui.Add("Button", , "Cacher le mot") hide_word_btn.OnEvent("Click", Hide_Word) ; <-- I removed "_Btn" to have a function woth a different name. ... Hide_Word(*){ image_name_txt.Text := "" image_name_txt.Visible := 0 Return }
by Gotjek
11 Aug 2022, 11:19
Forum: Ask for Help (v2)
Topic: "This Func cannot be used as an output variable" Topic is solved
Replies: 2
Views: 928

"This Func cannot be used as an output variable" Topic is solved

Hi, I get this error message when I run my script. Here is the problematic extract : hide_word_btn := presenter_gui.Add("Button", , "Cacher le mot") hide_word_btn.OnEvent("Click", Hide_Word_Btn) ; <-- The error message points to this line : "Specfically : Hide_Word_Btn" ... Hide_Word_Btn(*){ image_n...

Go to advanced search