Clipboard manipulation as a quantity Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Guill
Posts: 139
Joined: 09 Jun 2016, 22:00

Clipboard manipulation as a quantity

02 Apr 2019, 08:32

Hi guys,
I need to add a quantity to the number taken in the clipboard and that the sum remains of the new value .
Example:

Code: Select all

Clipboard =
Send ^ x; cut a value from a given cell
Clipboard: =% Clipboard% + 8; add 8 to that value

Send ^ v; Paste the new value


What should I modify?
Is it better to do it in another way?
User avatar
sinkfaze
Posts: 616
Joined: 01 Oct 2013, 08:01

Re: Clipboard manipulation as a quantity  Topic is solved

02 Apr 2019, 08:38

Code: Select all

Clipboard =
Send ^ x	; cut a value from a given cell
Clipboard +=	8	; add 8 to that value
Send ^ v	; Paste the new value
gregster
Posts: 9113
Joined: 30 Sep 2013, 06:48

Re: Clipboard manipulation as a quantity

02 Apr 2019, 08:45

You have some weird syntax issues in your script, escpecially missing spaces where they are needed (in front of the ; of inline comments) and surplus spaces where they will create problems (like between ^ and x or : and =)

Code: Select all

w::		; hit w when number selected
Clipboard :=
Send ^x		; cut a value from a given cell
Clipboard := Clipboard + 8	; add 8 to that value	
Send ^v	; Paste the new value
return
In general you should use expression syntax.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: madensuyu1, peter_ahk and 360 guests