Jump to content

Missing separator character


Recommended Posts

Hello,

I try to run in c++ this command line for autoit :

CreateProcess(0, "AutoIt3.exe /AutoIt3ExecuteLine \"MsgBox(0x0,''AutoIt'',''This is my script.'')\"", 0, 0, 0, 0, 0, 0, &si, &pi);

This code return : Missing separator character after keyword. It's a problem with the quotation marks but i don't know how to solve this error.

Thanks.

Link to comment
Share on other sites

I don't know what Create Process is in C++... but can you try this?

CreateProcess(0, "AutoIt3.exe /AutoIt3ExecuteLine  'MsgBox(0, ''Hello World!'', ''Hi!'')'", 0, 0, 0, 0, 0, 0, &si, &pi);

or maybe this

CreateProcess(0, 'AutoIt3.exe /AutoIt3ExecuteLine  "MsgBox(0, ''Hello World!'', ''Hi!'')"', 0, 0, 0, 0, 0, 0, &si, &pi);
Edited by Nahuel
Link to comment
Share on other sites

  • Developers

Don't think you need the double '' in there... try:

CreateProcess(0, "AutoIt3.exe /AutoIt3ExecuteLine \"MsgBox(0x0,'AutoIt','This is my script.')\"", 0, 0, 0, 0, 0, 0, &si, &pi);

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 2 years later...

I would like to add that the AutoIt3ExecuteLine sample at

http://www.autoitscript.com/autoit3/docs/intro/running.htm

says

To execute a single line of code, use the command:

Run(@AutoItExe & ' /AutoIt3ExecuteLine "MsgBox(0, ''Hello World!'', ''Hi!'')"')

The tray icon will not be displayed when using /AutoIt3ExecuteLine

NOTE: Correct usage of single- and double- quotation marks is important, even double single.

appears to specifically (and incorrectly) assert that double single quotes are necessary. I'm glad I found this post.

Link to comment
Share on other sites

No, it doesn't. It correctly cautions you to use them correctly.

Please don't resurrect old topics like that.

If you must, start a new topic and refer to the old one with a link.

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...