Sign in to follow this  
Followers 0
startrek133

Launching Programs

11 posts in this topic

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



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


Active: IRC UDF, WindowEx UDF
Discontinued: GithubBubbleSort UDF

Share this post


Link to post
Share on other sites

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

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.


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

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

also, easier way to run a program(I think) is the ShellExecute() command :mellow:


Challenge accepted!

Share this post


Link to post
Share on other sites

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

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

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0