Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Click and Send Test Tool V0.5.0 Beta Stage
- Made By Snow Flake ©
- http://www.autohotkey.com/board/user/21149-snow-flake/
- http://www.autohotkey.com/board/topic/95653-clicksend-tester/
- */
- if not A_IsAdmin
- {
- Run *RunAs "%A_ScriptFullPath%"
- ExitApp
- }
- #SingleInstance, force
- SetWorkingDir, %A_ScriptDir%
- #Persistent
- #NoEnv
- #MaxThreadsPerHotkey 1
- DetectHiddenWindows,On
- SetTitleMatchMode 2
- Start:
- MsgBox,,Game Window Select,Press Ok then. `n Place the mouse cursor over the window you want to Select. Then press the middle mouse button to get the Title.
- IfMsgBox OK
- keywait, MButton, D
- keywait, MButton
- mousegetpos, winX, winY, winid
- wingettitle, wintext, ahk_id %winid%
- MsgBox, 4,Game Window,Is this the right Game window? `n `n %wintext%
- IfMsgBox No
- goto, Start
- IfMsgBox Yes
- Gui, Add, Text,, Sleep Time (ms); 2000 is recommended:
- Gui, Add, Edit, vWaitTime, 2000
- Gui, Add, Text,, Keys (Key inside {}) or Text to send
- Gui, Add, Edit, x2 y70 w250 h20 vKex, {W} Testing!
- Gui, Add, Edit, x22 y100 w30 h20 vXX, 100
- Gui, Add, Edit, x22 y130 w30 h20 vYY, 100
- Gui, Add, Text, x2 y100 w20 h20 , X:
- Gui, Add, Text, x2 y130 w20 h20 , Y:
- Gui, Add, Text, x2 y0 w220 h20 , Sleep Time (ms)`; 2000 is recommended
- Gui, Add, Text, x2 y50 w220 h20 , Keys (Key inside {}) or Text to send
- Gui, Add, Button, x72 y170 w90 h20 gsave, Save
- Gui, Add, GroupBox, x272 y0 w330 h180 , About
- Gui, Add, Text, x282 y20 w190 h20 , Welcome to my Send and Click Tool
- Gui, Add, Text, x282 y50 w310 h30 , This Will test Different Click and Send Commands to see which commands that works best in different games.
- Gui, Add, Text, x282 y90 w310 h30 , It's highly recommended that you use this tool on a window mode of the Game or program.
- Title1 = Welcome to my Send and Click Tool
- Title2 = Made by: Snow Flake
- SetTimer, AnimateTitle, 100
- Gui, +HWndGUI_ID
- Gui, Show, w612 h199,
- return
- AnimateTitle:
- TextX := ""
- Loop,Parse,Title1,
- {
- TextX = % TextX . A_LoopField
- WinSetTitle, ahk_id %GUI_ID%, , %TextX%
- sleep, 100
- }
- sleep, 700
- TextX := ""
- Loop,Parse,Title2,
- {
- TextX = % TextX . A_LoopField
- WinSetTitle, ahk_id %GUI_ID%, , %TextX%
- sleep, 100
- }
- sleep, 700
- return
- save:
- Gui, Submit
- MsgBox Window Text: %wintext%`n Sleep Time: %WaitTime%
- msgbox,,Click and Send Test Tool V0.2.0, Running This Will Test different Click and Send types to confirm which works. `n Press F1 in game to Click test F3 Send Test `n`n Ctrl + Escape will Reload the script!
- F1:: ; Press F3 to run Click test.
- {
- KeyWait, F1, D
- SoundBeep
- Goto, ClickTest
- }
- return
- F3:: ; Press F1 to run Send test.
- {
- KeyWait, F3, D
- SoundBeep
- Goto, SendTest
- }
- return
- ClickTest: ; ========================================================================================
- {
- sleep, %WaitTime%
- ToolTip, Running Click Test,0,0
- WinActivate,%wintext%
- ToolTip, Testing Click,0,0
- Click, %XX%, 100
- sleep, %WaitTime%
- ToolTip, Testing MouseClick,0,0
- MouseClick, Left, %XX%, %YY%
- sleep, %WaitTime%
- ToolTip, Testing MouseClickDrag,0,0
- MouseClickDrag, left, 0, %XX%, %YY%, 200, 50
- sleep, %WaitTime%
- ToolTip, Testing ControlClick,0,0
- ControlClick, x%XX% y%YY%, %wintext%, Left
- sleep, %WaitTime%
- ToolTip, Testing Send Click,0,0
- Send, {Click %XX%, %YY%}
- sleep, %WaitTime%
- ToolTip, Testing SendRaw Click,0,0
- sleep, %WaitTime%
- SendRaw, {LButton}
- ToolTip, Testing SendPlay Click,0,0
- sleep, %WaitTime%
- SendPlay, {LButton}
- ToolTip, Testing SendEvent Click,0,0
- sleep, %WaitTime%
- SendEvent, {LButton}
- ToolTip, Testing SendInput Click,0,0
- sleep, %WaitTime%
- SendInput, {LButton}
- ToolTip, Testing ControlSend Click,0,0
- sleep, %WaitTime%
- ControlSend,,{Click %XX%, %YY%},%wintext%
- ToolTip, Testing ControlSendRaw Click,0,0
- sleep, %WaitTime%
- ControlSendRaw,,{Click %XX%, %YY%},%wintext%
- ToolTip, Testing PostMessage Click,0,0
- sleep, %WaitTime%
- PostMessage, 0x201, 0x00000000, 0x01f0010f, ,%wintext% ; Down
- sleep, 500
- PostMessage, 0x202, 0x00000000, 0x01f0010f, ,%wintext% ; UP
- ToolTip, Testing SendMessage Click,0,0
- sleep, %WaitTime%
- SendMessage, 0x201, 0x00000000, 0x01f0010f, , %wintext% ; Down
- sleep, 500
- SendMessage, 0x202, 0x00000000, 0x01f0010f, , %wintext% ; UP
- ToolTip, Testing ControlFocus Click,0,0
- sleep, %WaitTime%
- ControlFocus, x%XX% y%YY%, %wintext%
- ToolTip, Testing Dll Call Mouse_event,0,0
- sleep, %WaitTime%
- DllCall("mouse_event", uint, 2, int, x, int, y, uint, 0, int, 0) ; Down
- sleep, 500
- DllCall("mouse_event", uint, 4, int, x, int, y, uint, 0, int, 0) ; UP
- ToolTip, Click Test Done,0,0
- sleep, %WaitTime%
- ToolTip,
- }
- return
- SendTest: ; ========================================================================================
- {
- sleep, %WaitTime%
- ToolTip, Running Send Test,0,0
- WinActivate,%wintext%
- ToolTip, Testing %Kex% With Send,0,0
- Send, %Kex%
- sleep, %WaitTime%
- ToolTip, Testing %Kex% With SendRaw,0,0
- sleep, %WaitTime%
- SendRaw, %Kex%
- ToolTip, Testing %Kex% With SendInput,0,0
- sleep, %WaitTime%
- SendInput, %Kex%
- ToolTip, Testing %Kex% With SendPlay,0,0
- sleep, %WaitTime%
- SendPlay, %Kex%
- ToolTip, Testing %Kex% With SendEvent,0,0
- sleep, %WaitTime%
- SendEvent, %Kex%
- ToolTip, Testing %Kex% With ControlSend,0,0
- sleep, %WaitTime%
- ControlSend,,%Kex%, %wintext%
- ToolTip, Testing %Kex% With ControlSendRaw,0,0
- sleep, %WaitTime%
- ControlSendRaw,,%Kex%, %wintext%
- ToolTip, Testing Dll call keybd_event (will send 9),0,0
- sleep, %WaitTime%
- dllcall("keybd_event", int, 57, int, 0x049, int, 0, int, 0)
- sleep, 500
- dllcall("keybd_event", int, 57, int, 0x049, int, 2, int, 0)
- ToolTip, Testing %Kex% With Wscript,0,0
- sleep, %WaitTime%
- ComObjCreate("wscript.shell").SendKeys("%Kex%")
- ToolTip, Send Test Done
- sleep, %WaitTime%
- ToolTip,
- }
- return
- ^esc::Reload
Advertisement
Add Comment
Please, Sign In to add comment