• Become a Power user Intro to AutoHotkey Intermediate AutoHotkey Intermediate Objects GUIs are Easy w/AutoHotkey Painlessly switch from V1 to V2

Rip the URL from the Clipboard with AutoHotkey

Someone asked me if I had a tool that would look at the clipboard and return only the URL or Rip the  URL from the Clipboard. (The clipboard has various formats like: Files, Text, Rich Text Format, HTML, Images, etc.).

I used the cool WinClip library which can be grabbed here: https://autohotkey.com/board/topic/74670-class-winclip-direct-clipboard-manipulations/ and, with the help of maestrith, wrote a script which returns the various items on the clipboard in HTML format as an object.

Rip the URL from the Clipboard

#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
global Com:=ComObjCreate(“HTMLFile”)
Browser_Back:: ;Change this hotkey to what you want
Clip:=Get_Clipboard_Data() ;Call the function and return the HTML data in an object
MsgBox % clip.1.HREF
Clipboard:=CB ;restore Clipboard

;********************Grab data from Clipboard***********************************
wc := new WinClip
return URL
;~ https://autohotkey.com/board/topic/74670-class-winclip-direct-clipboard-manipulations/
#Include B:\Progs\AutoHotkey_L\AHK Work\WinClip\WinClipAPI.ahk
#Include B:\Progs\AutoHotkey_L\AHK Work\WinClip\WinClip.ahk

Automate Unicode character encoding for HTML

Unicode character encoding

Our CMS does not support Unicode text thus when we need to search-replace for characters like the and © symbols. This takes a fair amount of time and is easy to miss so I wrote a script in AutoHotKey to automatically handle the Unicode character encoding.

Now I can highlight the word and click a button and  Whamo!  Instant replacement with HTML equivalents!  No more trying to scan text and find illegal characters.

Unicode character encoding

Here is the AutoHotKey code I use.  My code first grabs the highlighted text and copies it to the clipboard, where it manipulates it, then sends it back to the active program I was working in. No more need for Unicode character encoding!

Web Scraping with AutoHotKey 106- Web Scraping multiple pages

Web Scraping multiple pages

 Web Scraping multiple pages

Example of how to Web Scraping multiple pages with some simple URL manipulation.  This is where being able to make sure you’ve loaded a page fully, scrape it, then navigate to the next is critical.  Looking for patterns in the URL will help you understand how you’ll be able to navigate to the next page.

A copy of the AutoHotKey syntax writer can be found here.  Remember patience is a virtue and Happy Scraping!

How to Web Scrape with AutoHotkey: Setting values and clicking links in IE

Setting values and clicking links in IE

Setting values and clicking links in IEThis is the second video in this series.  Here we practice setting values and clicking links in IE on a page (kind of reverse of Web Scraping with AutoHotkey however I don’t believe anybody has coined a decent term yet) and clicking links.

Word of warning- some pages want you to fire an “event”.  Sometimes this is tricky.  Given this video is set to an introductory level I only touch a little on the subject.

Web Scraping with AutoHotKey 102-Setting values and clicking links in IE

Setting values and clicking links in IE

The syntax for writing the writing the code can be found on my first post here.  There is also an AutoHotKey forum thread you might wish to review hereSetting values and clicking links in IE is pretty straight forward

Web scraping

 (web harvesting or web data extraction) is a computer software technique of extracting information from websites. Usually, such software programs