How to switch to Firefox and refresh the current page, AutoHotkey can achieve

Source: Internet
Author: User
Tags sublime text

We should have heard livestyle this dongdong, is Sublime Text an extension, with the Chrome livestyle extension can achieve real-time web page effect.

But I have been accustomed to using Firefox, but Firefox Wood has livestyle (if there is, please know the recommendation of a friend-to cooperate with Sublime Text) How to do? Chatting with friends about AutoHotkey, suddenly thought why not AutoHotkey to achieve similar refresh action? Although not real-time, but at least do not need to frequently switch windows to test the new style bar. And I used the AutoHotkey (Quick link: "Big only small use: using AutoHotkey to implement WIN8 Input method to switch shortcut keys Ctrl+space")

Immediately the brain started to try, and finally got it, AutoHotkey script is as follows:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Press Win + F5 to switch from Sublime text window to Firefox and refresh the current page and return to the Sublime text window
; -Measured: zwwooooo | Zww.me
; -part of the code collection from the search engine, via no, thank you
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#NoEnv; Recommended for performance and compatibility with future AutoHotkey releases.
Sendmode Input; Recommended for the new scripts due to its superior speed and reliability.
Setworkingdir%a_scriptdir%; Ensures a consistent starting directory.
Settitlematchmode 2

Activate (t)
{
ifwinactive,%t%
{
Winminimize
Return
}
Settitlematchmode 2
Detecthiddenwindows,on
ifwinexist,%t%
{
Winshow
Winactivate
Return 1
}
return 0
}

#F5::
Activate ("Mozilla Firefox")
Send {F5}
; If you do not need to switch back to the Sublime Text window, the following sentence is deleted or commented out
Activate ("Sublime Text")

If your mouse has function keys, set one for Win + F5 will be more power

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.