Search found 784 matches

by Chunjee
Yesterday, 18:33
Forum: Scripts and Functions
Topic: [Class] biga.ahk (immutable utility library for arrays, strings, etc)
Replies: 72
Views: 12182

Re: [Class] biga.ahk (immutable utility library for arrays, strings, etc)

v0.39.0 has been published.

.toString was added

Performance enhancement on .last
by Chunjee
Yesterday, 01:56
Forum: Ask For Help
Topic: Getting last element in the array Topic is solved
Replies: 8
Views: 157

Re: Getting last element in the array Topic is solved

tmp_last := % tmp.MaxIndex() will give you the length of the array. 8 in this case, the string being split has a lot of spaces. Its probably best to use .Count() though as sparse arrays won't .MaxIndex() in a predictably. More info: https://www.autohotkey.com/docs/objects/Object.htm#MinMaxIndex You...
by Chunjee
27 Feb 2021, 11:27
Forum: Ask For Help
Topic: I can't make "If in" work Topic is solved
Replies: 6
Views: 144

Re: I can't make "If in" work Topic is solved

converting to a string seems unnecessary extra. A := new biga() ; requires https://www.npmjs.com/package/biga.ahk list := ["a","b","c"] if (A.includes(list, "a")) { msgbox, % "list contains a" } if you have a plain string list that would also work: list := "a,b,c" if (A.includes(list, "a")) { msgbox...
by Chunjee
26 Feb 2021, 15:10
Forum: Ask For Help
Topic: Random, Non-repeating "Soundboard" Creation.
Replies: 8
Views: 195

Re: Random, Non-repeating "Soundboard" Creation.

