Auto add numeric values to clipboard

Get help with using AutoHotkey and its commands and hotkeys
Posts: 1
Joined: 21 Feb 2018, 05:20

Auto add numeric values to clipboard

21 Feb 2018, 05:24

Is it possible for something like this to happen? Example:

I copy a number, 324.11

Upon pasting the number, it is 325.11, because 1 was automatically added.

Is there a way for this to work, and a way to select which number you want it to add?

Thank you
User avatar
Posts: 2372
Joined: 21 Dec 2014, 02:44

Re: Auto add numeric values to clipboard

21 Feb 2018, 07:18

This code starts with a default number of 1 to be added. Press F1 to enter a new number to be added. Whenever the clipboard changes and it contains a number, it will add the number to be added to it, ready to be pasted.

Code: Select all

global AddNum := 1

	if Clipboard is number
;		MsgBox, % Clipboard "`n" AddNum
		OnClipboardChange("AddToClip", 0)
		Clipboard := Format("{:g}", Clipboard + AddNum)

F1::InputBox, AddNum, Clipboard Add, Enter number to be added to the clipboard:,, 320, 144,,,,, %AddNum%

Return to “Ask For Help”

Who is online

Users browsing this forum: AnotherUser, Bing [Bot], lareous, newbieforever, PuzzledGreatly, swagfag, TLM, vvhitevvizard and 35 guests