Jump to content

Open and close a program at Windows start?


 Share

Recommended Posts

Sorry to post more than 1 question at the time, but I hope to learn fast.

I want ACDSee 15 to open and directly close when I start Windows. I want this because the first time the program launches, it takes some time. After being opened once, it opens much faster until reboot.

Basically, I want the program to open itself to be loaded in the cache and then close.

I've looked at ProcessExists and ProcessClose, but I don't think I can use them.

This start/close script can only be run once, I'd rather not have it timed, so if I have a compiled .exe in the autostart, won't it close my program every time i try to open it?

Link to comment
Share on other sites

ShellExecute("D:ProgramACD SystemsACDSee15.0ACDSee15.exe")

ProcessWait("ACDSee15.exe")

ProcessClose("ACDSee15.exe")

This doesn't work. I presume it has with the delay to do. But I was hoping the use this command to wait for the process. But maybe thats not at all how it works?

Link to comment
Share on other sites

  • Developers

What about you tell us what is working and what not and whether or not the script finishes without closing ACD15?

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

You can pause the script for some two seconds and then check with Processexists(). If it does then go ahead and close it. That may be little better. I have also experienced this type of problem with Processwait() and apparently adding a little delay time sometimes solves the problem.

"Let me win[color=rgb(68,68,68);font-family:arial, sans-serif;font-size:small;], [/color]but if I cannot[color=rgb(68,68,68);font-family:arial, sans-serif;font-size:small;] win, let me be brave in the attempt"[/color]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...