AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

send requires me to hover the mouse over the active windows?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
rejetto



Joined: 05 May 2008
Posts: 5
Location: Roma, Italy

PostPosted: Sat May 10, 2008 10:40 am    Post subject: send requires me to hover the mouse over the active windows? Reply with quote

hello Smile

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
View user's profile Send private message
Z Gecko
Guest





PostPosted: Sat May 10, 2008 4:34 pm    Post subject: Reply with quote

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

PostPosted: Sat May 10, 2008 7:51 pm    Post subject: Reply with quote

that was quite obvious,
but I am able to miss even such things! Embarassed
thank you ZG, i'll try that
Back to top
View user's profile Send private message
NLI-Conquer
Guest





PostPosted: Sat May 10, 2008 11:56 pm    Post subject: Reply with quote

Welcome to the forum Smile
Back to top
rejetto



Joined: 05 May 2008
Posts: 5
Location: Roma, Italy

PostPosted: Sun May 11, 2008 7:07 pm    Post subject: Reply with quote

thank you Smile

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 Sad

any clue?
Back to top
View user's profile Send private message
Z Gecko
Guest





PostPosted: Sun May 11, 2008 7:23 pm    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group