whiggs > 2020-05-15 11:50
![[Image: uJ967M7.png]](https://i.imgur.com/uJ967M7.png)
![[Image: aUkLoEk.png]](https://i.imgur.com/aUkLoEk.png)
![[Image: keiPiWR.png]](https://i.imgur.com/keiPiWR.png)
Jean Lalonde > 2020-05-15 13:57
Jean Lalonde > 2020-05-15 16:50
whiggs > 2020-05-15 17:07
(2020-05-15 16:50)Jean Lalonde Wrote: Hi whiggs,
I verified and the environment variables in the parameter field *are* expanded. The proof is that the error message your 3rd screen capture comes from your script sniploat.ahk (see the title bar). This means that the script has been launched. I could not tell why the %USERPROFILE% is not expanded within SnipFloat.ahk.
But I suggest a different approach to launch AHK scripts from QAP: enter the path to the script in the first tab "Basic Settings" and nothing in the parameters.
Jean
![[Image: thcc5YP.png]](https://i.imgur.com/thcc5YP.png)
![[Image: YagV8S3.png]](https://i.imgur.com/YagV8S3.png)
(2020-05-15 16:50)Jean Lalonde Wrote: Hi whiggs,
I verified and the environment variables in the parameter field *are* expanded. The proof is that the error message your 3rd screen capture comes from your script sniploat.ahk (see the title bar). This means that the script has been launched. I could not tell why the %USERPROFILE% is not expanded within SnipFloat.ahk.
But I suggest a different approach to launch AHK scripts from QAP: enter the path to the script in the first tab "Basic Settings" and nothing in the parameters.
Jean
![[Image: eW6VbFA.png]](https://i.imgur.com/eW6VbFA.png)
![[Image: j1DudjR.png]](https://i.imgur.com/j1DudjR.png)
![[Image: 9vkfBDB.png]](https://i.imgur.com/9vkfBDB.png)
![[Image: E4I55vd.png]](https://i.imgur.com/E4I55vd.png)
![[Image: 78tTMnM.png]](https://i.imgur.com/78tTMnM.png)
Jean Lalonde > 2020-05-15 18:01
whiggs > 2020-05-15 20:05
(2020-05-15 18:01)Jean Lalonde Wrote: I was wrong. QAP does *not* expand the environment variables and does not have to. When launching an app, QAP let Windows expand the variables in the parameters. I could not tell the cause of the error in your scenario involving AutoHotkey.exe but it normally works.
But have you tried this:
> But I suggest a different approach to launch AHK scripts from QAP: enter the path to the script in the first tab "Basic Settings" and nothing in the parameters.
The path would be simply: %USERPROFILE%\OneDrive\always script\snipfloat.ahk (no quotes).
Jean Lalonde > 2020-05-15 21:23