Jump to content

Recommended Posts

Posted (edited)

Hey Guys i´m trying to command a program in background while doing something else.

With Nodepad this works finde:

Opt("WinTitleMatchMode",2)
Opt("SendKeyDelay", 0)
Run("notepad.exe")
Sleep(1000)
$number=0
for $number= 0 to 100
ControlSend("Editor", "", "Edit1",("LINE" & $number & "{ENTER}"))
next

While being in a Game (warcraft3) the script works fine and the lines get completed. But as soon as i try to write to other programms the game automatically gets minimized as if i were pressing ALT+TAB.

If i´m not in a game the aplication gets non-active until the function has completed.

Anyone got a Idea how to fix this?

Edited by fearlumsk
Posted

maybe

$number=0
While WinActive(" MY GAME"); or WinExists()
$number= $number + 1
ControlSend("Editor", "", "Edit1",("LINE" & $number & "{ENTER}"))
if $number = 100 then exit
Wend

8)

NEWHeader1.png

Posted

Its not possible to window it :think:

The game itself is just a test! The reason i choosed it is becaus its i think the most difficult situation for the script.

I could altough have winword open or winamp or something else...

Hmm it seems its impossible to do this.... so i have to use blockinput in these moments to make the script work... damn :-/

Posted

How? :think:

The below statement is False.The above statement is True.a lesson I learned from Greenmachine; give a man a code and he'll solve one problem. Teach a man to code and he'll solve all his problems.P.S please don't use autoIt as a virus creator/spyware maker(keyLogger especially)Cick this and help me[center]My Scripts:[/center][center]Port Scanner[/center]

Posted (edited)

But thats not my problem. it has to work EVEN if its maximized or minimized or hidden or something else..... :-/

Hmm i think its the programm im trying to command. With one simmilar other program its working now. I gonna use that one...its even better =)

Thanks to all of you!

Edited by fearlumsk

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
×
×
  • Create New...