Sign in to follow this  
Followers 0
FrenchTroll

Missing separator character

7 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Thanks Nahuel for reply. Already tried and that don't work. C++ is more tricky than autoit <_<

Edited by FrenchTroll

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Incredible, that work ! Thanks Jos ! (i passed 4 hours on that...)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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

Share this post


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
Sign in to follow this  
Followers 0