Search found 61 matches

by pk23
24 Nov 2018, 01:59
Forum: Scripts and Functions
Topic: FindText - Capture screen image into text and then find it Topic is solved
Replies: 238
Views: 57986

Re: FindText - Capture screen image into text and then find it Topic is solved

Any ways to generate patterns at runtime? I mean, the parameter Text of FindText() hasn't been determined before running, so cannot be written fixed in the code. Any ways to capture the image and create the parameter Text during running?
by pk23
23 Nov 2018, 04:19
Forum: Ask For Help
Topic: Any way to make #warn only check the current script (without #include file)?
Replies: 1
Views: 124

Any way to make #warn only check the current script (without #include file)?

Because I'm using many libraries downloaded from this forum or the internet, when I check my own code with #warn command, 90% warning message it pops-up are from these libraries, which was definitely not what I wanted. I just want to check my own code. You may say that since these libraries pop up w...
by pk23
16 Nov 2018, 09:58
Forum: Ask For Help
Topic: Any ways to warn me of misspelling by like "variables are not declared" etc?
Replies: 3
Views: 257

Re: Any ways to warn me of misspelling by like "variables are not declared" etc?

Use the # warn directive. (Click on the highlighted word to see the documentation on #warn.) Ty and sry for reply late. I just learned the #warn directive and may I ask one more questions? After adding the #warn interpreter, AHK will also exam the #include file and report every one founded. Is ther...
by pk23
11 Nov 2018, 22:45
Forum: Ask For Help
Topic: Any ways to warn me of misspelling by like "variables are not declared" etc?
Replies: 3
Views: 257

Any ways to warn me of misspelling by like "variables are not declared" etc?

I'm completely newbie about code and don't know if it's viable for interpreted language, so plz pardon me if I'm wrong. I'm just a little discouraged b/c just debugged for half an hour and turns out the reason of a bug is misspelling the variable. like: startXHigh[b]t[/b]light := {key1: 320, key2: 2...
by pk23
11 Nov 2018, 11:39
Forum: Scripts and Functions
Topic: FindText - Capture screen image into text and then find it Topic is solved
Replies: 238
Views: 57986

Re: FindText - Capture screen image into text and then find it Topic is solved

Updated to the v6.2 version. :beer: A parameter is added at the end of the function to allow the last screenshot to be used. Of course, saving the last screenshot will take up a certain amount of memory. In addition, ScreenShot() function is added, which can be used before the loop. Awesome! In fac...
by pk23
30 Oct 2018, 00:38
Forum: Ask For Help
Topic: Why register dll successfully when directly run script, however failed when run by another script? Topic is solved
Replies: 1
Views: 130

Why register dll successfully when directly run script, however failed when run by another script? Topic is solved

When I run the following script A directly, it shows that the registration is successful, as shown in the screenshot below: https://i.loli.net/2018/10/30/5bd7eec50d17c.png However, when I run the SAME script A through another script B, the dll registration seems fail. Why? How to fix this? Thx :?: h...
by pk23
28 Oct 2018, 20:29
Forum: Scripts and Functions
Topic: FindText - Capture screen image into text and then find it Topic is solved
Replies: 238
Views: 57986

Re: FindText - Capture screen image into text and then find it Topic is solved

@pk23, When search text in the game, 1. Because the background is transparent, it is best to use color mode, and the background character (_) fault tolerance set to 1 (100%). 2. when making a text template, you can check the Modify box to adjust all the text to be black and all the background to be...
by pk23
28 Oct 2018, 17:59
Forum: Scripts and Functions
Topic: FindText - Capture screen image into text and then find it Topic is solved
Replies: 238
Views: 57986

Re: FindText - Capture screen image into text and then find it Topic is solved

