ComputorEdge AutoHotkey Scripts and Useful Utility Downloads
Re: ComputorEdge AutoHotkey Scripts and Useful Utility Downloads
Nice, Jack,,, my admiration.
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
Update for Ryan's RegEx Tester
Ryan's RegEx Tester sits near the top of my list of favorite AutoHotkey scripts. That's why I added it to this list of AutoHotkey scripts.
toralf has posted an updated version of RegEx Tester in this forum. I've added the link to the ComputorEdge AutoHotkey Scripts page.
toralf has posted an updated version of RegEx Tester in this forum. I've added the link to the ComputorEdge AutoHotkey Scripts page.
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
-
- Posts: 31
- Joined: 07 Apr 2020, 11:53
Re: ComputorEdge AutoHotkey Scripts and Useful Utility Downloads
Thanks. I appreciate your work as well as the compilation of scripts for the community. I just started using QuickLinks.
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
Measuring Distances on Your Computer Screen—MouseMeasure Onscreen Ruler
I've added a new sample script for measuring distances on your computer screen: MouseMeasure.ahk.
The MouseMeasure.ahk script uses the mouse to calculate a calibrated distance between two points on the computer monitor.
To Calibrate Range:
To Measure Distance:
The MouseMeasure.ahk script uses the mouse to calculate a calibrated distance between two points on the computer monitor.
To Calibrate Range:
- Locate mouse cursor at start point — CTRL+LButton and hold.
- Drag mouse to end of scale and release the left mouse button.
- Enter length of scale and units (i.e.15 Miles).
To Measure Distance:
- Locate mouse cursor at start point — SHIFT+LButton and hold.
- Drag mouse to end of measurement and release the left mouse button.
- Distance displayed in tooltip and saved to Clipboard for paste operation.
Last edited by jackdunning on 24 Nov 2020, 08:11, edited 1 time in total.
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
On Screen Ruler Using GDIPlus Graphics
I've updated the MouseMeasure.ahk script to use GDIPlus Graphics. The graphics are much smoother. I discuss the GDIPlus functions (Hellbent's version) in "How to Draw Lines with AutoHotkey Using Windows GDIPlus Graphics"
To calibrate the app range:
1. Set mouse cursor at start point — CTRL+LButton and release.
2. Move mouse cursor to end of a known scale.
3. Press the Alt key.
4. Enter length of scale and units (i.e. 10 miles), then Submit.
Manual Calibration: CTRL+ALT+Z
To Measure Distance:
1. Set mouse cursor at start point — CTRL+LButton and release.
2. Draw line over target distance.
3. Press the Shift key.
4. Distance displayed and saved to Clipboard.
Use cursor keys to move mouse cursor single pixel increments.
To clear measurement line and ToolTip, press Delete.
Ctrl+Escape to Exit App.
CTRL+ALT+F12 for this Help Message.
To calibrate the app range:
1. Set mouse cursor at start point — CTRL+LButton and release.
2. Move mouse cursor to end of a known scale.
3. Press the Alt key.
4. Enter length of scale and units (i.e. 10 miles), then Submit.
Manual Calibration: CTRL+ALT+Z
To Measure Distance:
1. Set mouse cursor at start point — CTRL+LButton and release.
2. Draw line over target distance.
3. Press the Shift key.
4. Distance displayed and saved to Clipboard.
Use cursor keys to move mouse cursor single pixel increments.
To clear measurement line and ToolTip, press Delete.
Ctrl+Escape to Exit App.
CTRL+ALT+F12 for this Help Message.
Last edited by jackdunning on 24 Nov 2020, 08:13, edited 2 times in total.
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
Multi-Leg On-Screen Measurements
I've added a multi-leg capability to MouseMeasureMultiLine.ahk for capturing distances around the corner. Plus, insert calcualted leg distances in any document or edit field using temporary Hotkeys.
For more information, see the blogs:
"Measure Multiple Line Segments with an AutoHotkey On-Screen Ruler"
"Track Graphic Line Measurement Segments Using AutoHotkey Arrays"
"Sending Multiple Saved Data Items to Documents and Forms in AutoHotkey (Temporary Hotkeys)"
For more information, see the blogs:
"Measure Multiple Line Segments with an AutoHotkey On-Screen Ruler"
"Track Graphic Line Measurement Segments Using AutoHotkey Arrays"
"Sending Multiple Saved Data Items to Documents and Forms in AutoHotkey (Temporary Hotkeys)"
Last edited by jackdunning on 24 Nov 2020, 08:15, edited 1 time in total.
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
Temporary Single-key Hotkeys for Multipaste.ahk Script
I changed the MultiPaste.ahk script by adding single-digit Hotkeys only active when the MsgBox opens. Each key inserts the individual text parsed from a selected section.
Hotkeys deactivate upon closing the window.
Discussed in the blog, "Sending Multiple Saved Data Items to Documents and Forms in AutoHotkey (Temporary Hotkeys)."
Hotkeys deactivate upon closing the window.
Discussed in the blog, "Sending Multiple Saved Data Items to Documents and Forms in AutoHotkey (Temporary Hotkeys)."
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
Control for Shortcuts in Startup Folder
I think you'll find other such scripts but this one, AutoStartupControl.ahk, offers a barebones menu System Tray right-click menu listing shortcuts located in the Windows Startup folder.
I discuss the steps involved in writing the script in:
Auto-Loading AutoHotkey Scripts Booting Windows December 14, 2020
When Collecting File Information from Windows Folders Using AutoHotkey December 21, 2020
Adding Startup Folder Shortcuts to a System Tray Menu (AutoHotkey Startup Control) December 28, 2020
Add Submenus to the Auto-Startup Menu to Increase Options (AutoHotkey Startup Control) January 4, 2021
Peeking at Notes Inside Auto-Startup AHK Script Files (AutoHotkey Startup Control) January 11, 2021
I discuss the steps involved in writing the script in:
Auto-Loading AutoHotkey Scripts Booting Windows December 14, 2020
When Collecting File Information from Windows Folders Using AutoHotkey December 21, 2020
Adding Startup Folder Shortcuts to a System Tray Menu (AutoHotkey Startup Control) December 28, 2020
Add Submenus to the Auto-Startup Menu to Increase Options (AutoHotkey Startup Control) January 4, 2021
Peeking at Notes Inside Auto-Startup AHK Script Files (AutoHotkey Startup Control) January 11, 2021
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
Instant Years, Months, Days Calculation for Selected Text
Added a modified version of the HowLongYearsMonthsDays.ahk script for instant timespan calculation: HowLongInstant.ahk. It works by selecting a section of text which includes the start and stop date as the first and last date in the selection.
The Hotkey combination CTRL+ALT+WIN+h activates the parsing, reformatting, and calculating.
The script consists of five parts:
Note: Uses the Switch command in the MonthConvert() function to evaluate non-English month names.
The Hotkey combination CTRL+ALT+WIN+h activates the parsing, reformatting, and calculating.
The script consists of five parts:
- The Standard Clipboard Routine to capture selected text.
- A two-date RegEx for identifying and capturing the target dates.
- The DateConvert() function from the DateStampConvert.ahk script formats the parsed dates as a standard TimeDate stamp (YYYYMMDD).
- The HowLong() function found in the HowLongYearsMonthsDays.ahk script calculates the timespan by running using the two TimeDate stamps as parameters.
- Instantly displays the results in a MsgBox.
Note: Uses the Switch command in the MonthConvert() function to evaluate non-English month names.
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
Re: Multi-Leg On-Screen Measurements
@jack dunning Thank you for MouseMeasureMultiLine.ahk . Nice to have on map sites with no built in distance measurement tools. One quibble is that only 20 lines can be added because adding a 21th line triggers "Error: Max window number is 20". Caused by a limit to show at most 20 ToolTips at once I presume, https://www.autohotkey.com/docs/commands/ToolTip.htm
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
MouseMeasureMultiLine.ahk Limitations
@neogna2 says "Caused by a limit to show at most 20 ToolTips at once"
Yes, I note the 20 ToolTip limitation in my blog "Track Graphic Line Measurement Segments Using AutoHotkey Arrays." If you need more line segments than that you may need to remove (or disable after 20) the ToolTip feature.
Another limitation: Only 9 temporary Hotkeys active (1-9) for the first 9 segments for inserting data into documents. This can be remedied by adding letters to the list of temporary Hotkeys. See "Sending Multiple Saved Data Items to Documents and Forms in AutoHotkey (Temporary Hotkeys)."
Yes, I note the 20 ToolTip limitation in my blog "Track Graphic Line Measurement Segments Using AutoHotkey Arrays." If you need more line segments than that you may need to remove (or disable after 20) the ToolTip feature.
Another limitation: Only 9 temporary Hotkeys active (1-9) for the first 9 segments for inserting data into documents. This can be remedied by adding letters to the list of temporary Hotkeys. See "Sending Multiple Saved Data Items to Documents and Forms in AutoHotkey (Temporary Hotkeys)."
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
Re: MouseMeasureMultiLine.ahk Limitations
Ok, a known issue then.
I noticed that if you click to add a leg while moving the mouse there is sometimes a gap between the red lines of the distance segments. Especially if the mouse is moved quickly. Looks like we can fix that with a line that updates the mouse screen positions for ex and ey variables immediately after Lbutton, instead of waiting 1-50ms for next timer call to DrawStuff label.
Code: Select all
#If (active_Draw=1)
LButton::
MouseGetPos,ex,ey ; update position for DrawStuff immediately
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
Date Calculation Adding (or Subtracting) Years, Months, and/or Days
DateCalc.ahk function for calculating the calendar date when adding (or subtracking) years, months, and/or days.
This DateCalc(StartDate,Years,Months,Days) function calculates a new date from any StartDate by providing Years, Months, and/or Days (+ or -) as parameters. See "Calculating Dates in AutoHotkey by Adding Years, Months, and/or Days."
The function uses the AutoHotkey Floor() and Mod() functions to account for calculating months and years by doing old-fashion division arithmetic with remainders. See "Fake Math Tricks Using the Floor() and Mod() Functions."
Code: Select all
StartDate := "20200913"
Years := 2
Months := 8
Days := 21
NewDate := DateCalc(StartDate,Years,Months,Days)
FormatTime, Start , %StartDate%, LongDate
FormatTime, New , %NewDate%, LongDate
MsgBox,, DateCalc, % Start "`r`rAdd:`r`tYears " Years "`r`tMonths " Months "`r`tDays " Days "`r`r" New
DateCalc(Date := "",Years := 0,Months := 0,Days := 0)
{
If (Date = "")
Date := A_Now
Months := SubStr(Date,5,2)+Months
CalcYears := Floor(Months/12) + Years
CalcMonths := Mod(Months,12)
If (CalcMonths <= 0)
{
CalcYears := CalcMonths = 0 ? CalcYears-1 : CalcYears
CalcMonths := CalcMonths + 12
}
NewDate := Substr(Date,1,4)+CalcYears . Format("{:02}", CalcMonths) . Substr(Date,7,2)
NewDate += Days , Days
Return NewDate
}
The function uses the AutoHotkey Floor() and Mod() functions to account for calculating months and years by doing old-fashion division arithmetic with remainders. See "Fake Math Tricks Using the Floor() and Mod() Functions."
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
- jackdunning
- Posts: 126
- Joined: 01 Aug 2016, 18:17
- Contact:
Inserting Folder and Filenames from Windows to AutoHotkey Menus
Added FilesMenuLoad.ahk for inserting Windows File Explorer structures into a pop-up menu.
This barebones script loads the file structure into an AutoHotkey menu (including all subdirectories as submenus). Set TopMenu to the starting folder.
Any file selected from the menu runs with its default program.
See "Adding Folders and Files from Windows to AutoHotkey Menus."
This barebones script loads the file structure into an AutoHotkey menu (including all subdirectories as submenus). Set TopMenu to the starting folder.
Any file selected from the menu runs with its default program.
See "Adding Folders and Files from Windows to AutoHotkey Menus."
Code: Select all
TopMenu := "C:\Users\" A_UserName "\QuickLinks", LastMenu := "C:\Users\" A_UserName "\QuickLinks"
Loop Files, C:\Users\%A_UserName%\QuickLinks\*.*, DFR ; Recurse into subfolders.
{
; Skip any file that is H or S (System).
If InStr(A_LoopFileAttrib, "H") or InStr(A_LoopFileAttrib, "S")
Continue
; Add to Menu
Menu, %A_LoopFileDir%, Add, %A_LoopFileName% , Action
If (A_LoopFileDir != LastMenu) and (LastMenu != TopMenu)
AddMenu(LastMenu)
; Save menu name
LastMenu := A_LoopFileDir
}
AddMenu(LastMenu)
Menu, %TopMenu%, Show
Return
Action:
Run, % A_ThisMenu . "\" . A_ThisMenuItem
Return
AddMenu(MenuName)
{
SplitPath, MenuName , DirName, OutDir, OutExtension, OutNameNoExt, OutDrive
Menu, %OutDir%, Add, %DirName%, :%MenuName%
}
; ^!#m::Menu, %TopMenu%, Show
Jack Dunning
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
I have a passion for helping new users grow maniacal about AutoHotkey Windows scripting.
Jack's AutoHotkey Blog
Free AutoHotkey Scripts and Apps for Learning Script Writing and Generating Ideas
AutoHotkey Books
AutoHotkey Library Bundles
Jack's Motley Assortment of AutoHotkey Tips
Re: ComputorEdge AutoHotkey Scripts and Useful Utility Downloads
Hey Jack,
Do you cover associative arrays in any of your books? I've been trying to learn how to work with them, but I can't seem to wrap my thick head around them. All those for, if, dot.()s just confuse the heck out of me. LOL.
Do you cover associative arrays in any of your books? I've been trying to learn how to work with them, but I can't seem to wrap my thick head around them. All those for, if, dot.()s just confuse the heck out of me. LOL.
ste(phen|ve) kunkel
Re: ComputorEdge AutoHotkey Scripts and Useful Utility Downloads
cool!
Thank you for sharing!
Thank you for sharing!