Search found 59 matches

by jackdunning
Yesterday, 17:24
Forum: Ask For Help
Topic: Creating a toggle for arrow keys Topic is solved
Replies: 4
Views: 187

Re: Creating a toggle for arrow keys Topic is solved

It's important to remember the standard double-colon :: formatting for Hotkeys and Hotstrings only load during the initial stage of processing. Regular commands which run after the script loads do not see or use them. As boiler wrote, you must use the Hotkey command to make changes to Hotkeys. While...
by jackdunning
Yesterday, 00:56
Forum: Scripts and Functions
Topic: MultiPaste for Parsing Clipboard Paste Operations
Replies: 2
Views: 175

Re: MultiPaste for Parsing Clipboard Paste Operations

small nitpick: instead of all the: clipboard:=replace(clipboard, ...) lines 1) save the clipboard to a variable 2) then work on that variable 3) then when you work is done, set that variable to the clipboard. ... infact you don't even need step 3. just pass it to Transaction := StrSplit(newVar, ......
by jackdunning
21 Sep 2019, 14:49
Forum: Ask For Help
Topic: #IfWinActive ahk_class
Replies: 1
Views: 123

Re: #IfWinActive ahk_class

#IfWinActive (with the # sign) is not a command but a directive. This directive only affects Hotkeys and Hotstrings located between directives. Try the IfWinActive command or the preferred If WinActive() function command without the # sign. For more information about the differences between commands...
by jackdunning
21 Sep 2019, 14:39
Forum: Tips and Tricks
Topic: Automatic Scroll Wheel Speaker Volume Control When Hovering Over the Taskbar
Replies: 0
Views: 64

Automatic Scroll Wheel Speaker Volume Control When Hovering Over the Taskbar

This short tip comes directly from the AutoHotkey documentation for the #If directive . I republish it here for those who haven't had a chance to read all the online documentation. Plus, a while back I added it to my main AutoHotkey script and now use my mouse scroll wheel hovering over the Windows ...
by jackdunning
20 Sep 2019, 18:13
Forum: Ask For Help
Topic: #IfWinActive with %var% in name
Replies: 9
Views: 255

Re: #IfWinActive with %var% in name

boiler wrote:
20 Sep 2019, 15:11
You don't have to use a separate variable. Just use expression syntax correctly in the function call parameter:

Code: Select all

#If WinActive(A_ScriptName . " - Visual Studio Code")
While true, using a separate variable offers greater flexibility if you want to completely change the active window name.
by jackdunning
20 Sep 2019, 14:40
Forum: AutoGUI
Topic: Can't start AutoGUI
Replies: 3
Views: 831

Re: Can't start AutoGUI

The v2 in my scripts stands for the coming AutoHotkey Version 2.0 which is in alpha testing. The v2 scripts only run with AutoHotkey 2.0 (currently under development). AutoHotkey version 1.X and 2.x are not compatible. The v1 scripts run with the current version 1.1 of AutoHotkey.
by jackdunning
20 Sep 2019, 14:28
Forum: Scripts and Functions
Topic: MultiPaste for Parsing Clipboard Paste Operations
Replies: 2
Views: 175

MultiPaste for Parsing Clipboard Paste Operations

I know that many Clipboard-like scripts exist (and possibly one just like this), but I wrote MultiPaste.ahk to address the problem caused when copying a block of data which must go into discrete data fields. The MultiPaste.ahk script discussion starts with the blog " Brute Force Data-Set Copy-and-Pa...
by jackdunning
20 Sep 2019, 13:59
Forum: Ask For Help
Topic: #IfWinActive with %var% in name
Replies: 9
Views: 255

Re: #IfWinActive with %var% in name

AutoHotkey functions do not support the macro substitution %var%.

In place of:

Code: Select all

#If WinActive("%A_ScriptName% - Visual Studio Code")
Use:

Code: Select all

#If WinActive(ScriptName)
Then set the value of the variable ScriptName in your action code:

Code: Select all

ScriptName := A_ScriptName . " - Visual Studio Code"
by jackdunning
19 Sep 2019, 15:21
Forum: Tips and Tricks
Topic: Add Single-Letter Shortcuts to Your AutoHotkey Menus, Plus AutoCorrect Menus
Replies: 3
Views: 144

Re: Add Single-Letter Shortcuts to Your AutoHotkey Menus, Plus AutoCorrect Menus

I should note that you can replace the three-line action Hotstring with one line by using the relatively new X option:

Code: Select all

:x:agin::TextMenu("again,a gin,aging")
by jackdunning
19 Sep 2019, 13:59
Forum: Scripts and Functions
Topic: Instantly Create and Save Hotstrings with the Hotstring() Function
Replies: 1
Views: 149

Instantly Create and Save Hotstrings with the Hotstring() Function

