Sign in to follow this  
Followers 0
cesars77

How to start application/game without giving it window focus?

4 posts in this topic

Is it possible to start an application/game with AutoIt, without the application/game steals focus on the others windows?? Is there an UDF about that??

I tried with Run and ShellExecute, both with many variants(@SW_SHOWMINNOACTIVE, @SW_HIDE, @SW_SHOWMINNOACTIVE, @SW_MINIMIZE) without success...Even tried with a batch file, also without success. Each time the application start, it steals the focus on the other windows...

Does anyone could enlighten me on that or lead me to an explicatory UDF??

Thx all!!

Share this post


Link to post
Share on other sites



I think there is something called ControlFocus.

If you can get the handle (or whatever) of the window that has the focus, you can give that window focus again after the script has started!


[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Share this post


Link to post
Share on other sites

I think there is something called ControlFocus.

If you can get the handle (or whatever) of the window that has the focus, you can give that window focus again after the script has started!

ControlFocus

Sets input focus to a given control on a window.

I dont think i can do something with this...

Someone has other suggestions???

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0