startrek133 0 Posted September 8, 2011 Hi Everyone, Ok this is driving me nuts .. Every morning when i get into work , i have about a dozen programs i have to launch and open up .. I have been for the last 2 hours , trying to writing something that will launch a program , but not having any luck .. any advice ?? Run ( "firefox.exe" , "C:\Program Files\Mozilla Firefox" , @SW_MINIMIZE) Share this post Link to post Share on other sites
rcmaehl 50 Posted September 8, 2011 Here you go: Run (@ProgramFilesDir & "\Mozilla Firefox\firefox.exe" , "" , @SW_MINIMIZE) The second parameter is NOT the path to the program, it is the working directory. My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My ProjectsCisco Finesse, Github, IRC UDF, WindowEx UDF Share this post Link to post Share on other sites
AdamUL 98 Posted September 8, 2011 Also, Firefox will restore its window, while it is loading a webpage, so try this. Run(@ProgramFilesDir & "\Mozilla Firefox\firefox.exe", "", @SW_MINIMIZE) Opt("WinTitleMatchMode", 2) WinWait("Mozilla Firefox") WinSetState("Mozilla Firefox", "", @SW_MINIMIZE) Adam Share this post Link to post Share on other sites
JohnOne 1,603 Posted September 8, 2011 Running them is fine, you just need the path to the executables $firefox = "x:\path\to\firefox.exe" Run($firefox) Just put all the app paths you want to run in a file of some sort like ini or txt. Go through them in a loop running them, while you have a coffee. 1 truonghieuhust reacted to this AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
startrek133 0 Posted September 8, 2011 thanks rcmaehl strange though because the help file , has it setup like how i typed it ... never would have thought that there was a @programfilesdir command .. thanks again for the help .. Share this post Link to post Share on other sites
Akarillon 0 Posted September 8, 2011 also, easier way to run a program(I think) is the ShellExecute() command Challenge accepted! Share this post Link to post Share on other sites
FaridAgl 48 Posted September 8, 2011 But i always use Run() coz Run() return executed file's PID. http://faridaghili.ir Share this post Link to post Share on other sites
JohnOne 1,603 Posted September 8, 2011 That's true, but I dont think the OP cares about PIDs, just wants to start the apps. Another way, might be to keep a list of any current documents being worked on, or even default documents, one for each app, and shellexecute them, doing away with needing a path. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Share this post Link to post Share on other sites
Chimaera 144 Posted September 9, 2011 Can you not just add them to the startup folder so let windows load them? If Ive just helped you ... miracles do happen. ChimaeraCopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Share this post Link to post Share on other sites
Bert 1,430 Posted September 9, 2011 Second that. Keep it simple The Vollatran project My blog: http://www.vollysinterestingshit.com/ Share this post Link to post Share on other sites
hannes08 39 Posted September 9, 2011 Can you not just add them to the startup folder so let windows load them?Won't work if he want's to start them minimized.Otherwise he could also keep a batch (.cmd) file on the desktop to start his programs anytime. Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler] Share this post Link to post Share on other sites