Yes. It can.
You can use WinGetTitle or something to get the title.
You can google "Get current URL with AHK".
Then you can use the "Send" command to type whatever you need, however you need.
Search found 26 matches
- 10 Feb 2020, 23:55
- Forum: Ask for Help (v1)
- Topic: Can AHK copy to clipboard the webpage title and url in markdown format? Topic is solved
- Replies: 6
- Views: 3342
- 07 Sep 2019, 00:26
- Forum: Ask for Help (v1)
- Topic: combine 2d array value from two array Topic is solved
- Replies: 6
- Views: 1484
Re: combine 2d array value from two array Topic is solved
You could do something like this : a := [{"id":59,"size":36} , {"id":123,"size":37} , {"id":62,"size":38} , {"id":63,"size":39} , {"id":64,"size":40}] b := [{"id":63,"stock":17} , {"id":123,"stock":16} , {"id":59,"stock":10} , {"id":64,"stock":12} , {"id":62,"stock":14}] id := [] for k, v in a { id[...
- 06 Sep 2019, 23:55
- Forum: Ask for Help (v1)
- Topic: Is AHK suitable for this purpose?
- Replies: 2
- Views: 626
Re: Is AHK suitable for this purpose?
Yes. Looks like it. You'll just be storing some text with some variables only, right?
- 28 Aug 2019, 19:48
- Forum: Ask for Help (v1)
- Topic: [WIP] utility library
- Replies: 20
- Views: 3960
Re: Help with utility library
Alright. I'm not very experienced in writing methods, so I wont' be putting a git request. But thanks to CloakerSmoker and Cap'n Odin on discord, they wrote a merge function for arrays using recursion: Merge(obj1, obj2) { if(!IsObject(obj1) && !IsObject(obj2)) { ; if only one OR the other exist, dis...
- 27 Aug 2019, 04:04
- Forum: Scripts and Functions (v1)
- Topic: Move active window to second monitor and back
- Replies: 3
- Views: 7165
Re: Move active window to second monitor and back
I believe you can do a quick screen-dpi scaling by doing something like this:
or was it...
But yeah, point being: You can nab the screen's current DPI, and then do some division with the standard DPI scaling (96).
Code: Select all
scale := 96 / A_ScreenDPI
Code: Select all
scale := A_ScreenDPI / 96
- 20 Jul 2019, 16:18
- Forum: Ask for Help (v1)
- Topic: Click on a screen coordinate
- Replies: 6
- Views: 9252
Re: Click on a screen coordinate
Get the ahk_id or ahk_pid of that window. Then you can use it for the controlclick.... and the game I'm playing changes tab name every minute or so which didn't help with the window name..
- 20 Jul 2019, 15:53
- Forum: Ask for Help (v1)
- Topic: How to copy massive data to clipboard Topic is solved
- Replies: 3
- Views: 1143
Re: How to copy massive data to clipboard Topic is solved
You would do something like this:
Code: Select all
table := [1, 2, 56, 32, 54]
meow := ""
Loop % table.count() {
meow := table[A_Index] "`n"
}
Clipboard := meow
- 08 Jul 2019, 03:32
- Forum: Ask for Help (v1)
- Topic: Triggerin Actions with Hotstrings instead of Hotkeys Topic is solved
- Replies: 8
- Views: 2213
Re: Triggerin Actions with Hotstrings instead of Hotkeys Topic is solved
Did you know? you can do the dt1-dt9 by doing something like this:
Code: Select all
Loop, 9
Hotstring(":X*:dt" A_Index, "thisLabel")
return
ThisLabel:
switchDesktopByNumber(substr(A_ThisHotkey, 0, 1))
return
- 08 Jul 2019, 03:19
- Forum: Ask for Help (v1)
- Topic: Help with script (timing & toggled loop)
- Replies: 3
- Views: 949
Re: Help with script (timing & toggled loop)
To toggle something on/off, I recommend using SetTimer. In this format: count := 0 x::SetTimer, label, % (toggle := !toggle) ? 50 : "Off" label: ToolTip, % "AutoHotKey: " ++count return Then, find what key your xBox One Controller is for the right trigger, and just use this format: send {key down} w...
- 08 Jul 2019, 02:13
- Forum: Ask for Help (v1)
- Topic: How do I do this - if holding down 'a' and then pressing 's', do X Topic is solved
- Replies: 6
- Views: 1292
Re: How do I do this - if holding down 'a' and then pressing 's', do X Topic is solved
You could also do:
Code: Select all
#if GetKeyState("a")
s::send x
#if
- 05 Jul 2019, 03:10
- Forum: Ask for Help (v1)
- Topic: Pixelgetcolor not working?
- Replies: 3
- Views: 1537
Re: Pixelgetcolor not working?
When in doubt, check your variables. Use tooltip/msgbox. pause on #singleinstance, force coordmode, mouse, screen coordmode, pixel, screen setdefaultmousespeed, 3 ;;this only works with bluestacks in full sized windowed mode. not fullscreen halfx := A_ScreenWidth // 2 halfy := A_ScreenHeight //2 msg...
- 02 Apr 2019, 02:32
- Forum: Ask for Help (v1)
- Topic: I Need to advace web page
- Replies: 2
- Views: 678
Re: I Need to advace web page
Step 1: Grab the URL. Use any method you want.
Step 2: Use RegExMatch(). Match between the last "/" and "numbers"$.
Step 3: Add 1 to it.
Step 2: Use RegExMatch(). Match between the last "/" and "numbers"$.
Step 3: Add 1 to it.
- 23 Mar 2019, 12:53
- Forum: Scripts and Functions (v1)
- Topic: Multiple Screen Captures
- Replies: 3
- Views: 2088
Re: Multiple Screen Captures
Neat! However, instead of running the whole script by itself, why not make it into a function? We'll call the first part "CreateFile()" because, well, we're creating a file: createFile() { FormatTime, dt_string,, yyyyMMdd datei = C:\Users\USR\Pictures\Screenshots\%dt_string% ifNotExist, %datei% File...
- 22 Mar 2019, 11:58
- Forum: Scripts and Functions (v1)
- Topic: Function: IniRead()
- Replies: 22
- Views: 10802
Re: Function: IniRead()
XD Don't think of it as "returning it as an array". think of it as a "Section.key" variable, as oppose to a "sectionkey" variable. You know, a variable with an extra period in between. Otherwise, without any separator between the section and key, you might run into issues when you do something like ...
- 22 Mar 2019, 11:53
- Forum: Scripts and Functions (v1)
- Topic: Pixel Predator - PixelSearch Script
- Replies: 61
- Views: 47214
Re: Pixel Predator - Pixel Search Script
I'm not sure about bottom to top, but there is the "slow mode" feature: Slow mode only: By default, the search starts at the upper-left pixel of the region and checks all pixels vertically beneath it for a match. If no match is found there, the search continues to the right, column by column, until ...
- 21 Mar 2019, 17:57
- Forum: Ask for Help (v1)
- Topic: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved
- Replies: 8
- Views: 5672
Re: Run a script every specified weekday at specified time (use ahk instead of task manager) Topic is solved
Without taking into consideration all other issues and looking purely at the code, I'd suggest you do something similar to what you already have if (InStr(date, A_Wday)) that way, you can just do sleepTill(1610, 135) SleepTill(Time, date:= 0) { if (InStr(date, A_Wday)) { ; get hour ST_Hour:=SubStr(T...
- 21 Mar 2019, 16:56
- Forum: Ask for Help (v1)
- Topic: Can anyone write me this into AHK
- Replies: 3
- Views: 715
Re: Can anyone write me this into AHK
That looks about right. You did it correct. The script should run fine. Mind you, if it's for a game, try checking to see if it works with a basic key first: a:: send q You can also check here : https://autohotkey.com/board/topic/111737-how-to-make-ahk-work-in-most-games-the-basics/ And you can cons...
- 21 Mar 2019, 15:38
- Forum: Ask for Help (v1)
- Topic: Can anyone write me this into AHK
- Replies: 3
- Views: 715
Re: Can anyone write me this into AHK
Look up the autohotkey documentation.
commands to look for are Send and Sleep.
Check out the autohotkey tutorial too
commands to look for are Send and Sleep.
Check out the autohotkey tutorial too
- 20 Mar 2019, 13:22
- Forum: Scripts and Functions (v1)
- Topic: Function: IniRead()
- Replies: 22
- Views: 10802
Re: Function: IniRead()
What about this code? Run it, and then call the variables by doing: section.key note: For some reason, when I make an associative array in the function using %sectionList%[key] := value I'm able to find the variable outside the function. So if my ini file was like: [Edit1] X=10 ; comments on side? Y...
- 19 Mar 2019, 22:53
- Forum: Scripts and Functions (v1)
- Topic: Emulating Mac Glyphs Characters on PC
- Replies: 0
- Views: 1010
Emulating Mac Glyphs Characters on PC
This is an attempt to emulate Mac's way of typing in accents and glyphs onto Windows. I took the basic structure from aaron-gustafson's site (linked below), and replaced the characters with the appropriate ascii+unicode. Prior to me replacing it, it wasn't working properly b/c it was sending multipl...