Sign in to follow this  
Followers 0
Hans

relative paths

6 posts in this topic

Greetings

I am new to the community and to autoit.

All I want to do is to get a neat script which does the same as

the following batch file:

~~~~~~~~~

@Echo Off

"FrameDem.exe" "Nis David\index.html"

~~~~~~~

The batch file is working, however, I can't get autoit running

the same app with parameters.

What for? one could ask. To get batch files run silently,

you have to add the pif-shortcut and this slows down

the startup procedure considerably.

Any hints?

Hans

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You probably need to enclose your parameters in " and might also need to specify a apropriate path to run in?

$workingdir = "c:\path to my tool" ; If your tools needs this specified 
Run('command.exe' & ' "My cmd parameter has spaces" "And this is the second" ',  $workingdir)

EDIT: Typo

Edited by Uten

Share this post


Link to post
Share on other sites

Welcome Hans

You could use the @ScriptDir macro to execute the file from the scripts directory

Run('"' & @ScriptDir & '\FrameDem.exe" "Nis David\index.html"', @ScriptDir)
oÝ÷ Úî±æ«zV­÷©jØZ³*.éíðØQºp ¢i¢XÊ+-¡È^rKa{
+)àv*ÞrÚ+É·¢·®²)à­éZ¶+Þ¥«a±«­¢+Ø(졬ݽɭ¥¹¥ÉѽÉ乡¹¥¹)%]½É­¥¹¥È±ÐìÐìMÉ¥ÁÑ¥ÈQ¡¸(%¥±
¡¹¥È¡MÉ¥ÁѥȤ)¹%()IÕ¸ Ìäíɵ´¹áÅÕ½Ðí9¥ÌÙ¥ÀäÈí¥¹à¹¡Ñµ°ÅÕ½ÐìÌäì¤(

Share this post


Link to post
Share on other sites

Thanks very much to all!

This seems to be an extraordinary vivid forum.

Now I found two examples working.

Run('"' & @ScriptDir & '\FrameDem.exe" "Nis David\index.html"', @ScriptDir)

and

Run('"' & @ScriptDir & '\FrameDem.exe" "Nis David\index.html"','',@SW_HIDE)

The syntax of quotation marks and commas is a little bit tricky.

Is there a tutorial bearing on that?

Hans

Share this post


Link to post
Share on other sites

In the helpfile as Datatypes, under strings section

http://www.autoitscript.com/autoit3/docs/i...g_datatypes.htm

Choice is yours on method, but I like single quotes by default, and then to add double quotes within the string to protect paths with spaces. The other style of doubling up on double quotes looks more problematic to me to handle by default.

:P

Share this post


Link to post
Share on other sites

Thank you for your kind help

Hans

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