In my new AutoHotkey reference script (currently a work in progress), I access the online AutoHotkey documentation by directly downloading a Web page, extracting data with a RegEx, and displaying it in an informational MsgBox window. Why reinvent the wheel when you can use data readily accessible on the Internet? I recently offered an example of a database-driven AutoHotkey script, “ Write Less Code with Database Driven Apps (AutoHotkey Script Design).” This work great for relatively small applications with unique data, but building a database which might compete with the amount of information available on the Web presents an enormous challenge. See “ Waiting for Web Data to Download (AutoHotkey Quick Tip).” Use the Web as Your Database PAGE) at the top of the menu.ĪpUpdate: I made some changes to the script which makes it more reliable.To pay homage and give credit to the site while offering the opportunity for further digging, the first Web page loads in your default browser when you click the bold keyword (e.g. ![]() While SynonymLookup.ahk often displays over 100 alternatives, some words generate two or three Web pages on. The script does not differentiate between various definitions and only extracts equivalents from the first Web page. Note: To be fair, even when listing numerous possible synonyms, the script does not include all the opportunities for literary exploration found at. I love this one! It’s better than ever!įind the changes here: “ The SynonymLookup.ahk Web Data-Driven App Fails (AutoHotkey Adjustments)“ You’ll need to download the current script if you use a version older than this date. Plus, you might also get antonyms, so I marked them with a caution icon ( ). ![]() I now use the links in the page source code-which needed some adjustments, so you may occasionally see a strange character. Then, I’ll fix it.ĭid your SynonymLookup.ahk app stop working? changed their page formatting causing the script to fail, so I changed the Regular Expression in the latest version. (I would simply switch to another site offering synonyms.) In any case, I plan to continue using this AutoHotkey script until it stops working-for whatever reason. They could block my IP, but that would be a lot of work for just one person. They might make an attempt to block my efforts, but I guess any such blocking technique would also block regular users. They could change the formatting of the page, but then I would adjust the Regular Expression I use to extract the data. Any revenue they derive comes from the advertising. If ever notices, I suppose this script may not make the owners of the site very happy. For writers and editors (or anyone who wants to expand their vocabulary), this one script provides enough incentive to plunge into regularly employing the free AutoHotkey Windows utility language. The script extracts the menu items directly from a Web page without opening my Web browser or processing any of the code-no ads. ![]() The apps beauty lies in the fact that I can utilize the Web for the database of synonyms. Click on one of the entries and it instantly replaces the previously highlighted word. ![]() It immediately provides me access to a list of alternative words in menu form (shown at right). I immediately added this short AutoHotkey script to my primary toolbox. In the example, the menu lists possible replacements for the word Click on any item and AutoHotkey replaces the selected word in any document or field open for text editing. AutoHotkey downloads the code from the target Web page and parses the synonyms using RegEx-placing each in a pop-up menu. How to Use the Web to Feed Data to Your AutoHotkey Application-A Pop-up Menu to Replace Boring Words in Your Documents I highlight any word and hit the CTRL+L Hotkey combination.
0 Comments
Leave a Reply. |