Search found 1418 matches

by Chunjee
Today, 11:00
Forum: Ask for Help (v1)
Topic: Trim sentences
Replies: 2
Views: 16

Re: Trim sentences

Just for fun: A := new biga() ; requires https://github.com/biga-ahk/biga.ahk str := " This is the first sentence. `n This is the second. `n Here comes the the third sentence. " str2 := A.join(A.map(strSplit(str, "`n"), A.trim), "`n") ; => "This is the first sentence.`nThis is the second.`nHere come...
by Chunjee
13 Apr 2024, 12:21
Forum: Gaming Help (v1)
Topic: click on image text
Replies: 11
Views: 143

Re: click on image text

For games you can post here: viewforum.php?f=18
by Chunjee
13 Apr 2024, 12:19
Forum: Scripts and Functions (v1)
Topic: [Class] expect.ahk (rapid unit testing)
Replies: 21
Views: 3338

Re: [Class] expect.ahk (rapid unit testing)

v1 has if var contains as standard syntax, but this has been removed in v2 - which is a shame imho. Huh did not know that was removed in v2. Obviously since it is not a function in v1 it does not fit comfortably in one line expect.true(UserInput not in yes,no) or whatever it would be. My current pl...
by Chunjee
12 Apr 2024, 15:46
Forum: Ask for Help (v1)
Topic: Is it possible to output several voices in one audio file?
Replies: 2
Views: 48

Re: Is it possible to output several voices in one audio file?

I believe the answer is yes. On cellphone at the moment will have to sit with my computer for a test and code :thumbup:

Sorry I misunderstood the question as speaking two voices at the same time. I don't know anything about file output.
by Chunjee
11 Apr 2024, 22:14
Forum: Scripts and Functions (v1)
Topic: [Class] expect.ahk (rapid unit testing)
Replies: 21
Views: 3338

Re: [Class] expect.ahk (rapid unit testing)

Yes inStr returns the location. v1 does not have a built-in 'contains' function or that would be better. I believe most examples have been switched to a perhaps clearer expect.true((1 == 1))

Additionally ahk cannot differentiate true from 1
by Chunjee
10 Apr 2024, 11:36
Forum: Scripts and Functions (v1)
Topic: [Class] expect.ahk (rapid unit testing)
Replies: 21
Views: 3338

Re: [Class] expect.ahk (rapid unit testing)

I for sure see an issue with .writeResultsToFile and that's my fault as I don't use that feature much yet. Fix should be on github hopefully today along with some tests as there are currently NONE for that method :o
by Chunjee
05 Apr 2024, 10:05
Forum: Ask for Help (v1)
Topic: Find color closest to cursor and click Topic is solved
Replies: 24
Views: 410

Re: Find color closest to cursor and click Topic is solved

You didn't use any arrays :think:


What if user wanted to find a purple pixel or a green one? Not just variations :lolno:
by Chunjee
03 Apr 2024, 15:09
Forum: Ask for Help (v1)
Topic: Find color closest to cursor and click Topic is solved
Replies: 24
Views: 410

Re: Find color closest to cursor and click Topic is solved

this is my first time hearing about matching three possible different colors.


I would use an array
ForEach() {
if match { sortClosest => click location }
}

You get the general idea
by Chunjee
02 Apr 2024, 12:01
Forum: Ask for Help (v1)
Topic: Find color closest to cursor and click Topic is solved
Replies: 24
Views: 410

Re: Find color closest to cursor and click Topic is solved

Yeah it was the code I posted earlier in the day.

The sorting comes from .resultsSortDistance

Prior to that I belive the search is plain left to right
by Chunjee
01 Apr 2024, 09:43
Forum: Ask for Help (v1)
Topic: Help With google search
Replies: 1
Views: 45

Re: Help With google search

if the searchengine doesn't have a highlighted short answer what should the msgbox display?
by Chunjee
31 Mar 2024, 10:49
Forum: Ask for Help (v1)
Topic: Find color closest to cursor and click Topic is solved
Replies: 24
Views: 410

Re: Find color closest to cursor and click Topic is solved

this should be pretty simple I heard :think: Just for my fun, not rigorously tested or production ready oGraphicSearch := new graphicsearch() ; requires https://github.com/Chunjee/graphicsearch.ahk redPixels := "|<redpixel>0xFD0F07@0.97$6.zzzzzU" resultsObj := oGraphicSearch.search(redPixels) if (re...
by Chunjee
31 Mar 2024, 10:33
Forum: Ask for Help (v1)
Topic: Find color closest to cursor and click Topic is solved
Replies: 24
Views: 410

Re: Find color closest to cursor and click Topic is solved

since some are bigger than others, a function that combines results that are {{x}} close to each other may be useful. my test query "|<redpixel>0xFD0F07@0.97$6.zzzzzU" found about 110 matches but my human eyes only count 25 so some reduction is needed since the big ones are registering more than once.
by Chunjee
31 Mar 2024, 10:06
Forum: Ask for Help (v1)
Topic: Find color closest to cursor and click Topic is solved
Replies: 24
Views: 410

Re: Find color closest to cursor and click Topic is solved

Since pixelsearch only returns one match, you will need pixelSearchAll() or similar. Might I suggest https://github.com/Chunjee/graphicsearch.ahk ? Then calculate the distance from the cursor forEach. graphicsearch.ahk has .resultSortDistance which uses Pythagorean theorem to measure the distance to...
by Chunjee
29 Mar 2024, 11:41
Forum: Ask for Help (v1)
Topic: Showing the first lines
Replies: 2
Views: 70

Re: Showing the first lines

just for fun: #Include <biga> A := new biga() ; requires https://github.com/biga-ahk/biga.ahk I := 3 H := "Line_1`r`nLine_2`r`nLine_3`r`nLine_4`r`nLine_5`r`nLine_6`r`nLine_7`r`nLine_8`r`nLine_9" firstThreeLines := A.join(A.take(A.split(H, "`r`n"), I), "`n") msgbox, % firstThreeLines ; => "Line_1`nLi...
by Chunjee
29 Mar 2024, 01:19
Forum: Ask for Help (v1)
Topic: Object.Delete(Key) doesn't work in my case. Looks like a bug.
Replies: 8
Views: 338

Re: Object.Delete(Key) doesn't work in my case. Looks like a bug.

Good reminder and workaround. I think I ran into this once or twice
by Chunjee
29 Mar 2024, 01:15
Forum: Ask for Help (v1)
Topic: Code review
Replies: 2
Views: 69

Re: Code review

Xpos and KolorCheck are not defined fyi :think:
by Chunjee
21 Mar 2024, 12:09
Forum: Ask for Help (v1)
Topic: confused about #include
Replies: 10
Views: 191

Re: confused about #include

just thinking out loud. It might look like: { "name": "Joe's Custom Plugin", "tasks": [ "pressOne", "functionClose()", "pressEsc" ], "hotkey": "w" } The downside is you have to code it twice in a way. Once to parse it and understand the input, then again to translate that input into hotkeys/actually...
by Chunjee
21 Mar 2024, 09:36
Forum: Ask for Help (v1)
Topic: confused about #include
Replies: 10
Views: 191

Re: confused about #include

If you are just remapping buttons that would be pretty easy as a txt file or ini


I prefer json however

Go to advanced search