Not everyone learns in the same manner. Some of the best programmers I know taught themselves from scratch. They looked up the commands and figured out the rest themselves. They learn more advanced techniques by reviewing code written by other aficionados. While they do seek help for advanced topics, they don’t usually need beginning books or introductory courses. But, most people don’t fit into that category.
When Browsing the Web This Special Function Copies the Page URL without Any Extra Effort
Normally, you can find a Web page address in the URL bar at the top of the browser. Click in that address field and copy it with CTRL+C. That simple act may make the subject of this blog look redundant. However, when applied to last week’s CopyRegTagWin.ahk script, the GetActiveBrowserURL() function can save numerous keystrokes.
By using the user-defined GetActiveBrowserURL() function, a modified version of the CopyRefTagWin.ahk script can include both the title of the source window and, if from a Web page, its URL. If collecting data for research, this feature makes reconstructing sources much easier—without any extra effort. Continue reading →
When Collecting Information from Various Sources, Send the Text Directly to an Unseen Text Editing Field
Last time in “Tricks for Tracking and Activating Target Process Windows“, I demonstrated a technique for tagging and tracking a window using its Unique ID. After tagging any window with one Hotkey combination, you can instantly recall it with another. While a pretty cool trick, the question of when would you ever use it arises. This time I offer a practical tool for gathering information from various digital sources (Web pages, documents, e-books, etc.) into one text editor window—without jumping back-and-forth while doing cut-and-paste operations. Continue reading →
Save Time with This RegEx Hotstring for Inserting Repeated Words or Sentences—”Blah!” Instantly Turns Into “Blah! Blah! Blah!”
At the end of my last blog, I postulated the possibility of a word duplicating RegEx Hotstring. While I don’t know how many people would ever use it, I do remember a time when the technique would have come in handy (as shown in the cartoon on the left). I thought that I would leave the problem as a reader’s challenge and move on, but I found that I couldn’t just abandon the loose end.
With a Few Modifications, the WindowList.ahk Script Pops Up a Menu of Open Windows for Quick Activation—Plus, How to Detect When a Windows Opens or Closes
I originally used the WindowList.ahk script as a demonstration of how to use the GUI DropDownList control as a list ofselection options for activating open windows (included in the Digging Deeper Into AutoHotkey book). Once, while testing someone’s script, it proved very useful. I could not find the GUI window generated by the code. The script had placed the target window somewhere off the screen. The scriptwriter originally used a second monitor—which I didn’t have. The WindowList.ahk script moved the window back into my view.
As I reviewed the script, I realized that building a pop-up menu of open windows could serve a purpose similar to the QuickLinks.ahk script—except, rather than launching apps and Web sites, the menu would activate open windows. Now, that’s something that I can use!
I often keep numerous windows open simultaneously. Generally, I locate a window by hovering over the Windows Taskbar then selecting the image which looks right. It takes a second for the thumbnails to appear, then hovering over each helps me make my selection. But what if I could maintain a menu of all open Windows available in a menu for instant activation? Continue reading →
This Technique Accesses Icons Embedded in Windows Folders for Inserting into Pop-up Menus—Plus, the New Combined Switch/Case Statement QuickLinks QL_GetIcon() Function
I completely rewrote the functions from the last blog for adding icons to the menus in the QuickLinks.ahk script combining the two into a shorter prioritized list using Switch/Case statements. In the process—after investigating how to read icons embedded in Windows folder/directory listings—I discovered an interesting Windows secret. It turns out that this procedure requires a totally different Windows maneuver than that used for reading Windows Shortcut file icons.
The Windows Desktop.ini File
When you embed an icon into a Windows folder (right-click on the folder name in Windows File Explorer, select Properties and the Customize tap, then click Change Icon… and browse for icons), rather than saving the icon path and icon number in the folder itself—as Windows does for shortcut files—it creates a special hidden file named desktop.ini in that same folder. With Windows set to Show Hidden Files, folder and drives in the View tab of the Folder Options window, you can view the hidden desktop.ini file in that folder. (Tip: You can use Ryan’s UnHideFiles.ahk script to hide and unhide files and folders.) Continue reading →
Rather than Creating New Hotkeys and Isolating Them Using the #IfWinActive Directive, Simply Add Keyboard Accelerators Using a GUI Menu Bar
Note: This week’s keyboard accelerator tip is not the same technique as adding an ampersand before any letter in a menu item—although that trick still works. The beauty of this technique lies in the fact that you can embed and execute a multitude of active window Hotkey-like actions in a menu bar without ever opening the menu itself.
While working on my latest to-do list script (ToDoListINI.ahk), I realized that I wanted to add a couple more options to the app, but I didn’t like the idea of inserting more buttons into the GUI. I naturally turned to a menu bar at the top of the GUI which could include many more actions while taking up minimal area. After a quick glance at the Gui, Menu command, I realized that I had routinely overlooked one of the most important aspects of Gui menu bars: accelerator keyboard combinations. Continue reading →