Page 1 of 1
Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 11:34
by FadingDuch
The game is Sacred 2. Yeah, like in old days of youth.
So I've made a simple script I believed wouldn't be a problem. But it is. Here is the one:
Code: Select all
^o::
Sleep, 100
Loop,
{
Send, {9}
Sleep, 200
}
Return
It doesn't do a thing. Niether pressed 9 nor clicking. I used other Sends too with no result.
But the following one works well.
Would be nice to get some advice(s) of how to send those key to the game.
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 11:46
by mikeyww
I've not seen
LClick as a key name, but I know about
LButton.
https://www.autohotkey.com/docs/KeyList.htm#mouse-general
Test your script in Notepad first.
viewtopic.php?f=7&t=11084
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 11:53
by FadingDuch
I did. It works in Notepad and Mozilla.
And
works too. For me it looks like
:: has some huge differences with
Send.
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 12:04
by mikeyww
In that case, I would look at the games link.
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 12:08
by FadingDuch
mikeyww wrote: ↑01 Jul 2022, 12:04
games link.
What do you mean? Other sites, forums and stuff?
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 12:09
by mikeyww
I posted two links. It's the second one.
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 12:22
by FadingDuch
mikeyww wrote: ↑01 Jul 2022, 12:09
It's the second one.
I've read it. And tried all the 3.5 workarounds up to Expert one. I believe installing virtual machine is a bit beyond time waste I'm agree with to solve it.
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 13:06
by mikeyww
I'm out of ideas for you! Others may chime in with more suggestions.
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 13:26
by boiler
I'm not sure anyone else is going to have any suggestions on how to make Send, {LClick} work anywhere since it's not a thing.
Re: Game doesn't respond to Send. But does for ::.
Posted: 01 Jul 2022, 13:58
by Descolada
Try
Code: Select all
^o::
SetKeyDelay, -1
Sleep, 100
Loop,
{
Send {Blind}{9 DownR}
Sleep, 20
Send {Blind}{9 up}
Sleep, 200
Click
Sleep, 500
}
Return
Re: Game doesn't respond to Send. But does for ::.
Posted: 02 Jul 2022, 01:05
by FadingDuch
boiler wrote: ↑01 Jul 2022, 13:26
I'm not sure anyone else is going to have any suggestions on how to make
Send, {LClick} work anywhere since it's not a thing.
It doesn't send 9 to the game via
Send, that's the problem.
Re: Game doesn't respond to Send. But does for ::.
Posted: 02 Jul 2022, 01:45
by Xtra
Read here:
SetKeyDelay
PressDuration
Certain games and other specialized applications may require a delay inside each keystroke; that is, after the press of the key but before its release.
Use -1 for no delay at all (default) and 0 for the smallest possible delay (however, if the Play parameter is present, both 0 and -1 produce no delay). Omit this parameter to leave the current PressDuration unchanged.
Try using: SetKeyDelay with a duration of 50 (most games like 20-100)
Code: Select all
SetKeyDelay, 10, 50
^o::
Sleep, 100
Loop,
{
Send, 9
Sleep, 200
}
Return
Re: Game doesn't respond to Send. But does for ::.
Posted: 02 Jul 2022, 12:07
by FadingDuch
This one doesn't work.
Xtra wrote: ↑02 Jul 2022, 01:45
Code: Select all
SetKeyDelay, 10, 50
^o::
Sleep, 100
Loop,
{
Send, 9
Sleep, 200
}
Return
But that one does, I guess. Need to check abit more.
Descolada wrote: ↑01 Jul 2022, 13:58
Try
Code: Select all
^o::
SetKeyDelay, -1
Sleep, 100
Loop,
{
Send {Blind}{9 DownR}
Sleep, 20
Send {Blind}{9 up}
Sleep, 200
Click
Sleep, 500
}
Return
Re: Game doesn't respond to Send. But does for ::.
Posted: 02 Jul 2022, 12:25
by FadingDuch
Yeah, basically the script of Descolada works (even without blind). But! The first time it sends just Rclick (I wasn't sure of the button in the begginig since I have them inverted and use mouse with left hand). Not much of problem this time, but would be interesting to find out why.
Re: Game doesn't respond to Send. But does for ::.
Posted: 02 Jul 2022, 12:44
by Xtra
When testing scripts run them by themselves.
From ahk docs:
Remarks
The Click command is generally preferred over MouseClick because it automatically compensates if the user has swapped the left and right mouse buttons via the system's control panel.
You can see this by clicking "Click" in the code box.