Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

MButton: Close windows(taskbar+titlebar) & open IE links


  • Please log in to reply
38 replies to this topic
azure
  • Members
  • 1216 posts
  • Last active: Mar 18 2015 09:06 AM
  • Joined: 07 Jun 2007
anyone???

MasterFocus
  • Moderators
  • 4323 posts
  • Last active: Jan 28 2016 01:38 AM
  • Joined: 08 Apr 2009
Being a user with more than 1160 posts on the forum, I suppose you have at least tried to do it on your own, right?
Post your code, show us where you're stuck at.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Antonio Fran├ža -- git.io -- github.com -- ahk4.net -- sites.google.com -- ahkscript.org

Member of the AHK community since 08/Apr/2009. Moderator since mid-2012.


Scoox
  • Members
  • 194 posts
  • Last active: Jun 09 2017 03:34 AM
  • Joined: 28 Nov 2010
I need help with this code. I use Win 7 x86 and I've used it for about half a year without problems, but yesterday I added a second monitor to my computer and I encountered a problem. Depending on how you've arranged your screens in Windows, the OS may report negative coordinates, in which case ErrorLevel is always set to 2 after the following code is run, no matter where you click:

SendMessage, 0x84,, ( ClickY << 16 )|ClickX,, ahk_id %WinID%
WM_NCHITTEST_Result = %ErrorLevel%

If you configure the desktop so that the top-most, left-most screen is the primary monitor, then there is no problem, although it may not always be ideal.

RegJump() - Jump to registry path in Regedit

HoverScroll() - HoverScroll() - Scroll controls without focus


Scoox
  • Members
  • 194 posts
  • Last active: Jun 09 2017 03:34 AM
  • Joined: 28 Nov 2010
I think I've fixed it. All I had to do was replace the following code:

SendMessage, 0x84,, (ClickY << 16)|ClickX,, ahk_id %WinID%

with the following code:

SendMessage, 0x84,, (ClickY << 16) | (ClickX & 0x0000FFFF),, ahk_id %WinID%

Becasue of the way negative values are represented, the original code resulted in the Y coordinate being lost. ORing with 0x0000???? ensures that the original value of the Y coordinate is preserved.

RegJump() - Jump to registry path in Regedit

HoverScroll() - HoverScroll() - Scroll controls without focus


kronikjb
  • Members
  • 3 posts
  • Last active: Nov 30 2012 12:19 PM
  • Joined: 29 Nov 2012
I have a question:

How do i join 2 commands in one hotkey?

#a::run www.google.com runns google if i press A.

how would i run "google and yahoo" with pressing A?

I'm new to forums so i don't know where can i ask this question.. are there any CHATROOMS here?

Thanks, Mia

ruespe
  • Members
  • 567 posts
  • Last active: Dec 01 2014 07:59 PM
  • Joined: 17 Jun 2008

I have a question:

How do i join 2 commands in one hotkey?

#a::run www.google.com runns google if i press A.

how would i run "google and yahoo" with pressing A?

I'm new to forums so i don't know where can i ask this question.. are there any CHATROOMS here?

Thanks, Mia

Hi Mia, don't occupy a Thread, make your own one please.
#a::
Run www .google.com
Run www .yhahoo.com
Return


gmFalka
  • Members
  • 1 posts
  • Last active: Apr 08 2013 07:17 PM
  • Joined: 02 Apr 2013

Very nice!

 

Would be nice if someone can point out where to instert that code:

ahk_class Chrome_WidgetWin_1
 

 to make an exception on Chrome!

 

 

PS.:

        If you want to close the window when you release the middle button, just change this:

MouseClick, Middle, %ClickX%, %ClickY%,, down
 

to this:
 

MouseClick, Middle, %ClickX%, %ClickY%,, up
 


zhotkey
  • Members
  • 34 posts
  • Last active: Feb 04 2016 02:06 PM
  • Joined: 02 Dec 2010

Middle mouse click on the titlebar of an Office 2010 application like Word or Excel using Windows 7 doesn't close the window?



Synetech
  • Members
  • 26 posts
  • Last active: Oct 05 2015 09:34 PM
  • Joined: 03 May 2013

I found this thread while trying to find a way to detect which Taskbar button was clicked. For a moment I thought this did that, until I saw that it closes the window associated with the Taskbar button that is middle-clicked by sending a right-click,C combo. Unfortunately that is kludgey and not what I was hoping for.

 

Does anybody know how to make it so that it gets the hWND of the window associated with the Taskbar button that was clicked so that it can be handled directly?