| View previous topic :: View next topic |
| Author |
Message |
rejetto
Joined: 05 May 2008 Posts: 5 Location: Roma, Italy
|
Posted: Sat May 10, 2008 10:40 am Post subject: send requires me to hover the mouse over the active windows? |
|
|
hello
i'm trying to send this simple sequence* to firefox2.
| Code: |
#q::
IfWinActive ahk_class MozillaUIWindowClass
Send {RButton down}{WheelUp}{RButton up}
return
|
the problem is: this script works only if the mouse cursor is over firefox.
if firefox windows has focus but the mouse cursor is over the taskbar, the latter seems to be getting the keystrokes, while firefox sits motionless.
documentation states that "send" works with the active window, and that's what is detected by "ifWinActive", so, i'm quite confused.
could you help me?
*this is useful only with this add-on
|
|
| Back to top |
|
 |
Z Gecko Guest
|
Posted: Sat May 10, 2008 4:34 pm Post subject: |
|
|
| Quote: | | states that "send" works with the active window |
yes, but
you are sending Mouse-Clicks,
they happen of course at the position of your cursor. ( Otherwise your mouse woud be almost useless )
Use ControlSend instead. |
|
| Back to top |
|
 |
rejetto
Joined: 05 May 2008 Posts: 5 Location: Roma, Italy
|
Posted: Sat May 10, 2008 7:51 pm Post subject: |
|
|
that was quite obvious,
but I am able to miss even such things!
thank you ZG, i'll try that |
|
| Back to top |
|
 |
NLI-Conquer Guest
|
Posted: Sat May 10, 2008 11:56 pm Post subject: |
|
|
Welcome to the forum  |
|
| Back to top |
|
 |
rejetto
Joined: 05 May 2008 Posts: 5 Location: Roma, Italy
|
Posted: Sun May 11, 2008 7:07 pm Post subject: |
|
|
thank you
Now I tried both
| Code: |
#a::ControlSend, MozillaWindowClass5, {RButton down}{WheelDown}{RButton up}, A
|
and by removing the ending ", A"
but it doesn't seem to work
any clue? |
|
| Back to top |
|
 |
Z Gecko Guest
|
Posted: Sun May 11, 2008 7:23 pm Post subject: |
|
|
please (re)read the help for ControlSend,
the first example targets a control in the active-window, no matter if itīs Firefox or something else.
the second does the same with the lastfound window.
btw: what is RButton-down, Wheeldown, RButton up is supposed to do? ( I have no mouse-wheel on my notebook) |
|
| Back to top |
|
 |
|