Post Reply

How to force a program to start and run minimized on start up

OP heartpumper77

3rd August 2008, 09:20 PM   |  #1  
OP Member
Thanks Meter: 0
 
33 posts
Join Date:Joined: Nov 2007
I was wondering what type of changes I have to make to the registry or the lnk or exe file to get a program to run on startup and minimized?

Thanks
3rd August 2008, 10:13 PM   |  #2  
Senior Member
Thanks Meter: 2
 
1,937 posts
Join Date:Joined: Jun 2007
More
well this is how i do it, make a mortscript that runs that app waits a couple of seconds then use vijay555 ok button app to close it. thats the best way i know how.
3rd August 2008, 10:14 PM   |  #3  
kareeem's Avatar
Retired Senior Moderator
Flag Southern California
Thanks Meter: 168
 
4,021 posts
Join Date:Joined: Oct 2006
Donate to Me
It doesn't really have to do with the registry and is pretty simple. Just get the .lnk or .exe and navigate to Windows>Startup and whatever you want to start up, just place the shortcut there.
3rd August 2008, 10:16 PM   |  #4  
OP Member
Thanks Meter: 0
 
33 posts
Join Date:Joined: Nov 2007
Yeah I have done that and the program starts, I would like it run minimized though...

Thanks
4th August 2008, 12:11 AM   |  #5  
sean222's Avatar
Senior Member
Flag Markham, Ontario
Thanks Meter: 129
 
436 posts
Join Date:Joined: Dec 2007
More
Yea it can be done with MortScript. I did it. Your script should look something like:

Run ( HiCalculator.exe )
Sleep ( 5000 )
Minimize ( HiCalc )

You have to refer to the mortscript manual for more info.
Basically the above script starts the program, waits 5 seconds, then mortscript will look for the window title and minimize the window
4th August 2008, 01:50 AM   |  #6  
mr_deimos's Avatar
Senior Member
Thanks Meter: 91
 
386 posts
Join Date:Joined: Nov 2007
Donate to Me
More
Quote:
Originally Posted by sean222

Yea it can be done with MortScript. I did it. Your script should look something like:

Run ( HiCalculator.exe )
Sleep ( 5000 )
Minimize ( HiCalc )

You have to refer to the mortscript manual for more info.
Basically the above script starts the program, waits 5 seconds, then mortscript will look for the window title and minimize the window

Even better way to do this is to use the WaitForActive() command. It waits for a window to become active, but no longer than a defined time period.
Code:
Run ("HiCalculator.exe")
WaitForActive ("Hicalc", 5000)
Minimize ("HiCalc")
This way if the window is displayed after 1 second, the script minimizes it and ends. Your version would always wait 5 seconds before minimizing the program, no matter how fast it's launched - why waste so much time?
4th August 2008, 03:26 AM   |  #7  
sean222's Avatar
Senior Member
Flag Markham, Ontario
Thanks Meter: 129
 
436 posts
Join Date:Joined: Dec 2007
More
Quote:
Originally Posted by mr_deimos

Even better way to do this is to use the WaitForActive() command. It waits for a window to become active, but no longer than a defined time period.

Code:
Run ("HiCalculator.exe")
WaitForActive ("Hicalc", 5000)
Minimize ("HiCalc")
This way if the window is displayed after 1 second, the script minimizes it and ends. Your version would always wait 5 seconds before minimizing the program, no matter how fast it's launched - why waste so much time?

Nice! Thanks As you know the Mortscript manual is huge, I just skimmed through it
4th August 2008, 11:15 AM   |  #8  
OP Member
Thanks Meter: 0
 
33 posts
Join Date:Joined: Nov 2007
Thanks guys,

Guess I will be reading more of the Mortscript manual....

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes