MG_Config

MG_IniFileVersion=1.40
MG_8Dir=0
MG_ActiveAsTarget=0
MG_Interval=20
MG_AlwaysHook=1
MG_PrvntCtxtMenu=1
MG_Threshold=12
MG_LongThresholdX=800
MG_LongThresholdY=600
MG_LongThreshold=700
MG_TimeoutThreshold=12
MG_Timeout=1000
MG_DGInterval=0
MG_TmReleaseTrigger=3
MG_ORangeDefault=3
MG_ORangeA=3
MG_ORangeB=3
MG_EdgeInterval=20
MG_EdgeIndiv=0
MG_CornerX=1
MG_CornerY=1
MG_DisableDefMB=0
MG_DisableDefX1B=0
MG_DisableDefX2B=0
MG_UseNavi=1
MG_UseExNavi=3
MG_NaviInterval=10
MG_NaviPersist=0
MG_ExNaviTransBG=1
MG_ExNaviFG=000000
MG_ExNaviBG=FFFFFF
MG_ExNaviTranspcy=255
MG_ExNaviSize=24
MG_ExNaviSpacing=2
MG_ExNaviPadding=4
MG_ExNaviMargin=8
MG_AdNaviFG=FFFFFF
MG_AdNaviNI=7F7F7F
MG_AdNaviBG=000000
MG_AdNaviTranspcy=220
MG_AdNaviSize=11
MG_AdNaviFont=メイリオ
MG_AdNaviPosition=0
MG_AdNaviPaddingL=6
MG_AdNaviPaddingR=6
MG_AdNaviPaddingT=3
MG_AdNaviPaddingB=3
MG_AdNaviRound=2
MG_AdNaviMargin=14
MG_AdNaviSpaceX=2
MG_AdNaviSpaceY=2
MG_AdNaviOnClick=0
MG_ShowTrail=0
MG_DrawTrailWnd=1
MG_TrailColor=0000FF
MG_TrailTranspcy=255
MG_TrailWidth=3
MG_TrailStartMove=3
MG_TrailInterval=10
MG_ShowLogs=0
MG_LogPosition=4
MG_LogPosX=0
MG_LogPosY=0
MG_LogMax=20
MG_LogSizeW=400
MG_LogInterval=500
MG_LogFG=FFFFFF
MG_LogBG=000000
MG_LogTranspcy=100
MG_LogFontSize=10
MG_LogFont=MS UI Gothic
MG_EditCommand=
MG_HotkeyEnable=PgUp
MG_HotkeyNavi=
MG_HotkeyReload=
MG_ScriptEditor=
MG_TraySubmenu=0
MG_AdjustDlg=0
MG_DlgHeightLimit=800
MG_FoldTarget=0
MG_DisableWarning=0
MG_ActvtExclud := []
MG_MaxLength=8
MG_Triggers=RB
MG_SubTriggers=LB_WU_WD_A_B_C_D_S
 
 
Goto, MG_RB_End
 
MG_RB_Enable:
if (!MG_AlwaysHook) {
MG_RB_HookEnabled := Func("MG_IsHookEnabled_RB")
Hotkey, If, % MG_RB_HookEnabled
}
Hotkey, *RButton, MG_RB_DownHotkey, On
Hotkey, *RButton up, MG_RB_UpHotkey, On
Hotkey, If
MG_RB_Enabled := 1
return
 
MG_RB_Disable:
Hotkey, *RButton, MG_RB_DownHotkey, Off
Hotkey, *RButton up, MG_RB_UpHotkey, Off
MG_RB_Enabled := 0
return
 
MG_RB_DownHotkey:
MG_TriggerDown("RB")
return
 
MG_RB_UpHotkey:
MG_TriggerUp("RB")
return
 
MG_RB_Down:
MG_SendButton("RB", "RButton", "Down")
return
 
MG_RB_Up:
MG_SendButton("RB", "RButton", "Up")
return
 
MG_RB_Check:
MG_CheckButton("RB", "RButton")
return
 
MG_RB_End:
 
 
Goto, MG_LB_End
 
MG_LB_Enable:
if (!MG_AlwaysHook) {
MG_LB_HookEnabled := Func("MG_IsHookEnabled_LB")
Hotkey, If, % MG_LB_HookEnabled
}
Hotkey, *LButton, MG_LB_DownHotkey, On
Hotkey, *LButton up, MG_LB_UpHotkey, On
Hotkey, If
MG_LB_Enabled := 1
return
 
MG_LB_Disable:
Hotkey, *LButton, MG_LB_DownHotkey, Off
Hotkey, *LButton up, MG_LB_UpHotkey, Off
MG_LB_Enabled := 0
return
 
MG_LB_DownHotkey:
MG_TriggerDown("LB")
return
 
MG_LB_UpHotkey:
MG_TriggerUp("LB")
return
 
MG_LB_Down:
MG_SendButton("LB", "LButton", "Down")
return
 
MG_LB_Up:
MG_SendButton("LB", "LButton", "Up")
return
 
MG_LB_Check:
MG_CheckButton("LB", "LButton")
return
 
MG_LB_End:
 
 
Goto, MG_WU_End
 
MG_WU_Enable:
if (!MG_AlwaysHook) {
MG_WU_HookEnabled := Func("MG_IsHookEnabled_WU")
Hotkey, If, % MG_WU_HookEnabled
}
Hotkey, *WheelUp, MG_WU_Hotkey, On
Hotkey, If
MG_WU_Enabled := 1
return
 
MG_WU_Disable:
Hotkey, *WheelUp, MG_WU_Hotkey, Off
MG_WU_Enabled := 0
return
 
MG_WU_Hotkey:
MG_ButtonPress("WU")
return
 
MG_WU_Press:
MG_SendButton("WU", "WheelUp")
return
 
MG_WU_End:
 
 
Goto, MG_WD_End
 
MG_WD_Enable:
if (!MG_AlwaysHook) {
MG_WD_HookEnabled := Func("MG_IsHookEnabled_WD")
Hotkey, If, % MG_WD_HookEnabled
}
Hotkey, *WheelDown, MG_WD_Hotkey, On
Hotkey, If
MG_WD_Enabled := 1
return
 
MG_WD_Disable:
Hotkey, *WheelDown, MG_WD_Hotkey, Off
MG_WD_Enabled := 0
return
 
MG_WD_Hotkey:
MG_ButtonPress("WD")
return
 
MG_WD_Press:
MG_SendButton("WD", "WheelDown")
return
 
MG_WD_End:
 
 
;Description = A
Goto, MG_A_End
 
MG_A_Enable:
if (!MG_AlwaysHook) {
MG_A_HookEnabled := Func("MG_IsHookEnabled_A")
Hotkey, If, % MG_A_HookEnabled
}
Hotkey, a, MG_A_DownHotkey, On
Hotkey, a up, MG_A_UpHotkey, On
Hotkey, If
MG_A_Enabled := 1
return
 
MG_A_Disable:
Hotkey, a, MG_A_DownHotkey, Off
Hotkey, a up, MG_A_UpHotkey, Off
MG_A_Enabled := 0
return
 
MG_A_DownHotkey:
MG_TriggerDown("A")
return
 
MG_A_UpHotkey:
MG_TriggerUp("A")
return
 
MG_A_Down:
MG_SendButton("A", "a", "Down")
return
 
MG_A_Up:
MG_SendButton("A", "a", "Up")
return
 
MG_A_Check:
MG_CheckButton("A", "a")
return
 
MG_A_End:
 
 
;Description = B
Goto, MG_B_End
 
MG_B_Enable:
if (!MG_AlwaysHook) {
MG_B_HookEnabled := Func("MG_IsHookEnabled_B")
Hotkey, If, % MG_B_HookEnabled
}
Hotkey, b, MG_B_DownHotkey, On
Hotkey, b up, MG_B_UpHotkey, On
Hotkey, If
MG_B_Enabled := 1
return
 
MG_B_Disable:
Hotkey, b, MG_B_DownHotkey, Off
Hotkey, b up, MG_B_UpHotkey, Off
MG_B_Enabled := 0
return
 
MG_B_DownHotkey:
MG_TriggerDown("B")
return
 
MG_B_UpHotkey:
MG_TriggerUp("B")
return
 
MG_B_Down:
MG_SendButton("B", "b", "Down")
return
 
MG_B_Up:
MG_SendButton("B", "b", "Up")
return
 
MG_B_Check:
MG_CheckButton("B", "b")
return
 
MG_B_End:
 
 
;Description = C
Goto, MG_C_End
 
MG_C_Enable:
if (!MG_AlwaysHook) {
MG_C_HookEnabled := Func("MG_IsHookEnabled_C")
Hotkey, If, % MG_C_HookEnabled
}
Hotkey, c, MG_C_DownHotkey, On
Hotkey, c up, MG_C_UpHotkey, On
Hotkey, If
MG_C_Enabled := 1
return
 
MG_C_Disable:
Hotkey, c, MG_C_DownHotkey, Off
Hotkey, c up, MG_C_UpHotkey, Off
MG_C_Enabled := 0
return
 
MG_C_DownHotkey:
MG_TriggerDown("C")
return
 
MG_C_UpHotkey:
MG_TriggerUp("C")
return
 
MG_C_Down:
MG_SendButton("C", "c", "Down")
return
 
MG_C_Up:
MG_SendButton("C", "c", "Up")
return
 
MG_C_Check:
MG_CheckButton("C", "c")
return
 
MG_C_End:
 
 
;Description = D
Goto, MG_D_End
 
MG_D_Enable:
if (!MG_AlwaysHook) {
MG_D_HookEnabled := Func("MG_IsHookEnabled_D")
Hotkey, If, % MG_D_HookEnabled
}
Hotkey, d, MG_D_DownHotkey, On
Hotkey, d up, MG_D_UpHotkey, On
Hotkey, If
MG_D_Enabled := 1
return
 
MG_D_Disable:
Hotkey, d, MG_D_DownHotkey, Off
Hotkey, d up, MG_D_UpHotkey, Off
MG_D_Enabled := 0
return
 
MG_D_DownHotkey:
MG_TriggerDown("D")
return
 
MG_D_UpHotkey:
MG_TriggerUp("D")
return
 
MG_D_Down:
MG_SendButton("D", "d", "Down")
return
 
MG_D_Up:
MG_SendButton("D", "d", "Up")
return
 
MG_D_Check:
MG_CheckButton("D", "d")
return
 
MG_D_End:
 
 
;Description = s
Goto, MG_S_End
 
MG_S_Enable:
if (!MG_AlwaysHook) {
MG_S_HookEnabled := Func("MG_IsHookEnabled_S")
Hotkey, If, % MG_S_HookEnabled
}
Hotkey, s, MG_S_DownHotkey, On
Hotkey, s up, MG_S_UpHotkey, On
Hotkey, If
MG_S_Enabled := 1
return
 
MG_S_Disable:
Hotkey, s, MG_S_DownHotkey, Off
Hotkey, s up, MG_S_UpHotkey, Off
MG_S_Enabled := 0
return
 
MG_S_DownHotkey:
MG_TriggerDown("S")
return
 
MG_S_UpHotkey:
MG_TriggerUp("S")
return
 
MG_S_Down:
MG_SendButton("S", "s", "Down")
return
 
MG_S_Up:
MG_SendButton("S", "s", "Up")
return
 
MG_S_Check:
MG_CheckButton("S", "s")
return
 
MG_S_End:
 
 
Goto, MG_Config_End
 
 
MG_IsDisable() {
global
return (0)
}
 
MG_IsTarget1() {
global
return *1
}
 
MG_IsTarget2() {
global
return *2
}
 
