Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 29, 2016, 06:51:38 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: SOLVED: Exclude firefox from script?  (Read 2931 times)

substep

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
SOLVED: Exclude firefox from script?
« on: August 03, 2010, 06:31:21 PM »
I have a script to close windows by middle click but I want it not to work in firefox. Is that possible?
Script is
MButton::
Send !{F4}
Return

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,591
    • View Profile
    • Donate to Member
Re: Exclude firefox from script?
« Reply #1 on: August 03, 2010, 07:05:41 PM »
code needs to look like this

MButton::
ifwinactive, Mozilla Firefox
    return

Send !{F4}
Return

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,164
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Exclude firefox from script?
« Reply #2 on: August 03, 2010, 08:02:48 PM »
Also it's a good idea to avoid a window with the title
Program Manager

which is the desktop. Otherwise if there's nothing else open on the desktop it may ask you if you want to log off. :)

substep

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Exclude firefox from script?
« Reply #3 on: August 03, 2010, 08:54:40 PM »
code needs to look like this
thx, but it works only if the window title is exactly "Mozilla Firefox", it puts tab names before it.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,634
    • View Profile
    • Donate to Member
Re: Exclude firefox from script?
« Reply #4 on: August 03, 2010, 08:59:45 PM »
Add this line to the top of your script:

Code: Autohotkey [Select]

substep

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Exclude firefox from script?
« Reply #5 on: August 03, 2010, 09:04:41 PM »
Add this line to the top of your script:
It works now, but now middle-click in Firefox itself stopped functioning

MilesAhead

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 7,164
    • View Profile
    • Miles Ahead Software
    • Donate to Member
Re: Exclude firefox from script?
« Reply #6 on: August 03, 2010, 09:14:43 PM »
Put a tilde character before the MButton like this
~MButton::

That prevents the program "eating" the hotkey.

substep

  • Participant
  • Joined in 2010
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: Exclude firefox from script?
« Reply #7 on: August 03, 2010, 09:17:38 PM »
Thanks 2 all, It's fine now :up: