Variable inslide clipboard paste

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DarkKitten
Posts: 42
Joined: 10 Mar 2016, 00:20

Variable inslide clipboard paste

Post by DarkKitten » 15 May 2022, 15:24

Trying to insert a variable into my clipboard pastes but can't quite figure it out, anyone know how to fix this? Wanting the name that I input into the input box to be inserted into what is pasted.

Code: Select all


^F12::
InputBox, NameZ, Enter Name
Return

;1
^!Numpad1::
Sleep 20
Clipboard := "/Hello my name is %NameZ%, I'm here to help."
Sleep 20
Send ^v
Return

;2
^!Numpad2::
Sleep 20
Clipboard := "/Hello my name is %NameZ%, How are you today?"
Sleep 20
Send ^v
Return


User avatar
mikeyww
Posts: 26945
Joined: 09 Sep 2014, 18:38

Re: Variable inslide clipboard paste

Post by mikeyww » 15 May 2022, 15:40

Code: Select all

Clipboard := "/Hello my name is " NameZ ", I'm here to help."
Explained: Expressions

Post Reply

Return to “Ask for Help (v1)”