dinotom Posted April 1, 2019 Share Posted April 1, 2019 I am new to AutoIT although MANY years ago I used a similar program called WinBatch to automate morning routines. I am having some issues running code from the command line. If I use this line in my script Run ('cmd.exe /K "C:\start microsoft-edge:https://app.flowalgo.com/users/login"') It opens the cmd screen but the directory is set to the directory where the script that is running is located. C:\Autostart-Workstation\AMStart, and I need it to run from the C prompt I can get it to open at the C prompt with Run ('cmd.exe /K "cd\"') Is there a way to force the code to run from the root prompt ("C:\")? or how do I send the code to the cmd screen once I've changed to the root drive Link to comment Share on other sites More sharing options...
Developers Jos Posted April 1, 2019 Developers Share Posted April 1, 2019 Moved to the appropriate forum. Moderation Team 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...
jchd Posted April 1, 2019 Share Posted April 1, 2019 Look at the help file. This is parameter #2 of Run(). This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Developers Jos Posted April 1, 2019 Developers Share Posted April 1, 2019 (edited) Maybe?: Run ('cmd.exe /K "C:\start microsoft-edge:https://app.flowalgo.com/users/login"',"c:\") Jos edit: yea...what he said Edited April 1, 2019 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 More sharing options...
dinotom Posted April 1, 2019 Author Share Posted April 1, 2019 (edited) Probably don't use the C:\ at the start, since I'm assuming the second parameter "c:\" tells it to start there? And is /c still the switch to autoclose the cmd screen? Edited April 1, 2019 by dinotom Link to comment Share on other sites More sharing options...
Developers Jos Posted April 1, 2019 Developers Share Posted April 1, 2019 5 minutes ago, dinotom said: Probably don't use the C:\ at the start, since I'm assuming the second parameter "c:\" tells it to start there? Did you open that Helpfile to check the purpose of the parameters? 6 minutes ago, dinotom said: And is /c still the switch to autoclose the cmd screen? Why would you think this is any different from normal and did you simply try? Life can be simple 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 More sharing options...
dinotom Posted April 1, 2019 Author Share Posted April 1, 2019 Of course I eliminated the starting C:\ because I could see that wasn't necessary with the parameter and I added the /c switch and it works fine. Thanks for leading me in the right direction. I always answer the replies with any further questions, before I try new code, so hopefully I get an answer right after re-failing ((-; 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