Search found 41 matches

by william_ahk
26 Feb 2021, 02:11
Forum: Tutorials
Topic: Multiple Ways to Automate Chrome with AHK. Selenium, Console, Chrome ext. Chrome.AHK
Replies: 8
Views: 1395

Re: Multiple Ways to Automate Chrome with AHK. Selenium, Console, Chrome ext. Chrome.AHK

Yeah, Chrome.ahk has probably a few speed bottlenecks in terms of its websocket and json interfaces - but at least for the latter there is an alternative version by teadrinker which should be a bit faster. And yes, the underlying chrome debugging protocol (created by Google) is huge and covers a lo...
by william_ahk
22 Feb 2021, 05:43
Forum: Tutorials
Topic: Multiple Ways to Automate Chrome with AHK. Selenium, Console, Chrome ext. Chrome.AHK
Replies: 8
Views: 1395

Re: Multiple Ways to Automate Chrome with AHK. Selenium, Console, Chrome ext. Chrome.AHK

I've been using using puppeteer/playwright lately with AutoHotkey (which would the subject of this topic) ? I thought that would rather be a node.js thing. But afaik, Puppeteer depends on the same chrome debugging protocol like Chrome.ahk and Selenium in order to automate Chrome. The individual syn...
by william_ahk
21 Feb 2021, 07:37
Forum: Tutorials
Topic: Multiple Ways to Automate Chrome with AHK. Selenium, Console, Chrome ext. Chrome.AHK
Replies: 8
Views: 1395

Re: Multiple Ways to Automate Chrome with AHK. Selenium, Console, Chrome ext. Chrome.AHK

I've been using using puppeteer/playwright lately and it worked really well.
by william_ahk
07 Feb 2021, 20:48
Forum: Offtopic
Topic: is icoConvert.com safe? Topic is solved
Replies: 4
Views: 634

Re: is icoConvert.com safe? Topic is solved

Actually you can convert image files to .ico very easily using ImageMagick, here's a .bat file for doing this:

Code: Select all

"path-to-imagemagick\magick.exe" convert -background transparent "%1" -define icon:auto-resize=16,24,32,48,64,72,96,128,256 "%~n1.ico"
by william_ahk
08 Jan 2021, 07:32
Forum: Ask For Help
Topic: Replacing the tray icon of an application
Replies: 0
Views: 69

Replacing the tray icon of an application

Is it possible to replace the tray icon of applications other than the script itself? I tried Tray.ahk by majkinetor but couldn't seem to get it working. It seems that I couldn't get the icon handle of the target program. Please help. #include Tray.ahk F1:: DetectHiddenWindows, On WinGet, hwnd, ID, ...
by william_ahk
30 Dec 2020, 22:44
Forum: Scripts and Functions
Topic: ExecScript() - Run AHK script (file, thru pipe, from stdin)
Replies: 8
Views: 3137

Re: ExecScript() - Run AHK script (file, thru pipe, from stdin)

Is there any way to terminate the generated script from master script? * name - when running through named pipes, 'name' specifies the pipe name. * If omitted, a random value is generated. Otherwise, specify an * asterisk(*) to run from stdin. This option is ignored when a file * is specified for t...
by william_ahk
30 Dec 2020, 09:23
Forum: Scripts and Functions
Topic: ExecScript() - Run AHK script (file, thru pipe, from stdin)
Replies: 8
Views: 3137

Re: ExecScript() - Run AHK script (file, thru pipe, from stdin)

Is there any way to terminate the generated script from master script?
by william_ahk
24 Dec 2020, 20:05
Forum: Tips and Tricks
Topic: Autofire and toggle
Replies: 36
Views: 88295

Re: Autofire and toggle

For the second method. If I press the hotkey 3 times during the while loop it will never stop again, is there any workaround for this?
by william_ahk
23 Dec 2020, 21:18
Forum: Scripts and Functions
Topic: RandomPW() : Random password and simple string hash.
Replies: 15
Views: 5268

Re: RandomPW() : Random password and simple string hash.

How can the function be refactored into v2 syntax? I tried without success :crazy: RandomPW(L:=10, A:=1, R:="", C:="") { ; SKAN, D37D @ tiny.cc/randompw Loop (L+1, C:="23456789ABCDEFGHJKMNPQRSTUVWXYZ") A := Random(1, (248, R .= "{" . A . ":" . (A & 1 ? "L" : "") . "}")) Return Substr(Format(R, StrSp...
by william_ahk
16 Dec 2020, 01:25
Forum: AutoHotkey v2 Development
Topic: [WISH] formatted string literals
Replies: 4
Views: 707

Re: [WISH] formatted string literals

In my opinion template literals in ECMAScript is the best. Variables are enclosed in left and right brackets like ${var}, making the string much more readable than %%
by william_ahk
05 Dec 2020, 22:23
Forum: Scripts and Functions
Topic: Send keys periodically
Replies: 0
Views: 926

Send keys periodically

Menu, Tray, Icon, AutoHotkey.exe, 4 keys := [["1", 1000], ["2", 2000]] timers := [] F1:: { toggle := !toggle if (toggle) { for index, value in keys { send % value[1] timers.Push(set_interval("key_emitter", value[1], value[2])) } Menu, Tray, Icon, AutoHotkey.exe, 1 } else { for index, value in timer...
by william_ahk
30 Nov 2020, 22:11
Forum: Scripts and Functions
Topic: Optical character recognition (OCR) with UWP API
Replies: 67
Views: 15944

Re: Optical character recognition (OCR) with UWP API

If you know a better way for that I am totally opened to suggestions. Actually I'm using Capture2Text now since this api cannot recognize single letters/digits. Here's a simple function I've wrote for Capture2Text: Capture2Text(coords) { static program_path := ".\Capture2Text\Capture2Text_CLI.exe" ...
by william_ahk
23 Nov 2020, 23:05
Forum: Ask For Help
Topic: Post file via HTTP request? Topic is solved
Replies: 2
Views: 129

Re: Post file via HTTP request? Topic is solved

@TheDewd Thanks! That is really helpful
by william_ahk
20 Nov 2020, 03:53
Forum: Scripts and Functions
Topic: RunCMD() v0.94 : Capture stdout to variable. Non-blocking version. Pre-process/omit individual lines.
Replies: 121
Views: 28782

Re: RunCMD() v0.94 : Capture stdout to variable. Non-blocking version. Pre-process/omit individual lines.

Hi SKAN, do you know why the output string of RunCMD does not equal to the same string content?

Code: Select all

str1 := RunCMD(A_ComSpec . " /c echo SKAN")
msgbox % str1
msgbox % (str1 = "SKAN") ;0
by william_ahk
20 Nov 2020, 00:21
Forum: Wish List
Topic: ImageSearch: Click center of found image
Replies: 13
Views: 5505

Re: ImageSearch: Click center of found image

Masonjar13 wrote a function for getting the image size Example function: waitclick(img_path, btn := "", times := "", img_options := "") { CoordMode, Pixel, Screen CoordMode, Mouse, Screen loop { ImageSearch, found_x, found_y, 0, 0, % A_ScreenWidth, % A_ScreenHeight, % img_options ? img_options " " ...
by william_ahk
16 Nov 2020, 22:07
Forum: Ask For Help
Topic: Post file via HTTP request? Topic is solved
Replies: 2
Views: 129

Post file via HTTP request? Topic is solved

Code: Select all

curl -i -H 'Expect: application/json' -F [email protected] -F 'payload_json={ "wait": true, "content": "Here we go" }' https://discord.com/api/webhooks/
I found this curl command that could post the image file to webhooks, how can this be translated to HTTPRequest?

Go to advanced search