Search found 320 matches

by john_c
Yesterday, 03:24
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 644
Views: 149620

Re: Suggestions on documentation improvements

From https://www.autohotkey.com/docs/commands/CoordMode.htm: > Client [v1.1.05+]: Coordinates are relative to the active window's client area, which excludes the window's title bar, menu (if it has a standard one) and borders. Client coordinates are less dependent on OS version and theme. Some peopl...
by john_c
17 Nov 2019, 11:04
Forum: Ask For Help
Topic: AHK compiler: Extract icon from EXE file
Replies: 2
Views: 96

Re: AHK compiler: Extract icon from EXE file

> But you could extact an icon programmatically.

Yeah, I know. It seems it is the best way at this moment.
by john_c
17 Nov 2019, 07:09
Forum: Ask For Help
Topic: AHK compiler: Extract icon from EXE file
Replies: 2
Views: 96

AHK compiler: Extract icon from EXE file

I have an AutoHotkey script to automate my work with Sublime Text. I want to create a compiled version of this script with the Sublime Text's icon. However, it seems that AHK compiler (in contrast with Menu, Tray, Icon command) can't automatically extract the icon from EXE. Ahk2Exe.exe /in "MyScript...
by john_c
16 Nov 2019, 03:51
Forum: Ask For Help
Topic: Alternative to global variable
Replies: 15
Views: 681

Re: Alternative to global variable

@swagfag

> what is this function meant to do? no, its certainly not CopyToPseudoClipboard

Why?
by john_c
14 Nov 2019, 16:22
Forum: General Discussion
Topic: Array-related terminology: values vs. elements
Replies: 5
Views: 898

Re: Array-related terminology: values vs. elements

Yes, I like cats, but I'm not sure what exactly you mean...
by john_c
14 Nov 2019, 11:19
Forum: Ask For Help
Topic: How to remove elements from array? Topic is solved
Replies: 12
Views: 1108

Re: How to remove elements from array? Topic is solved

jeeswg Thanks a lot. I have tried to: * make it a function * slightly change it to keep the original array intact Helper function: ArrayToString(Array, Delimiter, Enquote := False) { Local S := Delimiter If (Enquote) For Index, Element In Array S .= """" . Element . """" . Delimiter Else For Index,...
by john_c
14 Nov 2019, 01:19
Forum: General Discussion
Topic: Array-related terminology: values vs. elements
Replies: 5
Views: 898

Array-related terminology: values vs. elements

arr := {"aaa": "foo", "bbb": "bar"} Which terminology is correct: 1 or 2 or some another? 1 * aaa and bbb are the keys. * foo and bar are the values. * "aaa": "foo" and "bbb": "bar" are the elements (= key-value pairs). 2 * aaa and bbb are the keys. * foo and bar are the values (= elements. The wor...
by john_c
13 Nov 2019, 07:53
Forum: Ask For Help
Topic: Remove duplicates from a string Topic is solved
Replies: 31
Views: 1474

Re: Remove duplicates from a string Topic is solved

You are missing spaces between bb and b , it should be String := "bb, b, aaa, bb, b, aaa, BBB, AAA, ZZZ" , if you want to test with comma-space delimiter ( ", " ). It was intentionally, but you are correct: it was required to test it with bb, b as well. It seems the version posted below works corre...
by john_c
12 Nov 2019, 10:55
Forum: Ask For Help
Topic: Remove duplicates from a string Topic is solved
Replies: 31
Views: 1474

Re: Remove duplicates from a string Topic is solved

Additional test completed: ; Test 4 String := "bb,b, aaa, bb,b, aaa, BBB, AAA, ZZZ" MsgBox % DeduplicateString(String, ", ", False) Both A and B lines of the StrSplit version gives the same (and the correct one) result: bb,b aaa (Else) bb,b (Else) aaa BBB (Else) AAA ZZZ Result: bb,b, aaa, BBB, ZZZ L...
by john_c
12 Nov 2019, 09:11
Forum: Wish List
Topic: Suggestions on documentation improvements
Replies: 644
Views: 149620

Re: Suggestions on documentation improvements

Guys, I think we take the personal aspect here too serious.

Actually, it is better to think about:

* should or should not the ClipWait passage be rephrased
* and how. That't it.

Also, I found Google developer documentation style guide very useful.
by john_c
12 Nov 2019, 07:35
Forum: Ask For Help
Topic: Remove duplicates from a string Topic is solved
Replies: 31
Views: 1474

Re: Remove duplicates from a string Topic is solved

Helgef Here is a version with StrSplit() and 3 tests. According to the test results (which are shown in the tables), there is no need to use A-version of the line, B-version works fine. But of course, I might be wrong here. ; Uncomment one of the lines (A or B) ; Uncomment one of the tests (1, 2 or...
by john_c
12 Nov 2019, 06:43
Forum: Ask For Help
Topic: Remove duplicates from a string Topic is solved
Replies: 31
Views: 1474

Re: Remove duplicates from a string Topic is solved

edit: well, I see the issue. I think it is better to post and discuss StrSplit version, not this one. I will post it soon. Helgef I hope this thread is not boring. I have tried to see the issue you are referring to, but I don't see it. Here is the test code and results: DeduplicateString(ByRef Stri...
by john_c
11 Nov 2019, 12:58
Forum: Ask For Help
Topic: Remove duplicates from a string Topic is solved
Replies: 31
Views: 1474

Re: Remove duplicates from a string Topic is solved

Helgef Could you explain for what purpose you have two Delimiter s in this line: If (!InStr(S, Delimiter . A_LoopField . Delimiter, CaseSensitivity)) I ask it because as I discovered the current version of your script works slightly incorrect in case the delimiter consists of multiple characters, f...
by john_c
11 Nov 2019, 12:13
Forum: Ask For Help
Topic: Remove duplicates from a string Topic is solved
Replies: 31
Views: 1474

Re: Remove duplicates from a string Topic is solved

jeeswg Thanks a lot. I have created a function, which is slightly modified version of your code. Of course, I will be appreciated for notes/corrections about it. Also, one thing that I don't understand is the purpose of Z. * Isn't is possible to change it to Foo? * Isn't is possible to change it to...
by john_c
11 Nov 2019, 10:40
Forum: Ask For Help
Topic: Alternative to global variable
Replies: 15
Views: 681

Re: Alternative to global variable

boiler Hi. Thanks about all this information: it is really useful. Below is the new version of the function, without Sleep, and basic examples how to use it. Very simple things, of course, but it could be useful for another "eternal newbies" like me. Edit: Ah... I have forgot to say. This is an exc...
by john_c
11 Nov 2019, 09:13
Forum: Ask For Help
Topic: Remove duplicates from a string Topic is solved
Replies: 31
Views: 1474

Re: Remove duplicates from a string Topic is solved

@jeeswg Thanks a lot.

As I understand, you mean the examples from the jeeswg's Scripting.Dictionary mini-tutorial?
by john_c
11 Nov 2019, 07:54
Forum: Ask For Help
Topic: Remove duplicates from a string Topic is solved
Replies: 31
Views: 1474

Re: Remove duplicates from a string Topic is solved

I greatly appreciated Helgef for his case-sensitive implementation.

Also, here is a version by nnnik: https://www.autohotkey.com/boards/viewtopic.php?p=300598#p300598

(doesn't have case sensitivity)

Go to advanced search