MCT Posted November 26, 2004 Share Posted November 26, 2004 im fairly new to autoit, my knowledge conists of "run" basically how would i run a program silently (i can do this) & have my autoit script be able 2 accept parameters ? the program im trying 2 run silently is "Console" which is a skin for cmd.exe it launches cmd.exe but i can get it 2 run, but it uses a switch 2 pass the directory parameter on C:\Program Files\Console\console.exe -c "/k cd /d ""%1""" is my command i need 2 have in autoit Run("C:\Program Files\Console\console.exe -c "/k cd /d", "", @SW_HIDE) but how can i make it so it will open 2 the directory where i right click 2 (thats what the %1 is for) Link to comment Share on other sites More sharing options...
MHz Posted November 26, 2004 Share Posted November 26, 2004 Welcome MCT, Please use support forum for support. ok. For your question for command console. Look at Run and Runwait. E.g. Runwait(@Comspec & " /c setup.exe /s", "working dir", @SW_HIDE)@Comspec is the cmd.exe interpretor. & is a concantation symbol to join commands etc. /c is for clocing cmd.exe when done. working dir can be "". @SW_HIDE hides the console window. ok. Link to comment Share on other sites More sharing options...
Developers Jos Posted November 26, 2004 Developers Share Posted November 26, 2004 (edited) im fairly new to autoit, my knowledge conists of "run" basically<{POST_SNAPBACK}>thats clear because you are asking for support and are posting in a forum that clearly states at the top; This is not a general support forum! how would i run a program silently (i can do this) & have my autoit script be able 2 accept parameters ?the program im trying 2 run silently is "Console" which is a skin for cmd.exe it launches cmd.exe but i can get it 2 run, but it uses a switch 2 pass the directory parameter onC:\Program Files\Console\console.exe -c "/k cd /d ""%1""" is my command i need 2 have in autoitRun("C:\Program Files\Console\console.exe -c "/k cd /d", "", @SW_HIDE) but how can i make it so it will open 2 the directory where i right click 2 (thats what the %1 is for)<{POST_SNAPBACK}>The "Right-Click" thing you mention is not clear to me but to prompt for a directory you can use FileSelectFolder() ... just check the helpfile to get you started.The above run command won't work.... The easiest thing is to put lines like this inside a single qouted string and use @comspec to start the program ... something like:Run(@ComSpec & ' /c "C:\Program Files\Console\console.exe -c "/k cd /d"', "", @SW_HIDE) Edited November 26, 2004 by JdeB 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 More sharing options...
MCT Posted November 29, 2004 Author Share Posted November 29, 2004 thanks 4 the replies guys & sorry 4 posting in wrong forum, it was like 3am when i posted, i was tired 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