Sign in to follow this  
Followers 0
Stihl

Running Script in Background?

8 posts in this topic

#1 ·  Posted (edited)

I'm trying to make an AutoIt script to run in a minimized program, while I am in a different program.

Is there a command line that can accomplish this? I want the script to run in the minimized window of my choice, but leave me able to still operate the computer. Here is a generic script I'm working with:

Global $Paused

HotKeySet("{ESC}", "Terminate")

Opt("MouseClickDragDelay", 100)

Sleep(5000)

While 1

Sleep(500)

ControlClick("Star Wars Galaxies", "", "", "Secondary", 1, 537, 430)

Sleep(800)

ControlSend("Star Wars Galaxies","","" ,3)

sleep(500)

ControlSend("Star Wars Galaxies","","" ,2)

Sleep(500)

ControlSend("Star Wars Galaxies","","" ,4)

Sleep(1000)

WEnd

Func Terminate()

Exit 0

EndFunc

Edited by Stihl

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

Instead of Send() use ControlSend()

Okay, fixed

Edited by Stihl

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ControlSend("Star Wars Galaxies","","" ,3) etc. Works correctly but ControlClick("Star Wars Galaxies", "", "", "Secondary", 1, 537, 430) doesn't. I've tried replacing "secondary" with "right" but same results - any idea on this?

Edited by Stihl

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Is there another command that must accompany Controlclick() to make it work properly?

ContolSend() works ..

MouseClick() works ..

But can't get Controlclick() to actually click on anything inside window

Edited by Stihl

Share this post


Link to post
Share on other sites

Baisicly autoit have same problem as you if there is no window where you gona click? <_< ControlSend works because it actualy sends button pres to a window. But where you gona click if there is no window? :)

Share this post


Link to post
Share on other sites

Baisicly autoit have same problem as you if there is no window where you gona click? <_< ControlSend works because it actualy sends button pres to a window. But where you gona click if there is no window? :)

If you cant send a ControlClick to a window thats not maximized, then why is there a ControlClick command to begin with? I think I'm just missing something :P

Share this post


Link to post
Share on other sites

Baisicly autoit have same problem as you if there is no window where you gona click? <_< ControlSend works because it actualy sends button pres to a window. But where you gona click if there is no window? :)

Gah .. still cant make it work

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