Sign in to follow this  
Followers 0
Muyfa666

Open and close a program at Windows start?

10 posts in this topic

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?

Share this post


Link to post
Share on other sites



use Run and Processclose on the program, compile it to exe, and put a shortcut to that exe in your startup folder?

it's newbish but it should work :P

Share this post


Link to post
Share on other sites

I kind of got it going, but not by detecting the process, but rather with a timeout. Is there no "cleaner" way to do it?

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

i'm not familiar with the program but how about a winwaitactive before the process close?

Share this post


Link to post
Share on other sites

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

ProcessWait("ACDSee15.exe")

WinActivate("ACDSee15.exe")

ProcessClose("ACDSee15.exe")

Nothing really seems to happen with this...

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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]

Share this post


Link to post
Share on other sites

Doesn't something as simple as this work?

RunWait ("D:ProgramACD SystemsACDSee15.0ACDSee15.exe")
Sleep(1000)
ProcessClose("ACDSee15.exe")

Meds.  They're not just for breakfast anymore. :'(

Share this post


Link to post
Share on other sites

I've decided to give up on this. Not for the the script programming, but for the program itself is lousy. I'm gonna stick with ACDSee Classic to avoid issue. Thanks everyone for the help.

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