Jump to content

Can I execute script to a inactive process ?


Recommended Posts

1.

Is it possible to assign specific script to specific process?and the script will only effect the process.

2.

Can I execute a script to a inactive process?

My question may be stupid, dont laugh at me :)

Thank you in advance.

Link to comment
Share on other sites

I think know one knows what your saying... Can you please rephase your question and say what your hoping to achieve.

<{POST_SNAPBACK}>

For example

I want a script is operative on my MSN but it's inoperative when I change window to another window like a game , and operative again when MSN window is active.

I know I can pause the script , but I prefer automation to manpower.

Second question

Can I make the script operative on a game that window is not active?

==> I execute a script for some specific game==>talk to friends with MSN(the script is still work on the game but dont influence my MSN.)

I am sorry If my poor English confuse you. :)

Link to comment
Share on other sites

thank you for your reply

CODE

While 1

If Winactive("Game name") then

send("a")

sleep(5000)

send("a")

sleep(5000) <====change focus to MSN from the game at this moment.

send("a")

sleep(5000)

send("a")

sleep(5000)

send("a")

sleep(5000)

else

send("b")

sleep(5000)

send("b")

sleep(5000)

send("b")

sleep(5000)

send("b")

sleep(5000)

send("b")

sleep(5000)

Wend

Question 1

If I change focus to my MSN from the game,Will the script send keystrokes a to my MSN window?(my hope is the keystrokes a won't send to my MSN window.)

Question 2

If I execute this script when I am using MSN(but the game is existing),which window(game or MSN) the keystrokes b will influence?(my hope is the keystrokes b will Influence the Game(inactive).)

thank you in advance.

Edited by nekokk
Link to comment
Share on other sites

A1. Yes the key strokes will be send to the msn window. You can get around this by looking at ControlSend() in the help file.

A2. Your script so far relies on the If...EndIf Statement, it will send "a" of the game window is active and send "b" when it is not active.

If you start the script while msn is the active window it will send "b" to any window that is active, unless it is the game window where it will send "a".

qq

Link to comment
Share on other sites

A1. Yes the key strokes will be send to the msn window. You can get around this by looking at ControlSend() in the help file.

A2. Your script so far relies on the If...EndIf Statement, it will send "a" of the game window is active and send "b" when it is not active.

If you start the script while msn is the active window it will send "b" to any window that is active, unless it is the game window where it will send "a".

<{POST_SNAPBACK}>

I understood :)

These answers means I cant send any key with au3 to a inactive process.

My previous idea was to do somthing in my game and do another thing like chat with my friends at the same time on one computer. but I think I have fantastic notions, lol.

Thank you Burrup.

Link to comment
Share on other sites

Anytime. Like I said above look at ControlSend() in the help file. You will be able to talk on msn and send text specifically to your game window.

<{POST_SNAPBACK}>

I will try to understand what Controlsend() function can do.

Thank you :)

Link to comment
Share on other sites

  • 2 weeks later...

The AU3 Window Info program will give you the name of the button. I would suggest against coordinates only because it may not always be located at that coordinate.

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Link to comment
Share on other sites

  • Moderators

Please answer the question stated above. :)

<{POST_SNAPBACK}>

All they were trying to do is help.

Don't know if this will help, but I remembered reading this, maybe you can get it to work for you. We know you can respond on whether something doesn't work, hope you can if this does too:

Insolence's Minimized MouseClicks

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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

  • Recently Browsing   0 members

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