Hello! :D Anyway I got interested with making a script to this game im playing RF online. I need help! because when I use this script on 2 notepads it is working but when I try it on RF clients it seem not to work properly, it keys 1 with the client im on 1 but not with the other or even if it's minimized.
What i want to happen is for when I press [ to press 1 on the both client! Please help :D
What i want to happen is for when I press [ to press 1 on the both client! Please help :D
I've tried this one too. Both have the same outcome. Im pulling my hair with this oneQuote:
#NoEnv
#singleInstance, Force
#MaxThreadsPerHotkey, 2
SetBatchLines, -1
DetectHiddenWindows, On
CoordMode, Mouse, Screen
CoordMode, Pixel, Screen
CoordMode, Tooltip, Screen
SetTitleMatchMode, 2
SetKeyDelay, 30,50
SetMouseDelay 10
SendMode Event
key2send = x ;<-- change this key to the key you want to actually send
timerval = -1000 ;<-- change this to the the timer interval you want
; make sure it is a negative number!
Gosub WinSetupStuff
Gosub Timer5s
Return
;=================================================
;get the game window unique instance id
;-------------------------------------------------
q:: ;<-- Setup window id
WinSetupStuff:
Suspend On
While (!GetKeyState("MButton","P"))
{ ToolTip, Left Click on your game window and press MButton to grab the window id
}
KeyWait, MButton
WinGet, vWinID,ID,A
Suspend, Off
ToolTip
vWinID = ahk_id %vWinID%
WinGetTitle, vWinName, %vWinID%
Return
;=================================================
; this is the timer that sends to the game window
;-------------------------------------------------------------------------
Timer5s:
IfWinExist, %vWinID%
{
ControlSend,,%key2send%, %vWiniD%
Sleep 100
}
SetTimer, Timer5s, %timerval%
Return
esc:: ExitApp
Quote:
#Persistent
#SingleInstance, Force
[::
WinGet, RF_Online, List, ahk_class
{
ControlSend, , 1, "ahk_id " .
sleep 1000
ControlSend, , 1, "ahk_id " .
}