startrek133 Posted September 8, 2011 Share 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) Link to comment Share on other sites More sharing options...
rcmaehl Posted September 8, 2011 Share 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 Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
AdamUL Posted September 8, 2011 Share 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 Link to comment Share on other sites More sharing options...
JohnOne Posted September 8, 2011 Share 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. truonghieuhust 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
startrek133 Posted September 8, 2011 Author Share 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 .. Link to comment Share on other sites More sharing options...
Akarillon Posted September 8, 2011 Share Posted September 8, 2011 also, easier way to run a program(I think) is the ShellExecute() command Challenge accepted! Link to comment Share on other sites More sharing options...
FaridAgl Posted September 8, 2011 Share Posted September 8, 2011 But i always use Run() coz Run() return executed file's PID. http://faridaghili.ir Link to comment Share on other sites More sharing options...
JohnOne Posted September 8, 2011 Share 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. Link to comment Share on other sites More sharing options...
Chimaera Posted September 9, 2011 Share 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. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() Link to comment Share on other sites More sharing options...
Bert Posted September 9, 2011 Share Posted September 9, 2011 Second that. Keep it simple The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
hannes08 Posted September 9, 2011 Share 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] 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