MG_IsTarget3() {
global
return (MG_IsTarget2() && *3
}
 
MG_IsTarget5() {
global
return *4
}
 
MG_IsTarget6() {
global
return *5
}
 
MG_IsTarget7() {
global
return *6
}
 
MG_IsTarget8() {
global
return *7
}
 
MG_IsExDefault() {
return (0)
}
 
MG_Gesture_RB_:
if (!MG_IsExDefault()) {
;アクティブ化
if (MG_WClass != "Chrome_WidgetWin_2") {
MG_WinActivate()
}
}
return
 
MG_GetAction_RB_:
if (!MG_IsExDefault()) {
MG_ActionStr := "アクティブ化"
}
return
 
MG_Gesture_RB_A_:
if (!MG_IsExDefault()) {
;デフォルト再生速度
Send, !d
}
return
 
MG_GetAction_RB_A_:
if (!MG_IsExDefault()) {
MG_ActionStr := "デフォルト再生速度"
}
return
 
MG_Gesture_RB_C_:
if (!MG_IsExDefault()) {
;倍速
send,!a
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
send,!s
}
return
 
MG_GetAction_RB_C_:
if (!MG_IsExDefault()) {
MG_ActionStr := "倍速"
}
return
 
MG_Gesture_RB_LB__:
if (MG_IsTarget7()) {
;数式を挿入
Send, +!-
} else if (MG_IsTarget1()) {
;タブを閉じる
Send, ^w
} else if (!MG_IsExDefault()){
;Alt F4
Send, !{F4}
}
return
 
MG_GetAction_RB_LB__:
if (MG_IsTarget7()) {
MG_ActionStr := "数式を挿入"
} else if (MG_IsTarget1()) {
MG_ActionStr := "タブを閉じる"
} else if (!MG_IsExDefault()){
MG_ActionStr := "Alt F4"
}
return
 
MG_Gesture_RB_WD__:
if (!MG_IsExDefault()) {
;ウィンドウの位置を下に移動
WinRestore
MG_WinMove("0", "0.5", "0", "0.5", 0,,,1)
}
return
 
MG_GetAction_RB_WD__:
if (!MG_IsExDefault()) {
MG_ActionStr := "ウィンドウの位置を下に移動"
}
return
 
MG_Gesture_RB_WU__:
if (!MG_IsExDefault()) {
;ウィンドウ位置を上に移動
WinRestore
MG_WinMove("0", "0.1", "0", "0.40", 0,,,1)
}
return
 
MG_GetAction_RB_WU__:
if (!MG_IsExDefault()) {
MG_ActionStr := "ウィンドウ位置を上に移動"
}
return
 
MG_Gesture_RB_L_:
if (MG_IsTarget5()) {
;戻る
Send, ^z
} else if (MG_IsTarget6()) {
;Ctrl+Zを押す
Send, ^z
} else if (MG_IsTarget8()) {
;前のチャート組
Send, {Shift}+{F5}
} else if (!MG_IsExDefault()){
;左のタブへ移動
Send, ^+{tab}
}
return
 
MG_GetAction_RB_L_:
if (MG_IsTarget5()) {
MG_ActionStr := "戻る"
} else if (MG_IsTarget6()) {
MG_ActionStr := "Ctrl+Zを押す"
} else if (MG_IsTarget8()) {
MG_ActionStr := "前のチャート組"
} else if (!MG_IsExDefault()){
MG_ActionStr := "左のタブへ移動"
}
return
 
MG_Gesture_RB_LU_:
if (!MG_IsExDefault()) {
;ウィンドウ位置/サイズ変更 (W=0.33, H=1)
MG_WinMove("0", "0", "0.33", "0", 0,,,0)
}
return
 
MG_GetAction_RB_LU_:
if (!MG_IsExDefault()) {
MG_ActionStr := "ウィンドウ位置/サイズ変更 (W=0.33, H=1)"
}
return
 
MG_Gesture_RB_LR_:
if (MG_IsTarget4()) {
;上書き保存
Send, ^s
} else if (MG_IsTarget5()) {
;上書き保存
Send, ^s
} else if (MG_IsTarget6()) {
;セクションの実行
Send, ^{Enter}
} else if (!MG_IsExDefault()){
;広告を削除
Send, !q
Send, !q
}
return
 
MG_GetAction_RB_LR_:
if (MG_IsTarget4()) {
MG_ActionStr := "上書き保存"
} else if (MG_IsTarget5()) {
MG_ActionStr := "上書き保存"
} else if (MG_IsTarget6()) {
MG_ActionStr := "セクションの実行"
} else if (!MG_IsExDefault()){
MG_ActionStr := "広告を削除"
}
return
 
MG_Gesture_RB_LRL:
MG_Gesture_RB_LRL_:
if (!MG_IsExDefault()) {
}
return
 
MG_GetAction_RB_LRL:
MG_GetAction_RB_LRL_:
if (!MG_IsExDefault()) {
}
return
 
MG_Gesture_RB_LD_:
if (!MG_IsExDefault()) {
}
return
 
MG_GetAction_RB_LD_:
if (!MG_IsExDefault()) {
MG_ActionStr := ""
}
return
 
MG_Gesture_RB_U_:
if (!MG_IsExDefault()) {
;ウィンドウを最大化
WinMaximize
}
return
 
MG_GetAction_RB_U_:
if (!MG_IsExDefault()) {
MG_ActionStr := "ウィンドウを最大化"
}
return
 
MG_Gesture_RB_UL_:
if (!MG_IsExDefault()) {
;等速
send,!d
}
return
 
MG_GetAction_RB_UL_:
if (!MG_IsExDefault()) {
MG_ActionStr := "等速"
}
return
 
MG_Gesture_RB_UR_:
if (!MG_IsExDefault()) {
;2倍速
send,!a
}
return
 
MG_GetAction_RB_UR_:
if (!MG_IsExDefault()) {
MG_ActionStr := "2倍速"
}
return
 
MG_Gesture_RB_UD_:
if (!MG_IsExDefault()) {
;別モニターに移動
WinMaximize
Send, {Shift}+#+{Right}
}
return
 
MG_GetAction_RB_UD_:
if (!MG_IsExDefault()) {
MG_ActionStr := "別モニターに移動"
}
return
 
MG_Gesture_RB_UDUD_:
if (MG_IsTarget5()) {
;数式挿入
Send, !;
} else {
MG_Cancel()
}
return
 
MG_GetAction_RB_UDUD_:
if (MG_IsTarget5()) {
MG_ActionStr := "数式挿入"
} else {
MG_ActionStr := ""
}
return
 
MG_Gesture_RB_R_:
if (MG_IsTarget4()) {
;カット
Send, ^b
} else if (MG_IsTarget5()) {
;進む
Send, ^y
} else if (MG_IsTarget8()) {
;次のチャート組
Send, ^{F5}
} else if (!MG_IsExDefault()){
;右のタブへ移動
Send, ^{tab}
}
return
 
MG_GetAction_RB_R_:
if (MG_IsTarget4()) {
MG_ActionStr := "カット"
} else if (MG_IsTarget5()) {
MG_ActionStr := "進む"
} else if (MG_IsTarget8()) {
MG_ActionStr := "次のチャート組"
} else if (!MG_IsExDefault()){
MG_ActionStr := "右のタブへ移動"
}
return
 
MG_Gesture_RB_RL_:
if (MG_IsTarget1()) {
;Ctrl+Tを押す
Send, ^t
} else if (!MG_IsExDefault()){
;chromeを開く
Send, #+2
}
return
 
MG_GetAction_RB_RL_:
if (MG_IsTarget1()) {
MG_ActionStr := "Ctrl+Tを押す"
} else if (!MG_IsExDefault()){
MG_ActionStr := "chromeを開く"
}
return
 
MG_Gesture_RB_RU_:
if (!MG_IsExDefault()) {
}
return
 
MG_GetAction_RB_RU_:
if (!MG_IsExDefault()) {
MG_ActionStr := ""
}
return
 
 
MG_Gesture_RB_RD_:
if (!MG_IsExDefault()) {
}
return
 
MG_GetAction_RB_RD_:
if (!MG_IsExDefault()) {
MG_ActionStr := ""
}
return
 
MG_Gesture_RB_D_:
if (!MG_IsExDefault()) {
;ウィンドウを最小化
WinMinimize
}
return
 
MG_GetAction_RB_D_:
if (!MG_IsExDefault()) {
MG_ActionStr := "ウィンドウを最小化"
}
return
 
MG_Gesture_RB_DL_:
if (!MG_IsExDefault()) {
;ウィンドウを画面の左端へ移動
Send, #{Left}
}
return
 
MG_GetAction_RB_DL_:
if (!MG_IsExDefault()) {
MG_ActionStr := "ウィンドウを画面の左端へ移動"
}
return
 
MG_Gesture_RB_DU_:
if (!MG_IsExDefault()) {
;ウインドウの切り替え
If(MG_timer(5000))
    Send, {altdown}{tab}
else
    Send, {altup}
}
return
 
MG_GetAction_RB_DU_:
if (!MG_IsExDefault()) {
MG_ActionStr := "ウインドウの切り替え"
}
return
 
MG_Gesture_RB_DUD_:
if (!MG_IsExDefault()) {
}
return
 
MG_GetAction_RB_DUD_:
if (!MG_IsExDefault()) {
}
return
 
MG_Gesture_RB_DR_:
if (!MG_IsExDefault()) {
;ウィンドウを画面の右端へ移動
Send, #{Right}
}
return
 
MG_GetAction_RB_DR_:
if (!MG_IsExDefault()) {
MG_ActionStr := "ウィンドウを画面の右端へ移動"
}
return
 
MG_Gesture_RB_B_:
if (!MG_IsExDefault()) {
;2倍速
send,!a
}
return
 
MG_GetAction_RB_B_:
if (!MG_IsExDefault()) {
MG_ActionStr := "2倍速"
}
return
 
MG_Gesture_RB_S_:
if (!MG_IsExDefault()) {
;2倍速
send,!a
}
return
 
MG_GetAction_RB_S_:
if (!MG_IsExDefault()) {
MG_ActionStr := "2倍速"
}
return
 
 
MG_IsHookEnabled_RB() {
global
MG_TriggerCount ? : MG_GetMousePosInfo()
return (MG_RB_Enabled && (MG_TriggerCount || (!MG_IsDisable())))
}
 
MG_IsHookEnabled_LB() {
global
return (MG_LB_Enabled && MG_TriggerCount)
}
 
MG_IsHookEnabled_WU() {
global
return (MG_WU_Enabled && MG_TriggerCount)
}
 
MG_IsHookEnabled_WD() {
global
return (MG_WD_Enabled && MG_TriggerCount)
}
 
MG_IsHookEnabled_A() {
global
return (MG_A_Enabled && MG_TriggerCount)
}
 
MG_IsHookEnabled_B() {
global
return (MG_B_Enabled && MG_TriggerCount)
}
 
MG_IsHookEnabled_C() {
global
return (MG_C_Enabled && MG_TriggerCount)
}
 
MG_IsHookEnabled_D() {
global
return (MG_D_Enabled && MG_TriggerCount)
}
 
MG_IsHookEnabled_S() {
global
return (MG_S_Enabled && MG_TriggerCount)
}
 
 
PgUp::MG_ToggleEnable()
Hotkey, PgUp,, P8
 
 
MG_Config_end:

*1:MG_Exe="iexplore.exe") || (MG_Exe="msedge.exe") || (MG_Exe="chrome.exe") || (MG_Exe="firefox.exe"

*2:MG_WClass="CabinetWClass") || (MG_WClass="ExploreWClass") || (MG_WClass="Progman") || (MG_WClass="WorkerW"

*3:MG_TreeListHitTest())))

}
 
MG_IsTarget4() {
global
return ((MG_WClass="Qt5152QWindowIcon"

*4:MG_WClass="PPTFrameClass"

*5:MG_WClass="SunAwtFrame"

*6:MG_WClass="OpusApp"

*7:MG_WClass="MetaQuotes::MetaTrader::4.00"