Create and Test Hotstrings On-the-Fly—then, Save Them for Later Use When the new Hotstring() function was added to AutoHotkey, I decided to explore its features and capabilities. Over the course of a couple of months, I developed the InstantHotstring.ahk script documenting it along the way in my bl...
by jackdunning
19 Sep 2019, 11:39
Forum: General Discussion
Topic: minimalist popup menu?
Replies: 3
Views: 259

Re: minimalist popup menu?

I wrote a script I call QuickLinks (click link for description and source code) which uses the shortcuts listed in a special folder to launch programs and Web sites. http://www.computoredge.com/AutoHotkey/MenuIcons.png I discuss how it works and how to set it up in my book Digging Deeper Into AutoHo...
by jackdunning
19 Sep 2019, 11:08
Forum: Tips and Tricks
Topic: Add Single-Letter Shortcuts to Your AutoHotkey Menus, Plus AutoCorrect Menus
Replies: 3
Views: 144

Re: Add Single-Letter Shortcuts to Your AutoHotkey Menus, Plus AutoCorrect Menus

burque505 wrote:
19 Sep 2019, 10:19
Nice, Jack.

Just a heads up - the smart quotes are breaking the script as posted.

Code: Select all

  TextMenu(“again,a gin,aging”)
needs to be

Code: Select all

  TextMenu("again,a gin,aging")
.
Regards,
burque505
Thanks, corrected.
by jackdunning
19 Sep 2019, 08:33
Forum: Tips and Tricks
Topic: Add Single-Letter Shortcuts to Your AutoHotkey Menus, Plus AutoCorrect Menus
Replies: 3
Views: 144

Add Single-Letter Shortcuts to Your AutoHotkey Menus, Plus AutoCorrect Menus

Sometimes It’s Just Easier to Use the Keyboard Rather Than Your Mouse If a menu pops up while typing, you must deal with that menu before continuing. This can get pretty annoying if your script uses a number of pop-up menus. For example, Chapter Eight, “Make Your Own Text AutoCorrect Hotstring Pop-...
by jackdunning
22 Nov 2018, 05:48
Forum: Ask For Help
Topic: Threads - AHK
Replies: 2
Views: 263

Re: Threads - AHK

by jackdunning
21 Nov 2018, 16:22
Forum: Ask For Help
Topic: Is it possible to select gui buttons with keyboard numbers?
Replies: 4
Views: 440

Re: Is it possible to select gui buttons with keyboard numbers?

You may find using the ControlClick command a little simpler: Gui, Add, Button, , Test Button One Gui, Add, Button, ym , Test Button Two Gui, Add, Button, ym , Test Button Three Gui, Add, Button, ym , Test Button Four Gui, Show, , Test Buttons Return ButtonTestButtonOne: ButtonTestButtonTwo: ButtonT...
by jackdunning
21 Nov 2018, 15:05
Forum: Ask For Help
Topic: Activate taskbar / Force re-focus of current application
Replies: 2
Views: 476

Re: Activate taskbar / Force re-focus of current application

What if you use the Click command to activate the Taskbar? Then, use SendInput, !{Esc} to return to the last window. I discuss the second part toward the end of this blog, "Activating the Last Window from the System Tray Icon Menu"
by jackdunning
21 Nov 2018, 14:36
Forum: Ask For Help
Topic: Is it possible to select gui buttons with keyboard numbers?
Replies: 4
Views: 440

Re: Is it possible to select gui buttons with keyboard numbers?

You might use the #IfWinActive directive to isolate conditional Hotkeys to the active GUI or use the Gui, Add, Button,, &Pause format where Alt+p activates the button. Add numbers to the buttons with a preceding ampersand (&) to activate the Alt+key action.
by jackdunning
21 Nov 2018, 14:22
Forum: Ask For Help
Topic: Remove empty elements from pseudoarray?
Replies: 5
Views: 564

Re: Remove empty elements from pseudoarray?

I could be wrong, but it seems that all the Sleep commands could be causing your script to slow down much more than the StrSplit() function. I don't see empty array elements alone slowing things down very much. However, you could also use the Continue command to skip empty array elements in the For-...
by jackdunning
21 Nov 2018, 02:38
Forum: Scripts and Functions
Topic: Function Calculating Timespan in Years, Months, and Days
Replies: 11
Views: 1975

Re: Function Calculating Timespan in Years, Months, and Days

For example, we all count Feb. 20 to March 20 to be one month. AlphaBravo, as you stated, from Jan 24, 2021 to Feb 24, 2021 is one month. Since we can now bank that full month, we can ignore the number of days in January. From Feb 24, 2021 to March 18, 2021 is 22 days. Also, my function does accoun...
by jackdunning
20 Nov 2018, 18:54
Forum: Scripts and Functions
Topic: Function Calculating Timespan in Years, Months, and Days
Replies: 11
Views: 1975

Re: Function Calculating Timespan in Years, Months, and Days

I've written a DateConvert() function for use in conjunction with this function.

Image

Go to advanced search