What I like to do is just shuffle the array; you can go through it and so long as it contained no duplicates it won't duplicate. You can remove the elements if needed but I find that to be extra work and runs the risk of trying to remove from an empty array; since it will eventually run out of values.
by Chunjee
23 Feb 2021, 14:00
Forum: Ask For Help
Topic: Defaulting Values (on missing object Key_ Topic is solved
Replies: 7
Views: 192

Re: Defaulting Values (on missing object Key_ Topic is solved

I prefer to set a default object then use a merge to overwrite the keys I do have: A := new biga() ; requires https://www.npmjs.com/package/biga.ahk defaultObj := {"carmen": "not found", "wally": "not found"} XML := {"wally": ["123", "456"]} XML := A.merge(defaultObj, XML) ; => {"carmen": "not found...
by Chunjee
23 Feb 2021, 13:18
Forum: Ask For Help
Topic: RegExMatch - generic method to find all matches?
Replies: 9
Views: 220

Re: RegExMatch - generic method to find all matches?

Its not polished yet but I wrote regexp.ahk to solve some of the hassle with regexMatch.

Code: Select all

re := new regexp("(.ime)")
resultsArr := re.exec("Time is an illusion. Lunchtime doubly so")
; => ["Time", "time"]
by Chunjee
21 Feb 2021, 12:54
Forum: Pulovers Macro Creator
Topic: Place of the Additional Commands for Image Search
Replies: 2
Views: 85

Re: Place of the Additional Commands for Image Search

not a command; that is a function.

It can go basically anywhere.
by Chunjee
21 Feb 2021, 00:58
Forum: Ask For Help
Topic: Array vs variable in GUI
Replies: 3
Views: 144

Re: Array vs variable in GUI

You can't put arrays or objects in-between two % for whatever reason. legacy style probably.
by Chunjee
20 Feb 2021, 17:31
Forum: Ask For Help
Topic: excel copy and paste between 2 workbooks
Replies: 9
Views: 302

Re: excel copy and paste between 2 workbooks

You might be able to gleam some ideas from my excel usage via COM: https://github.com/Chunjee/cc-CombineExcelSheets please note that two different excel instances are in play excel1 := ComObjCreate("Excel.Application") ;writer excel2 := ComObjCreate("Excel.Application") ;reader one reads information...
by Chunjee
18 Feb 2021, 12:14
Forum: Ask For Help
Topic: Paid Adhoc Help
Replies: 3
Views: 112

Re: Paid Adhoc Help

I'll take your phonecalls 24/7
$100 per call, any length.

A bargain compared to the hundreds of thousands I see spent on unused support.
by Chunjee
17 Feb 2021, 14:33
Forum: Ask For Help
Topic: Formating strings (Numbers) Topic is solved
Replies: 6
Views: 172

Re: Formating strings (Numbers) Topic is solved

A.split accepts a regular expression pattern to split by; [ ,.]+ works in this case I think. A := new biga() ; requires https://www.npmjs.com/package/biga.ahk string := "12345678, 1011121314. 1516171819" array := A.split(string, "/[ ,.]+/") ; => [12345678, 1011121314, 1516171819] It turns it into a...
by Chunjee
16 Feb 2021, 13:45
Forum: Ask For Help
Topic: Logically sorting a list
Replies: 21
Views: 246

Re: Logically sorting a list

array.ahk also has a sort that performs similar, but not the exact same order: ; requires https://www.npmjs.com/package/array.ahk #Include array.ahk\export.ahk array := ["cat", "11 a", "a 2", "ant", "12", "21", "1", "a 1", "# 3", "#4", "a"] array.sort() ; => ["# 3", "#4", 1, "11 a", 12, 21, "a", "a ...
by Chunjee
16 Feb 2021, 13:40
Forum: Ask For Help
Topic: Logically sorting a list
Replies: 21
Views: 246

Re: Logically sorting a list

A.sortBy sorts in the following order:

Code: Select all

A := new biga() ; requires https://www.npmjs.com/package/biga.ahk

array := ["cat", "11 a", "a 2", "ant", "12", "21", "1", "a 1", "# 3", "#4", "a"]
sortedArray := A.sortBy(array)
; => ["# 3", "#4", 1, "11 a", 12, 21, "a 1", "a 2", "a", "ant", "cat"]
by Chunjee
13 Feb 2021, 14:32
Forum: Scripts and Functions
Topic: [Class] string-similarity.ahk
Replies: 28
Views: 5252

Re: [Class] string-similarity.ahk

pretty cool I will check that out, thanks.
by Chunjee
13 Feb 2021, 04:25
Forum: Scripts and Functions
Topic: [Class] string-similarity.ahk
Replies: 28
Views: 5252

Re: [Class] string-similarity.ahk

v1.3.2 has been published .simpleBestMatch was taking the bestMatch.target from .findBestMatch ; but all the sorting can be skipped since comparison can be done at the same time as generating the rating. Therefore .simpleBestMatch should be faster and lighter now. I removed this.info_Array as mentio...
by Chunjee
12 Feb 2021, 17:48
Forum: Ask For Help
Topic: 5 variables Topic is solved
Replies: 4
Views: 93

Re: 5 variables Topic is solved

if you put them into an array https://biga-ahk.github.io/biga.ahk/#/?id=uniq can remove anything that isn't unique A := new biga() ; requires https://www.npmjs.com/package/biga.ahk var1 := "hey" var2 := "hello" var3 := "hello" var4 := "foo" var5 := "bar" noDupes := A.uniq([var1, var2, var3, var4, va...
by Chunjee
11 Feb 2021, 13:28
Forum: Ask For Help
Topic: check minutes between two different times
Replies: 10
Views: 196

Re: check minutes between two different times

This function is a work in progress but may help you: clipboard := "20210211104000" msgbox, % fn_timeDifference(A_Now, clipboard, "mins") ; => 12 fn_timeDifference(param_time1, param_time2, param_unit:="seconds") { Diff := param_time2 Diff -= param_time1, %param_unit% return abs(Diff) } then obvious...
by Chunjee
11 Feb 2021, 01:43
Forum: Ask For Help
Topic: Making a programme with database
Replies: 1
Views: 74

Re: Making a programme with database

I would use a SQL wrapper library to save some time: https://github.com/IsNull/ahkDBA
by Chunjee
10 Feb 2021, 18:20
Forum: Scripts and Functions
Topic: [Class] string-similarity.ahk
Replies: 28
Views: 5252

Re: [Class] string-similarity.ahk

I made another small video mostly for fun but also because I forgot to mention the bestMatch property


Go to advanced search