Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; This is an AHK script.
- Gui, MacroMaker:New, , Macro Maker
- Gui, Add, Text, x10 y10, Trigger Key
- Gui, Add, Edit, x100 y10 w100 vTriggerKey
- Gui, Add, Checkbox, x210 y10 vShift, Shift
- Gui, Add, Checkbox, x260 y10 vCtrl, Ctrl
- Gui, Add, Checkbox, x310 y10 vAlt, Alt
- Gui, Add, Checkbox, x360 y10 vWin, Win
- Gui, Add, Text, x10 y40, Key State
- Gui, Add, DropDownList, x100 y40 w100 vKeyState, Down|Up
- Gui, Add, Text, x10 y70, Time in State (ms)
- Gui, Add, Edit, x100 y70 w100 vTimeInState
- Gui, Add, Text, x10 y100, Time Between Actions (ms)
- Gui, Add, Edit, x100 y100 w100 vTimeBetweenActions
- Gui, Add, Button, x10 y130 w100 gSubmit, Submit
- Gui, Show, , Macro Maker
- return
- Submit:
- Gui, Submit, NoHide
- ; Here we will process the user input
- return
- Gui, Add, Text, x10 y160, Clipboard Manipulation
- Gui, Add, DropDownList, x100 y160 w100 vClipboardManipulation, None|Copy|Paste|Cut
- Gui, Add, Text, x10 y190, Text Input
- Gui, Add, Edit, x100 y190 w200 vTextInput
- Gui, Add, Button, x10 y220 w100 gSubmit, Submit
- Gui, Show, , Macro Maker
- return
- Submit:
- Gui, Submit, NoHide
- MsgBox, You entered:`nTrigger Key: %TriggerKey%`nKey State: %KeyState%`nTime in State: %TimeInState%`nTime Between Actions: %TimeBetweenActions%`nClipboard Manipulation: %ClipboardManipulation%`nText Input: %TextInput%
- return
- Submit:
- Gui, Submit, NoHide
- FileDelete, %A_Desktop%\Macro.ahk
- KeyState := (KeyState = "Down") ? "" : " Up"
- FileAppend,
- (
- ^%TriggerKey%%KeyState%::
- ...
- ), %A_Desktop%\Macro.ahk
- MsgBox, Macro created on your desktop.
- return
- Submit:
- Gui, Submit, NoHide
- FileDelete, %A_Desktop%\Macro.ahk
- KeyState := (KeyState = "Down") ? "" : " Up"
- FileAppend,
- (
- ^%TriggerKey%%KeyState%::
- Sleep, %TimeInState%
- ...
- Sleep, %TimeBetweenActions%
- ), %A_Desktop%\Macro.ahk
- MsgBox, Macro created on your desktop.
- return
- Submit:
- Gui, Submit, NoHide
- FileDelete, %A_Desktop%\Macro.ahk
- KeyState := (KeyState = "Down") ? "" : " Up"
- FileAppend,
- (
- ^%TriggerKey%%KeyState%::
- Sleep, %TimeInState%
- if (ClipboardManipulation = "Copy")
- Send, ^c
- else if (ClipboardManipulation = "Paste")
- Send, ^v
- else if (ClipboardManipulation = "Cut")
- Send, ^x
- Send, %TextInput%
- Sleep, %TimeBetweenActions%
- ), %A_Desktop%\Macro.ahk
- MsgBox, Macro created on your desktop.
- return
- Submit:
- Gui, Submit, NoHide
- FileDelete, %A_Desktop%\Macro.ahk
- KeyState := (KeyState = "Down") ? "" : " Up"
- FileAppend,
- (
- ^%TriggerKey%%KeyState%::
- Sleep, %TimeInState%
- if (Shift = 1 and GetKeyState("Shift", "P"))
- Send, +%TriggerKey%
- if (Ctrl = 1 and GetKeyState("Ctrl", "P"))
- Send, ^%TriggerKey%
- if (Alt = 1 and GetKeyState("Alt", "P"))
- Send, !%TriggerKey%
- if (Win = 1 and GetKeyState("Win", "P"))
- Send, #%TriggerKey%
- if (ClipboardManipulation = "Copy")
- Send, ^c
- else if (ClipboardManipulation = "Paste")
- Send, ^v
- else if (ClipboardManipulation = "Cut")
- Send, ^x
- Send, %TextInput%
- Sleep, %TimeBetweenActions%
- ), %A_Desktop%\Macro.ahk
- MsgBox, Macro created on your desktop.
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement