Game doesn't respond to Send. But does for ::.

Ask gaming related questions (AHK v1.1 and older)
FadingDuch
Posts: 55
Joined: 04 Oct 2021, 05:43

Game doesn't respond to Send. But does for ::.

Post by FadingDuch » 01 Jul 2022, 11:34

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.

Code: Select all

$q::9
return
Would be nice to get some advice(s) of how to send those key to the game.
Last edited by FadingDuch on 02 Jul 2022, 01:36, edited 1 time in total.

User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: Game doesn't respond to Send. But does for ::.

Post by mikeyww » 01 Jul 2022, 11:46

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

FadingDuch
Posts: 55
Joined: 04 Oct 2021, 05:43

Re: Game doesn't respond to Send. But does for ::.

Post by FadingDuch » 01 Jul 2022, 11:53

mikeyww wrote:
01 Jul 2022, 11:46
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
I did. It works in Notepad and Mozilla.
And

Code: Select all

^RButton::MButton
works too. For me it looks like :: has some huge differences with Send.
Last edited by FadingDuch on 01 Jul 2022, 12:06, edited 1 time in total.

User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: Game doesn't respond to Send. But does for ::.

Post by mikeyww » 01 Jul 2022, 12:04

In that case, I would look at the games link.

FadingDuch
Posts: 55
Joined: 04 Oct 2021, 05:43

Re: Game doesn't respond to Send. But does for ::.

Post by FadingDuch » 01 Jul 2022, 12:08

mikeyww wrote:
01 Jul 2022, 12:04
games link.
What do you mean? Other sites, forums and stuff?

User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: Game doesn't respond to Send. But does for ::.

Post by mikeyww » 01 Jul 2022, 12:09

I posted two links. It's the second one.

FadingDuch
Posts: 55
Joined: 04 Oct 2021, 05:43

Re: Game doesn't respond to Send. But does for ::.

Post by FadingDuch » 01 Jul 2022, 12:22

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.

User avatar
mikeyww
Posts: 26596
Joined: 09 Sep 2014, 18:38

Re: Game doesn't respond to Send. But does for ::.

Post by mikeyww » 01 Jul 2022, 13:06

I'm out of ideas for you! Others may chime in with more suggestions.

User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: Game doesn't respond to Send. But does for ::.

Post by boiler » 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.

Descolada
Posts: 1098
Joined: 23 Dec 2021, 02:30

Re: Game doesn't respond to Send. But does for ::.

Post by Descolada » 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

FadingDuch
Posts: 55
Joined: 04 Oct 2021, 05:43

Re: Game doesn't respond to Send. But does for ::.

Post by FadingDuch » 02 Jul 2022, 01:05

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.

User avatar
Xtra
Posts: 2744
Joined: 02 Oct 2015, 12:15

Re: Game doesn't respond to Send. But does for ::.

Post by Xtra » 02 Jul 2022, 01:45

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

FadingDuch
Posts: 55
Joined: 04 Oct 2021, 05:43

Re: Game doesn't respond to Send. But does for ::.

Post by FadingDuch » 02 Jul 2022, 12:07

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

FadingDuch
Posts: 55
Joined: 04 Oct 2021, 05:43

Re: Game doesn't respond to Send. But does for ::.

Post by FadingDuch » 02 Jul 2022, 12:25

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.

User avatar
Xtra
Posts: 2744
Joined: 02 Oct 2015, 12:15

Re: Game doesn't respond to Send. But does for ::.

Post by Xtra » 02 Jul 2022, 12:44

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.

Post Reply

Return to “Gaming Help (v1)”