Jump to content

Escape quotes in /AutoIt3ExecuteScript arguments

Recommended Posts


I am to send run a .au script from C#

I'm doing it that way:

System.Diagnostics.Process myProcess = new System.Diagnostics.Process();
myProcess.StartInfo.FileName = "AutoIt3.exe";
myProcess.StartInfo.Arguments = "/AutoIt3ExecuteScript " + ("\"" + scriptPath + "\" ") + ("\"" + argument + "\" ") ;

The argument will most often contains a path (to another application) and very often an argument for that other application.
In C#, a quote is escaped by using a double quote. The problem is this one:

argument="-fullscreen ""F:\thirdapplication.exe"""

...will land in AutoIt like

-fullscreen "thirdapplication.exe"

...which is perfect!

At the contrary,


so, only a path, no parameters is seen by AutoIt as (check the missing opening quote)



So, if the argument begins with a quote, the opening quote is not interpreted (hope that I'm clear with all that ;))
What am I missing? Could you please help!?

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...