Jump to content

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


Recommended Posts

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!!

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

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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