the chatbox always appear on the same coordinates? could you send me a full screen print of the game to me so I can do some test and some code to send to you also try change this: if (ok:=FindText(860-300//2, 582-160//2, 300, 160, 0.7, 0.7, Text)) to this: if (ok:=FindText(468, 481, 300, 160, 0.7, ...
by pk23
28 Oct 2018, 15:21
Forum: Scripts and Functions
Topic: FindText - Capture screen image into text and then find it Topic is solved
Replies: 238
Views: 57986

Re: FindText - Capture screen image into text and then find it Topic is solved

I dont understand your language, but by looking at your code, your error tolerance seems too high 0.7 means that 70% of the pixels can be wrong, so generating false positives... Thank you. The high error tolerance is on purpose, because the issue I encountered is not false positive, but false negat...
by pk23
28 Oct 2018, 14:17
Forum: Scripts and Functions
Topic: FindText - Capture screen image into text and then find it Topic is solved
Replies: 238
Views: 57986

Re: FindText - Capture screen image into text and then find it Topic is solved

Sorry, my English is so poor that I can't guarantee to express myself clearly, so have to ask the author some questions in my native language ( and I know the author can read it ). If this is not allowed, please tell me and I will delete it. Edit: Basically, I want to constantly check whether the ch...
by pk23
17 Oct 2018, 20:47
Forum: Ask For Help
Topic: SEND command act like sticking to the previous line of keys?
Replies: 2
Views: 142

Re: SEND command act like sticking to the previous line of keys?

@eqv Thank you for your detailed and enthusiastic help. I just tried to add the keys() function and test again, the problem still exists. As for the game does not allow players to input so fast, tbh 200ms is actually not that fast, b/c the APM of top RTS players can reach 400, that is, their input i...
by pk23
17 Oct 2018, 20:08
Forum: Ask For Help
Topic: SEND command act like sticking to the previous line of keys?
Replies: 2
Views: 142

SEND command act like sticking to the previous line of keys?

The script is as simple as follows, and the target program is warcraft.exe which is an RTS game: #SingleInstance FORCE SetTitleMatchMode Regex #Persistent SendMode Input DetectHiddenWindows, On #IfWinActive ahk_class ((Warcraft III)|(OsWindow)|(Qt5QWindowIcon)) Tab & LButton:: KeyWait, Tab KeyWait, ...
by pk23
17 Oct 2018, 09:25
Forum: 请求帮助
Topic: 请教send总是黏住前面一行按键的问题
Replies: 0
Views: 393

请教send总是黏住前面一行按键的问题

脚本如下,很简单。但实际测试 如果把X行的时间调大一点,例如500ms,Y行的行为就正常(只发送鼠标左键单击) 但如果X行调成现在这样200ms,Y行的行为就很怪异,实际测试会表现出Ctrl-LButton的效果,就好像A行的ctrl没有松开一样 我尝试在X和Y两行之间,加入 SendInput, {Ctrl Up} 或者 KeyWait, Ctrl, T3 都不管用,仍然表现的像是Ctrl-LButton。怎样才能修复这个问题呢?谢谢 Tab & LButton:: KeyWait, Tab KeyWait, LButton BlockInput, On SendInput, +{LButt...
by pk23
14 Sep 2017, 01:19
Forum: Ask For Help
Topic: How space key become shift when being modifier, and still space when used alone? Topic is solved
Replies: 3
Views: 366

Re: How space key become shift when being modifier, and still space when used alone? Topic is solved

Hallo, perhaps: $Space:: T := A_TickCount While, GetKeyState("Space","P") Send, {Shift down} Send, {Shift up} If (A_TickCount - T < 200) Send, {Space} Return Thanks, using timer is a neat solution. btw, here is another possible one: Space::Shift Space Up:: SendInput {Shift Up} if (A_PriorKey = "Spa...
by pk23
12 Sep 2017, 23:53
Forum: Ask For Help
Topic: How space key become shift when being modifier, and still space when used alone? Topic is solved
Replies: 3
Views: 366

How space key become shift when being modifier, and still space when used alone? Topic is solved

Expected Result : ① press space +a/b/../z/1/2/../0/Lbutton/Rbutton, result in shift +a/b/../z/1/2/../0/Lbutton/Rbutton ② Drag an area holding space , result in drag an area holding shift ③ press space alone, is still space In order to achieve these effects, I tried two methods, both failed: first, ...
by pk23
29 Aug 2017, 12:23
Forum: Scripts and Functions
Topic: Automatically Restore Last Window Position For Each Process
Replies: 50
Views: 6989

Re: Automatically Restore Last Window Position For Each Process

@brutus_skywalker
Sometimes, even with the same exe and class, they are completely different window. Like the program written by Qt. This script has a very bad effect if used on anki desktop.

It maybe better if the script match the “exe+class+title” triad of the window.
by pk23
04 Jun 2017, 07:18
Forum: Ask For Help
Topic: Problem of hotstring failure (100% reproduced on my Win7) Topic is solved
Replies: 5
Views: 483

Re: Problem of hotstring failure (100% reproduced on my Win7) Topic is solved

I don't know why noone replied to your post, here are some reasons I sometimes don't answer. I don't know the answer and I am unable to find it relatively fast. The intentions of the OP seem suspicious or malicious. The demeanor of the OP is too demanding. Someone else have already answered to a sa...
by pk23
04 Jun 2017, 02:38
Forum: Ask For Help
Topic: Problem of hotstring failure (100% reproduced on my Win7) Topic is solved
Replies: 5
Views: 483

Re: Problem of hotstring failure (100% reproduced on my Win7) Topic is solved

Finally problem solved, just write like this:

Code: Select all

:?:ahk::AutoHotkey
and I'm sorry for the unpopular diction/ways which I choose, that makes even no one would like to reply. Apologize.
by pk23
28 May 2017, 02:33
Forum: Ask For Help
Topic: Problem of hotstring failure (100% reproduced on my Win7) Topic is solved
Replies: 5
Views: 483

Re: Problem of hotstring failure (100% reproduced on my Win7) Topic is solved

This test case is simple, but is actually simplified from my daily used script, which heavily used these "invalid" hotstring. Hope somebody is willing help.

Go to advanced search