| View previous topic :: View next topic |
| Author |
Message |
Skulz
Joined: 27 Mar 2009 Posts: 4
|
Posted: Fri Mar 27, 2009 8:21 am Post subject: Macro connected to a window |
|
|
| It is possible to connect the macro to a window(it is a game), in order to do something else with other programs, games ecc ecc without be obliged to see the window for run properly the macro? |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 27, 2009 4:05 pm Post subject: |
|
|
| yes. do you use a second screen? |
|
| Back to top |
|
 |
Skulz
Joined: 27 Mar 2009 Posts: 4
|
Posted: Fri Mar 27, 2009 5:35 pm Post subject: |
|
|
| Do you mean monitor? Only 1 |
|
| Back to top |
|
 |
aCkRiTe
Joined: 21 Jul 2006 Posts: 555
|
Posted: Fri Mar 27, 2009 5:45 pm Post subject: |
|
|
Im not sure if I understand your question correctly, but if your looking for your script/macro to run only when a certain window exist or is active, you can take a look at the following:
IfWinActive
IfWinExist _________________
HTH...
|
|
| Back to top |
|
 |
Lighthouse
Joined: 12 Jan 2009 Posts: 55 Location: Southern Ca, USA
|
Posted: Fri Mar 27, 2009 6:06 pm Post subject: |
|
|
It depends what you are trying to send to the window.
I would suggest you check out PostMessage
And then Send Messages by Rajat
| Quote: | | Another advantage to PostMessage is that the Window can be in the background; by contrast, sending mouse clicks would require it to be active. |
|
|
| Back to top |
|
 |
Skulz
Joined: 27 Mar 2009 Posts: 4
|
Posted: Fri Mar 27, 2009 6:30 pm Post subject: |
|
|
Now i will read that.
Yes i haven't understand the question before XD.
I want a macro that have to work only with a game(that is played in window), and at the same i want to use my pc and not to be obliged to see only the game with the macro.
Ah there are only macro with keyboard, no mouse clicks
Edit: read something, not understand a lot XD
The macro is this:
Loop, 3000000000000000
{
Send, {F7}
Sleep, 4000
Send, {CTRLDOWN}z{CTRLUP}
Sleep, 2000
Send, {F3}
Sleep, 7000
}
Can i do what i want or not?
 |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Mar 27, 2009 7:41 pm Post subject: |
|
|
| Quote: | | Can i do what i want or not? | Yes |
|
| Back to top |
|
 |
Skulz
Joined: 27 Mar 2009 Posts: 4
|
Posted: Fri Mar 27, 2009 8:05 pm Post subject: |
|
|
So what have I to use? ifwinexist, ifwinactive?? what? XD
Really Im not pratical whit these things XD.
Can you say me what i have to add to the macro in order to work? |
|
| Back to top |
|
 |
illusive1011 Guest
|
Posted: Fri Mar 27, 2009 8:49 pm Post subject: |
|
|
I'm in the same boat.
| Code: |
Loop 60 ;Farm the tree 60 times
{
Click
Sleep 11000
}
return
send {r} ;detach axe
Sleep, 3000
send {6} ;select rest ability
Sleep, 3000
Click 1 ;trigger rest ability
Sleep, 18000 ;wait 3 minutes
return
^!p::Pause |
My question is, how can I have this script repeat itself for a SPECIFIC window, so I can minimize it and not have to worry about it. I want it to farm the tree 60 times, rest and then repeat all while having the game minimized. |
|
| Back to top |
|
 |
Lighthouse
Joined: 12 Jan 2009 Posts: 55 Location: Southern Ca, USA
|
Posted: Mon Mar 30, 2009 8:56 pm Post subject: |
|
|
Sorry for bringing this one back up front.
What you are looking for is something like:
| Code: |
Loop 60
{
controlsend, , r, The name of the game window
sleep, 3000
controlsend, ,6, the name of the game window
sleep, 3000
;cannot use a click on an inactive window.
controlsend, ,1, the name of the game window
sleep 18000
return
}
msgbox Looping finished!
^!p::Pause
|
|
|
| Back to top |
|
 |
illusive1011 Guest
|
Posted: Sun Apr 05, 2009 9:22 pm Post subject: |
|
|
Cant you use ControlClick for a click function?
I'm still having troubles with what you wrote for me, seems to not work  |
|
| Back to top |
|
 |
illusive1011 Guest
|
Posted: Wed Apr 08, 2009 12:05 am Post subject: |
|
|
| Anyone? |
|
| Back to top |
|
 |
|