Variables

Get help with using AutoHotkey and its commands and hotkeys
fedek
Posts: 60
Joined: 17 May 2016, 12:17
Facebook: nope
Google: nope
GitHub: nope

Variables

11 Feb 2017, 09:49

StringReplace, appdata2, A_AppData, Roaming, Local
folder := \Chrome\profr.ini
Folder:="%appdata2%\Google\%folder%"
The leftmost character above is illegal in an expression.
Thats just an example. The idea is that i have two variables with \ and how to make a one folder frome two ofther (%appdata2%; %folder%) and text part (\Google\).
Hope its real.
guest3456
Posts: 3085
Joined: 09 Oct 2013, 10:31

Re: Variables

11 Feb 2017, 09:59

fedek wrote:

Code: Select all

StringReplace, appdata2, A_AppData, Roaming, Local
folder := \Chrome\profr.ini
Folder:="%appdata2%\Google\%folder%"
The leftmost character above is illegal in an expression.
Thats just an example. The idea is that i have two variables with \ and how to make a one folder frome two ofther (%appdata2%; %folder%) and text part (\Google\).
Hope its real.
yes its possible and quite easy
read here:
https://autohotkey.com/docs/Variables.htm

Gicu
Posts: 111
Joined: 19 Aug 2014, 08:19
Location: Italy

Re: Variables

11 Feb 2017, 10:01

Code: Select all

variable := variable1 "\Text\" variable2
; or
variable = %variable1%\Text\%variable2%
fedek
Posts: 60
Joined: 17 May 2016, 12:17
Facebook: nope
Google: nope
GitHub: nope

Re: Variables

11 Feb 2017, 13:24

StringReplace, appdata2, A_AppData, Roaming, Local
Folder:=%appdata2%\Google\Chrome\User Data\Default\Web Data

StringReplace, appdata2, A_AppData, Roaming, Local
Folder:=appdata2"\Google\Chrome\User Data\Default\Web Data"

Both errors, guys. The leftmost character above is illegal in an expression
guest3456
Posts: 3085
Joined: 09 Oct 2013, 10:31

Re: Variables

11 Feb 2017, 13:39

you didn't read the page that I linked to.

fedek
Posts: 60
Joined: 17 May 2016, 12:17
Facebook: nope
Google: nope
GitHub: nope

Re: Variables

11 Feb 2017, 15:19

I did, i think that i got it, but i dont know english well. So, whats the decision?
Gicu
Posts: 111
Joined: 19 Aug 2014, 08:19
Location: Italy

Re: Variables

11 Feb 2017, 15:31

Code: Select all

variable := variable1 "\Text\" variable2
Folder := appdata2 "\Google\Chrome\User Data\Default\Web Data"
; or
variable = %variable1%\Text\%variable2%
Folder = %appdata2%\Google\Chrome\User Data\Default\Web Data
4GForce
Posts: 553
Joined: 25 Jan 2017, 03:18
GitHub: 4GForce

Re: Variables

11 Feb 2017, 15:32

Gicu wrote:

Code: Select all

variable := variable1 "\Text\" variable2
; or
variable = %variable1%\Text\%variable2%
Notice the spaces in the 1st example and notice the = sign in the second
This is equivalent to the first example he gave you ... also notice the spaces on each sides of the dots

Code: Select all

variable := variable1 . "\Text\" . variable2
fedek
Posts: 60
Joined: 17 May 2016, 12:17
Facebook: nope
Google: nope
GitHub: nope

Re: Variables

12 Feb 2017, 08:38

Tahks. My bad with spaces.

Return to “Ask For Help”

Who is online

Users browsing this forum: Bing [Bot], boiler, Google [Bot] and 182 guests