Hi,
I'd appreciate your assistance.
For the webpage "https://www.autohotkey.com/" loaded on Google Chrome, can I trigger an AutoHotkey script to copy the webpage title and url in markdown format?
The expected result would be:
[AutoHotkey](https://www.autohotkey.com/)
Thank you very much!
Can AHK copy to clipboard the webpage title and url in markdown format? Topic is solved
Re: Can AHK copy to clipboard the webpage title and url in markdown format?
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.
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.
- Yakshongas
- Posts: 590
- Joined: 21 Jan 2020, 08:41
Re: Can AHK copy to clipboard the webpage title and url in markdown format?
I think this is what you are asking for.
Code: Select all
F1::
SendEvent, {Control Down}
SendInput, l
Sleep, 200
SendInput, c
SendEvent, {Control Up}
WinGetActiveTitle, Titulo
Run, Notepad.exe
Sleep, 300
SendRaw, [
Send, %Titulo%
SendRaw, ]
Send, {Space} (
Send, %clipboard%
SendRaw, )
SendEvent, {Control Down}
Send, e
Send, c
SendEvent, {Control Up}
WinKill, ahk_exe Notepad.exe
Sleep, 450
SendInput, n
MsgBox, Copied %clipboard%
return
Please mark your topics as solved if you don't need any further help.
Need a little more help? Discord : Yakshongas#9893 🕹
Need a little more help? Discord : Yakshongas#9893 🕹
-
- Posts: 4344
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: Can AHK copy to clipboard the webpage title and url in markdown format? Topic is solved
@Yakshongas, no, no, no! As you like, but not like this!
Code: Select all
#If WinActive("ahk_class Chrome_WidgetWin_1 ahk_exe chrome.exe")
$F1::
Clipboard := ""
Send ^l
while !Clipboard {
Sleep, 50
Send ^c
}
Send {End}
WinGetActiveTitle, title
Clipboard := "[" . title . "](" . Clipboard . ")"
MsgBox, % Clipboard
Return
- Yakshongas
- Posts: 590
- Joined: 21 Jan 2020, 08:41
Re: Can AHK copy to clipboard the webpage title and url in markdown format?
@teadrinker
Lol your Script looks smooth AF!
I still have so much to learn,
Lol your Script looks smooth AF!
I still have so much to learn,
Please mark your topics as solved if you don't need any further help.
Need a little more help? Discord : Yakshongas#9893 🕹
Need a little more help? Discord : Yakshongas#9893 🕹
Re: Can AHK copy to clipboard the webpage title and url in markdown format?
Thanks all for the replies!
The last script deliveries exactly what I was looking for.
The last script deliveries exactly what I was looking for.
Re: Can AHK copy to clipboard the webpage title and url in markdown format?
This is great. Thank you!teadrinker wrote: ↑11 Feb 2020, 10:13@Yakshongas, no, no, no! As you like, but not like this!Code: Select all
#If WinActive("ahk_class Chrome_WidgetWin_1 ahk_exe chrome.exe") $F1:: Clipboard := "" Send ^l while !Clipboard { Sleep, 50 Send ^c } Send {End} WinGetActiveTitle, title Clipboard := "[" . title . "](" . Clipboard . ")" MsgBox, % Clipboard Return
Who is online
Users browsing this forum: Bing [Bot], jollyjoe and 321 guests