Hans Posted August 17, 2006 Share Posted August 17, 2006 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 Link to comment Share on other sites More sharing options...
Uten Posted August 17, 2006 Share Posted August 17, 2006 (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 August 17, 2006 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
MHz Posted August 17, 2006 Share Posted August 17, 2006 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¥ÌÙ¥ÀäÈí¥¹à¹¡Ñµ°ÅÕ½ÐìÌäì¤( Link to comment Share on other sites More sharing options...
Hans Posted August 20, 2006 Author Share Posted August 20, 2006 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 Link to comment Share on other sites More sharing options...
MHz Posted August 20, 2006 Share Posted August 20, 2006 In the helpfile as Datatypes, under strings sectionhttp://www.autoitscript.com/autoit3/docs/i...g_datatypes.htmChoice 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. Link to comment Share on other sites More sharing options...
Hans Posted August 23, 2006 Author Share Posted August 23, 2006 Thank you for your kind help Hans Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now