標籤
.net
(
17
)
工作
(
29
)
面試
(
2
)
筆記
(
2
)
筆記倉庫
(
1
)
嘸蝦米
(
2
)
繪圖
(
1
)
Add-on
(
4
)
Android
(
39
)
AngularJS
(
1
)
ASP.NET
(
14
)
AutoHotKey
(
20
)
AutoIt
(
3
)
batch
(
24
)
Blogger Hack
(
3
)
Bookmarklet
(
18
)
C#
(
16
)
Chrome
(
1
)
cmd
(
22
)
CSS
(
6
)
CSS3
(
6
)
D855
(
1
)
DOM
(
17
)
DragOnIt
(
5
)
EmEditor
(
1
)
English
(
1
)
ffmpeg
(
1
)
Firefox
(
25
)
flo
(
2
)
GIMP
(
1
)
gist
(
144
)
Graphviz
(
1
)
hardware
(
1
)
HDD
(
1
)
HTML5
(
4
)
i18n
(
1
)
IIS
(
4
)
ImageMagick
(
5
)
Java
(
1
)
JavaScript
(
92
)
jhead
(
1
)
jQuery
(
6
)
JSBin
(
19
)
jsFiddle
(
4
)
JSON
(
1
)
JustDoubleClick
(
1
)
Kindle
(
1
)
MSSQL
(
26
)
MySQL
(
2
)
Network
(
1
)
node.js
(
12
)
php
(
1
)
PowerShell
(
6
)
ramdisk
(
1
)
Reg
(
3
)
RegExp
(
3
)
rpi3
(
3
)
SJ2000
(
1
)
SQLite
(
3
)
SSD
(
1
)
Stylish
(
1
)
SublimeText
(
2
)
tips
(
6
)
userChrome.js
(
3
)
userscript
(
40
)
VB.net
(
9
)
VBScript
(
2
)
VisualStudio
(
2
)
Vue.js
(
3
)
Win
(
5
)
Win2008
(
1
)
Win7
(
29
)
WinAPI
(
1
)
Winform
(
1
)
WinXP
(
3
)
XML
(
1
)
AutoHotKey MsgBox with parameter
標籤:
AutoHotKey
,
gist
MyHotKey
標籤:
工作
,
AutoHotKey
- Press ESC twice to close current window.
- Press middle button in Expolorer to go parent folder.
- Press hold LButton and Press RButton to open quick menu.
- Press MButton in taskbar to mute.
- Win + Wheel down, window to minimize.
- Win + Wheel up, window to maximize.
- Win + MButton, Pin on top.
- Win + NumpadAdd, Increase the transparency of the active window.
- Win + NumpadSub, Decrease the transparency of the active window.
- Win + Numpad0, Reset the transparency of the active window.
- Win + V, Pure text.
- Win + X, Exit App.
- Win + S, Folder "MySoftware".
- Win + G, Greenshot.
- Win + C, Copy file/folder path.
- Win + N, NotePad++.
- Win + T, Paste FormatTime "yyMMddHHmmss".
- Win + Q, Quick App Menu.
- Win + E, Open My Computer without folder list.
- Win + W, Resize the active window to 800x600.
- Win + LButton, Move the active window without having to click on the title bar.
Detect a key double press
標籤:
AutoHotKey
~Esc::
if (A_PriorHotkey <> A_ThisHotkey or A_TimeSincePriorHotkey > 400)
{
; Too much time between presses, so this isn't a double-press.
KeyWait, Esc
return
}
WinMinimize, A ; Assign a hotkey to minimize the active window.
;another example ↓ using to quick close the application
;Run, cmd /c TASKKILL /IM chrome.exe
return
keyboard shortcuts - Detect a double key press in AutoHotkey - Stack Overflow
Middle Paste 2
標籤:
AutoHotKey
熊熊想到AHK可以寫入txt,故再次精減流程
- 在Firefox裡,按中鍵,寫入剪貼簿內容至list.txt,每三次就自動多換一行
- 在SMG主畫面,按中鍵,貼上下載碼
- 在SMG新增下載檔案,按中鍵,自動貼上剪貼簿內容至下載路徑且送出確定
- 在SMG新增下載檔案,Ctrl + C,自動組成下載路徑,並複製編號部份
- 在SMG新增下載檔案,Ctrl + Z,跳至『儲存到』
- Win + Z 開啟list.txt
;開啟list.txt
#z::Run notepad "K:\list.txt"
;Firefox 中鍵新增剪貼簿內容至list.txt
#IfWinActive ahk_class MozillaWindowClass
MButton::
L++
IF ( L = 1 )
{
;StringUpper, Clipboard, Clipboard
FileAppend, %Clipboard%`n, K:\list.txt
TrayTip, MiddlePaste, 新增編號`n%Clipboard%,1
}
IF ( L = 2 )
{
IfInString, Clipboard, http://
{
FileAppend, %Clipboard%`n, K:\list.txt
TrayTip, MiddlePaste, 新增網址`n%Clipboard%,1
}
Else
{
SoundBeep
TrayTip, MiddlePaste, 格式錯誤,1
}
}
IF ( L = 3 )
{
FileAppend, %Clipboard%`n, K:\list.txt
TrayTip, MiddlePaste, 新增解壓縮密碼,1
FileAppend, `n, K:\list.txt
L=0
}
Return
;SMG新增下載檔案 中鍵貼上編號
#IfWinActive ahk_class TAddDownloads.UnicodeClass
MButton::
ControlFocus, 一般設定
Send {TAB 6}
;StringUpper, Clipboard, Clipboard
Send K:\%Clipboard%
Send {Enter}
Return
;SMG新增下載檔案 Ctrl + C 自動組成下載路徑,並複製編號部份,自動轉大寫
#IfWinActive ahk_class TAddDownloads.UnicodeClass
^c::
Send {End}
Send +{Home}
Send ^c
;StringUpper, Clipboard, Clipboard
Send K:\%Clipboard%\
Return
;SMG新增下載檔案 Ctrl + Z 跳至『儲存到』
#IfWinActive ahk_class TAddDownloads.UnicodeClass
^z::
ControlFocus, 一般設定
Send {TAB 6}
Return
;SMG主視窗 中鍵貼上
#IfWinActive ahk_class TMainForm.UnicodeClass
MButton::
Send {F4}
Return
Resize Window
標籤:
AutoHotKey
; win + w Resize Winodw to 1024(w), 1052(h)
#W::ResizeWin(1024,1052)
ResizeWin(Width = 0,Height = 0)
{
WinGetPos,X,Y,W,H,A
If %Width% = 0
Width := W
If %Height% = 0
Height := H
WinMove,A,,%X%,%Y%,%Width%,%Height%
}
Create a Hotkey to Resize Windows to a Specific Size with AutoHotkey - How-To Geek
檔案總管反向選取
標籤:
AutoHotKey
在檔案總管裡,使用Win + A進行反向選取
#x::ExitApp
#IfWinActive ahk_class CabinetWClass
#A:: Send !ei ;編輯(E) → 反向選擇(I)
Middle Paste
標籤:
AutoHotKey
- 在Notepad2裡,按中鍵,每貼上三次,自動多換一行
- 在SMG主畫面,按中鍵,貼上下載碼
- 在SMG新增下載檔案畫面,按中鍵,自動貼上剪貼簿內容且確定
#IfWinActive ahk_class Notepad2U
MButton::
Send ^v
Send {Enter}
L++
IF(L =3)
{
Send {Enter}
L=0
}
Return
#IfWinActive ahk_class TAddDownloads.UnicodeClass
MButton::
Send {TAB 6}
Send E:\%Clipboard%
Send {Enter}
Return
#IfWinActive ahk_class TMainForm.UnicodeClass
MButton::
Send {F4}
Return
Quick Tetris
標籤:
AutoHotKey
因為懶得動滑鼠按按鈕,故寫AHK用鍵盤按
目前功能如下:
目前功能如下:
- W鍵,自動置中視窗
- S鍵,Start (Sprint、2P)
- A鍵,Play Again (Sprint、2P)
- R鍵,Restart (Sprint)
#IfWinActive ahk_class Chrome_WidgetWin_1
$W::ResizeWin(1075,1052)
;Sprint Restart
#IfWinActive ahk_class Chrome_WidgetWin_1, Tetris Sprint
$R::
Send {Esc}
ControlClick, x710 y570
Return
;Sprint Play Again
#IfWinActive ahk_class Chrome_WidgetWin_1, Tetris Sprint
$A::ControlClick, x258 y558
;Sprint Start
#IfWinActive ahk_class Chrome_WidgetWin_1, Tetris Sprint
$S::ControlClick, x722 y503
;2P Start
#IfWinActive ahk_class Chrome_WidgetWin_1, Battle 2P
$S::ControlClick, x332 y345
;2P Play Again
#IfWinActive ahk_class Chrome_WidgetWin_1, Battle 2P
$A::ControlClick, x258 y560
ResizeWin(Width = 0,Height = 0)
{
WinGetPos,X,Y,W,H,A
If %Width% = 0
Width := W
If %Height% = 0
Height := H
X:=(A_ScreenWidth - Width) / 2
Y:=0
WinMove,A,,%X%,%Y%,%Width%,%Height%
}
Create Shortcut URL
標籤:
AutoHotKey
簡化下載檔案時,常會使用的動作流程
;建立URL(Win + V)
#v::
if WinActive("ahk_class CabinetWClass") ;Explorer才執行
{
strlen:=StrLen(Clipboard) ;取得剪貼簿字串長度
if(strlen > 0)
{
URL=%Clipboard% ;從剪貼簿取得URL
Send !d ;焦點移至網址列 Alt + D
Send ^c ;Ctrl + C
ClipWait 1 ;等待OS 1秒
Send +{Tab} ;取消焦點
FileAppend,[InternetShortcut]`nURL=%URL%`nIconFile=`nIconIndex=1,%Clipboard%\URL.url
}
}
Return
;複製URL(Win + C)
#c::
if WinActive("ahk_class CabinetWClass") ;Explorer才執行
{
Send !{Enter} ;開啟內容
WinWaitActive, 內容, , 1
Send ^c ;Ctrl + C
ClipWait 1 ;等待OS 1秒
Send !{F4} ;關閉內容
}
Return
;反向選取(Win + A)
#a::
if WinActive("ahk_class CabinetWClass") ;Explorer才執行
{
Send {Alt}
Send e
Send i
}
Return
;滑鼠左右鍵切換視窗
~LButton & RButton::AltTab
;關閉主程式(Win + X)
#x::
ExitApp
全域Google, Yahoo字典查詢
標籤:
AutoHotKey
#g:: ;定義按 Win + G 鍵,啟用 Google 字典
Clipboard = ;清空剪貼簿
Send, ^c ;送出 Ctrl + C
strlen:=StrLen(Clipboard) ;取得剪貼簿字串長度
if(strlen > 0)
{
ClipWait, 1 ;等待OS,剪貼簿等待1秒
Run , firefox.exe "http://www.google.com.tw/dictionary?aq=f&langpair=en|zh-TW&hl=zh-TW&q=%Clipboard%"
}
Return
#y:: ;定義按 Win + Y 鍵,啟用 Yahoo 字典
Clipboard = ;清空剪貼簿
Send, ^c ;送出 Ctrl + C
strlen:=StrLen(Clipboard) ;取得剪貼簿字串長度
if(strlen > 0)
{
ClipWait, 1 ;等待OS,剪貼簿等待1秒
Run , firefox.exe "http://tw.dictionary.yahoo.com/dictionary?p=%Clipboard%"
}
Return
Click Rex
標籤:
AutoHotKey
/****************************************************
* Copyright (c) 2010, NKid. All Rights Reserved.
* PROJECT:Click Rex
* DESCRIPTION:全自動背景傳送MSN來電震動
* VERSION:2
****************************************************/
#x:: ;按下win + x執行程式
SetCapsLockState, off ;把CapsLock設為關
TrayTip, Click Rex, Turn On, 1 ;顯示開始訊息
Loop
{
;按下CapsLock即停止程式
if GetKeyState("CapsLock", "T") {
TrayTip, Click Rex, Turn Off, 1
SetCapsLockState, off
Break
}
SetTitleMatchMode,2
ControlClick ,x130 y487,rexob7w
;Click ;按左鍵
;Send, ...{enter}
Sleep 10
}
訂閱:
文章
(
Atom
)