Last active
April 26, 2021 15:41
-
-
Save JoeGlines/d2d248aab57cd471d3ce4113c377ae06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;******************************************************* | |
; Want a clear path for learning AutoHotkey; Take a look at our AutoHotkey Udemy courses. They're structured in a way to make learning AHK EASY | |
; Right now you can get a coupon code here: https://the-Automator.com/Learn | |
;******************************************************* | |
#Include <GetActiveBrowserURL> ; ;by atnbueno | |
#Include <WinClipAPI> ; ;by Deo | |
#Include <WinClip> ; ;by Deo | |
RCTRL:: ; B:\the-automator\Webinar\Scripts\Pretty URl and href 2.ahk | |
Browser_Back:: | |
;************************************************************ | |
clipboard = ; Empty the clipboard | |
SendInput, ^c ;Send control C to copy selected text to clipboard | |
ClipWait, 1 ;Wait up to 1 second for clipboard to have data | |
If ErrorLevel ;Added errorLevel checking | |
{ | |
MsgBox, No text was sent to clipboard | |
Return ;Prevent from going forward | |
} | |
ModernBrowsers := "ApplicationFrameWindow,Chrome_WidgetWin_0,Chrome_WidgetWin_1,Maxthon3Cls_MainFrm,MozillaWindowClass,Slimjet_WidgetWin_1" | |
LegacyBrowsers := "IEFrame,OperaWindowClass" | |
URL := GetActiveBrowserURL() ;Get active Browser URL | |
html:="<a href=" . url . " >" . Clipboard . "</a>" ;Build href | |
WinClip.Clear() | |
WinClip.SetHTML( html ) ;set clipboard to be Hyperlink | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment