Wrapping a variable's output in quotes Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Lem2001
Posts: 127
Joined: 27 Jun 2017, 17:59

Wrapping a variable's output in quotes

Post by Lem2001 » 21 Nov 2023, 22:33

I have the following code:

Run, %pPath% -profile %profilePath% -new-tab "about:config"

I need to wrap the two variables (i.e. pPath and profilePath) in quotes without breaking the variables and turning them into literal strings.

How can I do this? I've tried countless different ways but I couldn't get any of them to them work.

User avatar
JoeWinograd
Posts: 2214
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Wrapping a variable's output in quotes  Topic is solved

Post by JoeWinograd » 21 Nov 2023, 23:21

Lem2001 wrote:I've tried countless different ways
You'll kick yourself when you see this way :)

Run, "%pPath%" -profile "%profilePath%" -new-tab "about:config"

Regards, Joe

Lem2001
Posts: 127
Joined: 27 Jun 2017, 17:59

Re: Wrapping a variable's output in quotes

Post by Lem2001 » 22 Nov 2023, 00:43

JoeWinograd wrote:
21 Nov 2023, 23:21
You'll kick yourself when you see this way ...
The kicking of self is underway even as we speak!     :headwall:

I could have sworn that this was the very first thing I tried (it's the most intuitive and it's how I naturally assumed that it would work).

However, for some reason the code that I used ended up displaying the name of the variable rather than expanding it to show the value. I then went down a rabbit hole of trying to find workarounds (which unsurprisingly failed dismally, as I had no idea what I was doing).

I'm relieved to see that it's such a simple solution.

Thanks for your help.

User avatar
JoeWinograd
Posts: 2214
Joined: 10 Feb 2014, 20:00
Location: U.S. Central Time Zone

Re: Wrapping a variable's output in quotes

Post by JoeWinograd » 22 Nov 2023, 12:26

Lem2001 wrote:it's the most intuitive and it's how I naturally assumed that it would work
Exactly! Probably a simple typo on your first try that you led you astray and down that deep rabbit hole. Welcome back to the surface. :) Cheers, Joe

Post Reply

Return to “Ask for Help (v1)”