HyperLinks in Auto Hot Key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tclass117
Posts: 8
Joined: 10 Jun 2016, 10:54

HyperLinks in Auto Hot Key

11 Jun 2016, 11:33

Looked for some threads, and they seemed incorrect or offtopic to the simple solution.


I'm looking to get a hyperlink http://www.facebook.com/ to show up as FB
User avatar
Capn Odin
Posts: 1352
Joined: 23 Feb 2016, 19:45
Location: Denmark
Contact:

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 11:44

Do you mean that you want to edit a HTML document to show FB instead of http://www.facebook.com/ ?
Please excuse my spelling I am dyslexic.
tclass117
Posts: 8
Joined: 10 Jun 2016, 10:54

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 11:49

I use a Ticket system that uses Rich Text. I'm learning how to work with Rich Text and ADK/Notepad Files

So I need a link, http://www.facebook.com/, to be a hyper link, FB in a Hot String.

::Media::
(
?
)
tclass117
Posts: 8
Joined: 10 Jun 2016, 10:54

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 12:44

I've research this and even tried to Create a hyperlink in Word and then save the document as RTF.

It is just not possible or is it just so easy and stupid of me? : (
User avatar
Learning one
Posts: 173
Joined: 04 Oct 2013, 13:59
Location: Croatia
Contact:

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 13:42

I hope example script below is what you're looking for;
When you type "fb" and press space, if MS Word is active window, and there is a opened document, script will insert Facebook hyperlink.

Code: Select all

#IfWinActive ahk_class OpusApp
::fb::
MSWordInsertHyperlink("Facebook","http://www.facebook.com/")
return
#IfWinActive

MSWordInsertHyperlink(TextToDisplay,Address) {
	try oWord := ComObjActive("Word.Application")
	try oWord.ActiveDocument.Hyperlinks.Add(oWord.Selection.Range, Address,"","",TextToDisplay)
}
tclass117
Posts: 8
Joined: 10 Jun 2016, 10:54

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 13:53

Not Quite. Thanks for the help though! Ignore anything about MS WORD.

I just need a Hot string to send a hyper link.

For instance,

I type "GS~!" and it spits out GameSpot instead of "http://www.gamespot.com/213/example".
User avatar
Learning one
Posts: 173
Joined: 04 Oct 2013, 13:59
Location: Croatia
Contact:

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 13:59

In which program typing gs has to insert GameSpot hyperlink instead of "http://www.gamespot.com/213/example"
Guest

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 14:29

WinClip might work for you (all depends on the target program) - Option 4 here with examples https://autohotkey.com/boards/viewtopic.php?f=7&t=8977
tclass117
Posts: 8
Joined: 10 Jun 2016, 10:54

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 14:31

The program is Oracle RightNow which allows Rich Text.
JJohnston2
Posts: 204
Joined: 24 Jun 2015, 23:38

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 14:50

I have automated some of the URL dialogs for Office programs but have never considered being able to directly insert a link straight from the clipboard... I'd be interested in seeing a working example of this if you get something working.
tclass117
Posts: 8
Joined: 10 Jun 2016, 10:54

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 15:01

I'll see what I can do. I'm not even thinking about clipboard.

In my head, its a simple "If this, then this" kind of statement.

I'm not a good programmer. In college, we had to create the Memory Card game and I couldn't make it two player.

It would just continue to stay on player one. So either their score went up or it didn't.
Guest

Re: HyperLinks in Auto Hot Key

11 Jun 2016, 15:08

Try the example, if it works just change the html code you need.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 212 guests