Error with V2 running a script

Get help with using AutoHotkey (v2 or newer) and its commands and hotkeys
User avatar
technochitlin
Posts: 10
Joined: 22 Jul 2016, 14:35

Error with V2 running a script

Post by technochitlin » 28 Jan 2023, 09:29

So far V2 has been pretty transparent to me, but one script I run at boot (Win10 machine) is throwing this error:
Image
I don't see what is wrong with the syntax. Can someone help or point me to where in the help files I can find the answer?

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

Re: Error with V2 running a script

Post by mikeyww » 28 Jan 2023, 09:36

Use an expression: quote your entire command line.

Code: Select all

#Requires AutoHotkey v2.0
Run A_ScriptDir '\test.cmd --xyz "123 456"',, 'Hide'
The documentation is your friend. Have a look to save yourself some time: https://www.autohotkey.com/docs/v2/lib/Run.htm#ExVerb

User avatar
technochitlin
Posts: 10
Joined: 22 Jul 2016, 14:35

Re: Error with V2 running a script

Post by technochitlin » 29 Jan 2023, 10:39

thanks!

Post Reply

Return to “Ask for Help (v2)”