; Marco Recorder v1.3b created by ___x@___ | 01/11/12 ;~ feedback ;~ ################################Settings################################## #NoEnv #UseHook #SingleInstance, Off SetBatchLines,-1 CoordMode,Mouse,Screen SetMouseDelay,-1 SetWinDelay, -1 DetectHiddenWindows, On #MaxThreadsBuffer On #MaxHotkeysPerInterval 1000000 #HotkeyInterval 60000 SendMode, Input SetKeyDelay, -1 Send {help} BlockType := "MouseMove" KeyList := "'|,|-|.|/|0|1|2|3|4|5|6|7|8|9|;|=|[|\|]|``|a|AppsKey|b|Backspace|c|CapsLock|CtrlBreak|d|Del|Down|e|End|Enter|Esc|f|F1|F10|F11|F12|F2|F3|F4|F5|F6|F7|F8|F9|g|h|Home|i|Ins|j|k|l|Left|m|n|Numpad0|Numpad1|Numpad2|Numpad3|Numpad4|Numpad5|Numpad6|Numpad7|Numpad8|Numpad9|NumpadAdd|NumpadAdd|NumpadClear|NumpadDel|NumpadDiv|NumpadDiv|NumpadDot|NumpadDown|NumpadEnd|NumpadEnter|NumpadEnter|NumpadHome|NumpadIns|NumpadLeft|NumpadMult|NumpadMult|NumpadPgDn|NumpadPgUp|NumpadRight|NumpadSub|NumpadSub|NumpadUp|o|p|PgDn|PgUp|PrintScreen|q|r|Right|s|Space|t|Tab|u|Up|v|w|WheelDown|WheelLeft|WheelRight|WheelUp|x|y|z" InfoList := "Xpos,Ypos,LBCheck,RBCheck,MBCheck,LCtrlCheck,RCtrlCheck,LShiftCheck,RShiftCheck,LAltCheck,RAltCheck,LWinCheck,DelayTime,Skip,ClassName" global ControlButton := "LButton,RButton,MButton,LControl,RControl,LShift,RShift,LAlt,RAlt,LWin" TitleName := "Marco Recorder v1.03b by ___x@___" About := ( "Author : ___x@___ Email: anhnhoktvn@gmail.com Version : 1.03b Note: In case you can't stop while Playing, Press Ctrl+Alt+Del to exit. " ) ;~ Hotkey for fast edit Hotkey, IfWinActive, %TitleName% Hotkey, ~^a, SelectAll Hotkey, ~Del,Remove Hotkey, IfWinActive ;~ ############################Tray Menu###################################### Menu,Tray,Add,Show ,ShowWin Menu,Tray,Add,Start/Stop Recording,Record Menu,Tray,Add,Play/Pause,Play Menu,Tray,Add,Stop,Stop Menu,Tray,Add,Exit,GuiClose Menu,Tray,Default,Show Menu,Tray, NoStandard ;~ #############################Main_Gui#################################### Gui +toolwindow +AlwaysOnTop +HwndGuiID Gui, Font, s18 ,Wingdings Gui, Add, Button, x272 y10 w60 h30 gLoad,  Gui, Add, Button, x332 y10 w60 h30 gSave,  Gui, Font, s18 ,Webdings Gui, Add, Button, x17 y10 w80 h30 gRecord,  Gui, Add, Button, x97 y10 w80 h30 gPlay,  Gui, Add, Button, x177 y10 w80 h30 gStop,  Gui, Add, Button, x392 y10 w50 h30 gShowSetting,  Gui, Add, Button, x452 y10 w30 h30 gDecreaseSpeed,  Gui, Add, Button, x482 y10 w30 h30 gReturnSpeed,  Gui, Add, Button, x512 y10 w30 h30 gIncreaseSpeed,  Gui, Add, Button, x262 y45 w30 h20 gSaveHotkey,  Gui, Add, Button, x182 y505 w100 h30 gInsertRow,  Gui, Add, Button, x282 y505 w100 h30 gEditRow vEdit +Disabled,  Gui, Add, Button, x382 y505 w100 h30 gRemove vRemove +Disabled,  Gui, Add, Button, x572 y360 w30 h30 gChangeSpeed,  Gui, Font Gui, Font, s11 cB3B3B3 Gui,color,black,000010 Gui, Add, ListView, x2 y70 w650 h180 vDataLV gDataLV +NoSortHdr -LV0x10 +AltSubmit, X|Y|L|R|M|LCtrl|RCtrl|LShift|RShift|LAlt|RAlt|LWin|Delay|Keys|WinClass Name Gui, Add, Text, x552 y20 w50 h20 vSpeed gSpeed, 1.0 Gui, Add, Edit, x42 y290 w100 h20 vClassName, Gui, Add, Text, x152 y290 w20 h20 cRed gClassName, << Gui, Add, Edit, x42 y350 w50 h20 +number vXpos, 0 Gui, Add, Edit, x92 y350 w50 h20 +number vYpos, 0 Gui, Add, Text, x152 y350 w20 h20 cRed gMousePos, << Gui, Add, GroupBox, -Theme x32 y330 w150 h50 , Mouse Position (x:y) Gui, Add, GroupBox, -Theme x32 y390 w150 h110 , Mouse Button Gui, Add, CheckBox, x42 y410 w120 h30 vLBcheck, Left Click Gui, Add, CheckBox, x42 y440 w120 h30 vRBCheck, Right Click Gui, Add, CheckBox, x42 y470 w120 h25 vMBCheck, Middle Click Gui, Add, GroupBox, -Theme x32 y270 w150 h50 , Window Class Name Gui, Add, GroupBox, -Theme x192 y360 w200 h140 , Special Keys Gui, Add, CheckBox, x202 y380 w80 h30 vLCtrlCheck, Left Ctrl Gui, Add, CheckBox, x202 y410 w80 h30 vLShiftCheck, Left Shift Gui, Add, CheckBox, x202 y440 w80 h30 vLAltCheck, Left Alt Gui, Add, CheckBox, x202 y470 w120 h25 vLWinCheck, Left Window Gui, Add, CheckBox, x292 y380 w90 h30 vRCtrlCheck, Right Ctrl Gui, Add, CheckBox, x292 y410 w90 h30 vRShiftCheck, Right Shift Gui, Add, CheckBox, x292 y440 w90 h30 vRAltCheck, Right Alt Gui, Add, DropDownList, x272 y290 w110 h24 r10 vNormalKey, %KeyList% Gui, Add, Edit, x272 y320 w110 h20 Limit50 vStringKey +Disabled,___x@___ Gui, Add, GroupBox, -Theme x192 y270 w200 h80 , Normal Keys Gui, Add, Radio, x202 y290 w60 h20 vKeyRadio gKeyRadio +Checked, Key Gui, Add, Radio, x202 y320 w60 h20 vStringRadio gStringRadio, String Gui, Add, GroupBox, -Theme x402 y270 w140 h50 , Delay Time Gui, Add, Edit, x412 y290 w110 h20 +number vDelayTime, 0 Gui, Add, GroupBox, -Theme x402 y330 w210 h80 , Set Delay Time Gui, Add, Edit, x502 y350 w60 h20 +number vDelayValue, 0 Gui, Add, Edit, x502 y380 w60 h21 vDelayAdd +Disabled , 0 Gui, Add, Radio, x412 y350 w90 h20 vDelayValueRadio gDelayValueRadio +Checked, Set Value Gui, Add, Radio, x412 y380 w90 h20 vDelayAddRadio gDelayAddRadio, Add Value Gui, Add, GroupBox, -Theme x402 y420 w210 h80 , Edit/Play Mode Gui, Add, Radio, x412 y440 w100 h20 vPlayAllData +Checked, All Data Gui, Add, Radio, x412 y460 w170 h30 vPlaySelect, Only Selected Data Gui, Add, CheckBox, x672 y40 w210 h30 vHideWin +Checked, Hide When Recording/Playing Gui, Add, CheckBox, x672 y70 w250 h30 vClearData +Checked, Clear Data Before Recording/Loading Gui, Add, GroupBox, -Theme x662 y20 w270 h130 , Options Gui, Add, Hotkey, x17 y45 w80 h20 vRecordKey, F7 Gui, Add, Hotkey, x97 y45 w80 h20 vPlayKey, F8 Gui, Add, Hotkey, x177 y45 w80 h20 vStopKey, F9 Gui, Add, Text, x732 y110 w30 h20 vTopSlider, Max Gui, Add, Text, x872 y110 w20 h20 vBotSlider, Min Gui, Add, Slider, x772 y110 w100 h30 Buddy1TopSlider Buddy2BotSlider Range-2-12 vSmooth, -2 Gui, Add, Text, x672 y110 w50 h30 , Smooth Gui, Add, GroupBox, -Theme x662 y300 w270 h160 , Info Gui, Add, Text, x672 y320 w250 h120 +Center, %About% Gui, Add, GroupBox, -Theme x22 y250 w600 h300 , Gui, Add, GroupBox, -Theme x662 y160 w270 h130 , Block Input Mode Gui, Add, Radio, x682 y180 w180 h30 gBlockInputMouseMove +Checked, MouseMove Gui, Add, Radio, x682 y210 w180 h30 gBlockInputOn, All Input Gui, Add, Radio, x682 y240 w180 h30 gBlockInputOff, Off gosub, SaveHotkey Sleep 100 TrayTip, %TitleName%, % "Welcome!`nTo Start Recording, Press " HotkeyName(RecordKey) ".`nTo Play Current Record, Press " HotkeyName(PlayKey) ".", 10000 Gui, Show, h70 w580,%TitleName% SetTimer,ControlName,300 return ControlName: MouseGetPos, , ,WinID, ControlName,1 if (WinID <> GuiID) { ToolTip return } if (ControlName_Old = ControlName) return ToolTip ControlName_Old := ControlName if (ControlName = "Button1") ToolTip, Load... else if (ControlName = "Button2") ToolTip, Save as... else if (ControlName = "Button3") ToolTip, Record else if (ControlName = "Button4") ToolTip, Play else if (ControlName = "Button5") ToolTip, Stop else if (ControlName = "Button6") ToolTip, Show/Hide Settings else if (ControlName = "Button7") ToolTip, Decrease Playing Speed else if (ControlName = "Button8") ToolTip, Default Playing Speed else if (ControlName = "Button9") ToolTip, Increase Playing Speed else if (ControlName = "Button10") ToolTip, Save Hotkeys else if (ControlName = "Button11") ToolTip, Insert else if (ControlName = "Button12") ToolTip, Edit else if (ControlName = "Button13") ToolTip, Remove (Press Del) else if (ControlName = "Button14") ToolTip, Done else if (ControlName = "Button45") ToolTip,Prevent from moving Mouse while Playing else if (ControlName = "Button46") ToolTip, Prevent from using Mouse & Keyboard while Playing (Require Admin right) else if (ControlName = "Button47") ToolTip, Mouse & Keyboard are free while Playing else if (ControlName = "Static1") ToolTip, Playing Speed else if (ControlName = "Static2") ToolTip, Get Window Class Name else if (ControlName = "Static3") ToolTip, Get Mouse Position else if (ControlName = "msctls_hotkey321") ToolTip, Hotkey for Recording else if (ControlName = "msctls_hotkey322") ToolTip, Hotkey for Playing else if (ControlName = "msctls_hotkey323") ToolTip, Hotkey for Stoping else ToolTip return ~^!Del:: if !Inplay return GuiClose: Critical ExitApp return ;~ ##########Playing Speed Button######################## IncreaseSpeed: GuiControlGet,Speed, , Speed if Speed =4 return GuiControl, , Speed,% Round(Speed + 0.2,1) return Speed: return DecreaseSpeed: GuiControlGet,Speed, , Speed if Speed = 0.2 return GuiControl, , Speed,% Round(Speed - 0.2,1) return ReturnSpeed: GuiControl, , Speed,1.0 return Remove: Loop % LV_GetCount("S") LV_Delete(LV_GetNext()) return ;~ ListView Info: Get Info from a DataLV: if LV_GetCount("S") { GuiControl, Enable, Edit GuiControl, Enable, Remove } else { GuiControl, Disable, Edit GuiControl, Disable, Remove } if (A_GuiEvent <> "Normal") return Row := LV_GetNext() if !Row return RowInfo := GetLVData(Row) StringSplit, RowInfo,RowInfo,| Loop, Parse, InfoList,CSV { if A_Index = 14 continue if A_LoopField in LBCheck,RBCheck,MBCheck,LCtrlCheck,RCtrlCheck,LShiftCheck,RShiftCheck,LAltCheck,RAltCheck,LWinCheck GuiControl, ,%A_LoopField%,0 GuiControl, ,%A_LoopField%,% RowInfo%A_Index% } if !RowInfo14 { GuiControl, , StringRadio,1 GuiControl, , StringKey, GuiControl, Enable, StringKey GuiControl, Disable, NormalKey } else if (SubStr(RowInfo14,1,5) = "{RAW}") { GuiControl, , StringRadio,1 GuiControl, , StringKey, % SubStr(RowInfo14,6) GuiControl, Disable, NormalKey GuiControl, Enable, StringKey } else { GuiControl, , KeyRadio,1 GuiControl, ChooseString, NormalKey, % SubStr(RowInfo14,2,StrLen(RowInfo14)-2) GuiControl, Disable, StringKey GuiControl, Enable, NormalKey } return InsertRow: EditRow: Loop, Parse, InfoList,CSV GuiControlGet, Info%A_Index%, , %A_LoopField% GuiControlGet, KeyRadio,,KeyRadio if KeyRadio { GuiControlGet, Info14, , NormalKey if Info14 Info14 := "{" Info14 "}" } else { GuiControlGet, Info14, , StringKey if Info14 Info14 := "{Raw}" Info14 } Row := LV_GetNext() If (A_ThisLabel = "InsertRow") { if !Row Row := LV_GetCount() LV_Insert(Row +1 ,"",Info1,Info2,Info3,Info4,Info5,Info6,Info7,Info8,Info9,Info10,Info11,Info12,Info13,Info14,Info15) } else If (A_ThisLabel = "EditRow") { if Row LV_Modify(Row ,"",Info1,Info2,Info3,Info4,Info5,Info6,Info7,Info8,Info9,Info10,Info11,Info12,Info13,Info14,Info15) } Loop 15 LV_ModifyCol(A_Index,"AutoHdr") return Load: gui +OwnDialogs FileSelectFile,IniFile,,%root%,Open - %TitleName%,Mouse Record File(*.MR1) if !IniFile Return SplitPath,IniFile,,root,ext if ext<>MR1 Return TrayTip,%TitleName%,Loading..., 120000 Gui, Show, , Loading... Please Wait! Gui +Disabled FileRead,DataMouseKey,*t %IniFile% if ClearData LV_Delete() ImportLV(DataMouseKey) TrayTip,%TitleName%,Finished Loading!, 5000 Gui, Show, , %TitleName% Gui -Disabled return GetMousePos: MouseGetPos,Xpos,Ypos ToolTip,% Xpos ":" Ypos if GetKeyState("LButton","P") return SetTimer,GetMousePos,Off ToolTip GuiControl, ,Xpos,%Xpos% GuiControl, ,Ypos,%Ypos% Gui, Show return MousePos: Gui, Hide SetTimer,GetMousePos,10 return GetClassName: MouseGetPos,,,ClassName WinGetClass,ClassName,ahk_id%ClassName% ToolTip,%ClassName% if GetKeyState("LButton","P") return SetTimer,GetClassName,Off ToolTip GuiControl, ,ClassName,%ClassName% Gui, Show return ClassName: Gui, Hide SetTimer,GetClassName,10 return KeyRadio: StringRadio: GuiControl, ,%A_ThisLabel%,1 if (A_ThisLabel = "StringRadio") { GuiControl, Disable, NormalKey GuiControl, Enable, StringKey } else { GuiControl, Enable, NormalKey GuiControl, Disable, StringKey } return DelayAddRadio: DelayValueRadio: GuiControl, ,%A_ThisLabel%,1 if (A_ThisLabel = "DelayValueRadio") { GuiControl, Disable, DelayAdd GuiControl, Enable, DelayValue } else { GuiControl, Enable, DelayAdd GuiControl, Disable, DelayValue } return ChangeSpeed: GuiControlGet,TypeDelay, ,DelayValueRadio if TypeDelay GuiControlGet,Info, ,DelayValue else GuiControlGet,Info, ,DelayAdd GuiControlGet,Type, ,PlayAllData Row := 0 if Type Count := LV_GetCount() else Count := LV_GetCount("S") Loop, % Count { if Type Row := A_Index else Row := LV_GetNext(Row) LV_GetText(RowInfo,Row,13) if TypeDelay LV_Modify(Row,"Col13",Info) else LV_Modify(Row,"Col13",RowInfo+Info) } return BlockInputOn: BlockInputOff: BlockInputMouseMove: BlockType := SubStr(A_ThisLabel,11) return ShowSetting: ShowSetting := !ShowSetting if ShowSetting Loop, 47 { GuiW := 580 + A_Index*8 GuiH := 182 + A_Index*8 Sleep -1 Gui, Show, xCenter yCenter h%GuiH% w%GuiW% if A_Index = 1 TrayTip, %TitleName%,% "To select all Data ,Press Ctrl+A.`nTo Quick Delete, Press Del." } else Loop, 93 { GuiW:= 951 - A_Index*4 GuiH := 534 - A_Index*4 -A_Index Sleep -1 Gui, Show,xCenter yCenter h%GuiH% w%GuiW% } return ShowWin: if InRecord gosub, Record Gui, Show return SaveHotkey: Gui, Submit, Nohide NotHotkey := "^a" if (RecordKey="^a")||(PlayKey="^a")||(StopKey="^a") { Gui + OwnDialogs MsgBox, 48, %TitleName%, Please Choose other hotkeys! (Not Ctrl+A) TrayTip, %TitleName%, Failed to Save Hotkeys!, 5000 return } Hotkey, %RecordKey_Old%, Record, Off UseErrorLevel Hotkey, %RecordKey%, Record, On UseErrorLevel RecordKey_Old := RecordKey Hotkey, %PlayKey_Old%, Play, Off UseErrorLevel Hotkey, %PlayKey%, Play, On UseErrorLevel PlayKey_Old:=PlayKey Hotkey, %PlayKey_Old%, Play, Off UseErrorLevel Hotkey, %PlayKey%, Play, On UseErrorLevel PlayKey_Old:=PlayKey Hotkey, %StopKey_Old%, Stop, Off UseErrorLevel Hotkey, %StopKey%, Stop, On UseErrorLevel StopKey_Old:=StopKey TrayTip, %TitleName%, Saved Hotkeys!, 5000 return Save: Gui +OwnDialogs Count := LV_GetCount() DataMouseKey := "" Loop, % Count if (A_index = Count) DataMouseKey .= GetLVData(A_Index) else DataMouseKey .= GetLVData(A_Index) "`n" if !DataMouseKey { MsgBox,48, %TitleName%, Nothing to Save! return } FileSelectFile,IniFile,S,%root%,Save - %TitleName%,Mouse Record File(*.MR1) if !IniFile Return SplitPath,IniFile,,root,ext if ext<>MR1 IniFile .= ".MR1" FileDelete, %IniFile% TrayTip,%TitleName% ,Saving Data!`nPlease Wait..., 15000 FileAppend,%DataMouseKey%, %IniFile% TrayTip,%TitleName% ,Saved Data!, 15000 return PlayRecord: ToolTip DataMouseKey := LVData() GuiControlGet,Speed, , Speed PlayRecord(DataMouseKey,BlockType,InPlay,Smooth,Speed) TrayTip, %TitleName%, Stopped Playing!,1000 Gui, Show SetTimer, ControlName, 100 return Play: if InRecord return Gui, Submit, Nohide if !InPlay InPlay = 1 else If InPlay =1 { InPlay = -1 return } if HideWin Gui, Hide SetTimer, ControlName, Off TrayTip, %TitleName%,% "Started Playing `nPress " HotkeyName(StopKey) " to Stop. `n Press " HotkeyName(PlayKey) " to Pause.", 2000 SetTimer,PlayRecord,-1 return Stop: Critical if InRecord return InPlay = 0 Critical Off return HotKeyPress: Critical KeyData := "{" SubStr(A_ThisHotkey,4) "}" Critical, off return RecordMouseKey: TimeMouseMove_Old := TimeMouseMove MouseData := GetMouseMove(TimeMouseMove_Old,ControlButton) if (MouseData_old = MouseData) && (KeyData = "") return MouseData_old := MouseData RecordCount++ WinGetClass, WinClass,A MouseData_%RecordCount% := MouseData "|" TimeMouseMove_Old - TimeMouseMove "|" KeyData "|" WinClass KeyData := "" TimeMouseMove := A_TickCount return Record: if InPlay return ToolTip if InRecord { TrayTip,%TitleName%,% "Stopped Recording!`nPress " HotkeyName(PlayKey) " to Play the Current Record.", 3000 SetTimer,RecordMouseKey,Off KeyPress(KeyList,"Off") if (MouseData_old = MouseData) { RecordCount++ MouseData_%RecordCount% := MouseData "|" TimeMouseMove_Old - TimeMouseMove "|" KeyData "|" WinClass } InRecord := 0 if ClearData DataMouseKey := "" Loop, % RecordCount if (A_Index = RecordCount) DataMouseKey .= MouseData_%A_Index% else DataMouseKey .= MouseData_%A_Index% "`n" if ClearData LV_Delete() ImportLV(DataMouseKey) Gui, Show,,%TitleName% SetTimer, ControlName, 100 return } Gui, Submit, Nohide if HideWin Gui, Hide SetTimer, ControlName, Off RecordCount := 0 Sleep 100 TrayTip,%TitleName%,% "Started Recording!`nPress " HotkeyName(RecordKey) " to Stop.", 20000 KeyPress(KeyList) TimeMouseMove := A_TickCount SetTimer,RecordMouseKey,1 InRecord := 1 return ;~ ###################################################################################################################################################### ;~ ###################################################################################################################################################### ;~ ###################################################################################################################################################### ImportLV(Data) { Loop, Parse, Data,`n { StringSplit,Info,A_LoopField,| LV_Add("",Info1,Info2,Info3,Info4,Info5,Info6,Info7,Info8,Info9,Info10,Info11,Info12,Info13,Info14,Info15) } Loop 15 LV_ModifyCol(A_Index,"AutoHdr") } GetLVData(Row) { RowInfo := "" Loop, 15 { LV_GetText(Info,Row,A_Index) if A_Index = 15 RowInfo .= Info else RowInfo .= Info "|" } return, RowInfo } GetMouseMove(ByRef TimeMouseMove,ControlButton) { MouseGetPos, x1, y1 DataInfo := x1 "|" y1 Loop, Parse, ControlButton,CSV DataInfo.= "|" GetKeyState(A_LoopField, "P") TimeMouseMove:= A_TickCount return, DataInfo } LVData() { GuiControlGet,Type, ,PlayAllData Data := "" Row := 0 if Type Count := LV_GetCount() else Count := LV_GetCount("S") Loop, % Count { if Type Row := A_Index else Row := LV_GetNext(Row) RowInfo := GetLVData(Row) if (A_Index = Count) Data .= RowInfo else Data .= RowInfo "`n" } return, Data } PlayRecord(DataMouseKey,BlockType = "MouseMove",ByRef InPlay=1,Smooth = -2,Speed = 1) { static Position := 0 BlockInput, %BlockType% loop, Parse, DataMouseKey, `n { Data_%A_index%:= A_LoopField Count := A_Index } if (InPlay=1) || (Position>=Count) Position := 0 if InPlay =-1 InPlay := 1 loop, % Count - Position { if (InPlay = 0)||(InPlay=-1) Break MoveNow := A_TickCount Count := A_index + Position StringSplit, MouseKeyInfo, Data_%Count% , | Mousemove, MouseKeyInfo1, MouseKeyInfo2, 0 CountButton := 0 Loop,Parse,ControlButton, CSV CountButton ++ CountButton += 5 WinClass := MouseKeyInfo%CountButton% if WinClass IfWinNotActive, ahk_class %WinClass% WinActivate, ahk_class %WinClass% Loop,Parse,ControlButton, CSV { if (InPlay = 0)(InPlay=-1) Break RNumber := A_Index + 2 if MouseKeyInfo%RNumber% && !WaitUp_%A_LoopField% { WaitUp_%A_LoopField% := 1 SendInput, {%A_LoopField% Down} } else if !MouseKeyInfo%RNumber% && WaitUp_%A_LoopField% { WaitUp_%A_LoopField% := 0 SendInput, {%A_LoopField% Up} } } RNumber++ if Smooth=-2 { While ( (A_TickCount - MoveNow) * Speed < MouseKeyInfo%RNumber%) if (InPlay = 0)||(InPlay=-1) Break } else While ( (A_TickCount - MoveNow) * Speed < MouseKeyInfo%RNumber%) if (InPlay = 0)||(InPlay=-1) Break else Sleep, %Smooth% RNumber++ if (MouseKeyInfo%RNumber%<> "") { SendInput,% MouseKeyInfo%RNumber% MouseKeyInfo%RNumber% :="" } } Position := Count if Inplay = 1 InPlay := 0 BlockInput, MouseMoveOff BlockInput, Off return, TimePlay } KeyPress(KeyList,State = "On") { Loop, Parse, KeyList, | Hotkey, ~*$%A_LoopField%, HotKeyPress, %State% UseErrorLevel } SelectAll: LV_Modify("", "Select") return HotkeyName(Hotkey) { StringReplace,Hotkey,Hotkey,+,Shift+ StringReplace,Hotkey,Hotkey,^,Ctrl+ StringReplace,Hotkey,Hotkey,!,Alt+ return , Hotkey }