Emote autohotkey star citizen

Ask gaming related questions
FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Emote autohotkey star citizen

Post by FlyInYourCircuit » 25 Mar 2023, 14:27

Hello Everyone,

I'm looking for some help to put together a auto hot key script for emotes in star citizen.

i have a bit of experience with python but i figure i can speed this up by asking for a bit of help.

basically i need a hot key script to run a a send text after a enter/return keystroke just by activating the hotkey

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 26 Mar 2023, 03:10

oops I posted in v1 instead of two. This what I have so far

Code: Select all

#HotIF WinActive("ahk_exe StarCitizen.exe")

>!Numpad1:: {
SendEvent "{RAlt down}F12{RAlt up}"
SendEvent "{Enter}"
Send "/bored2"
SendEvent "{Enter}"
SendEvent "{RAlt down}F12{RAlt up}"
return
}
#HotIf

gregster
Posts: 8886
Joined: 30 Sep 2013, 06:48

Re: Emote autohotkey star citizen

Post by gregster » 26 Mar 2023, 03:15

I moved your topic to the v2 forum.

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 26 Mar 2023, 03:46

Thank you

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Emote autohotkey star citizen

Post by DuckingQuack » 26 Mar 2023, 08:00

@FlyInYourCircuit One reason it is important to ask a question in only one thread is because you have now provided more information in a thread other than your own and anyone reading this one will not have all the information. You haven't discussed what your issue is here and therefore no one can help you solve a problem, however, in this thread you mention it does not work with the game open.
viewtopic.php?f=18&t=114168&start=40#p514409
Have you tested this outside of the game to verify that it functions as intended?
I see what you have set as your hotkey combination, but I'd like to know what buttons you are pressing. Because your hotkey being in the command could be an issue.
I tested your script with a few modifications to send in notepad (commented out the hotif and changed the alt presses to a number to keep it out of the menus) and it appears to work fine. So the problem may lie in those lines. Unfortunately since you have a working script, getting it to work with your game is not something someone else can do for you. It could be as simple as a SetKeyDelay being the solution or it could possibly not work ever.

The best way to make a script for a game is to start with one simple line like Numpad1:: SendEvent "{RAlt Down}" and see if that does what you expect. Based on what you are doing, I'm guessing it should open a dropdown menu or similar. When you get the first step working, go to the next.

Also, I'm curious why you're putting {enter} on a separate line from the the previous/next sendevent. If you want a delay of some kind, then you need to add it, otherwise those two lines can be combined.
SendEvent "{RAlt down}F12{RAlt up}{Enter}" and SendEvent "{Enter}{RAlt down}F12{RAlt up}"
Best of Luck,
The Duck

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 26 Mar 2023, 11:08

Sorry I was try to run instead of crawl lol

also I thought posts to others threads might not need approval and was trying to expedite

The hotkey is based on what my touchscreen interface puts out from the UI but I have also changed it to try a test but no go.

Yeah I think It might need some delays but also I'm not sure if the winactive string is correct.

Maybe It needs to be CRYengine or something

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Emote autohotkey star citizen

Post by DuckingQuack » 26 Mar 2023, 16:07

Use the windows spy tool that comes with ahk v2 to find the correct information for your winactive line. Open the ahk dash and click windows spy, then hover over the game window.
Best of Luck,
The Duck

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 26 Mar 2023, 16:25

Nice I'll give that a shot Thanks

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 27 Mar 2023, 22:55

the script wont execute lines while in sc, outside of sc the lines execute looking at the log.

what does that mean?

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Emote autohotkey star citizen

Post by DuckingQuack » 28 Mar 2023, 06:06

I feel bad for not noticing this earlier, but you’re missing the curly brackets around F12 {F12}
Best of Luck,
The Duck

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 28 Mar 2023, 09:18

referring to my last post:
I was just trying to use a simple script to see if I could get another working

Code: Select all

1::
{
SendEvent "2"
return
}

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Emote autohotkey star citizen

Post by DuckingQuack » 28 Mar 2023, 10:57

So you’re using the Key History log and it’s telling you that the number 1 was not pressed while the game was the active window?
Best of Luck,
The Duck

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 28 Mar 2023, 18:42

This is what It says When you open ahk while it's running the script:

Script lines most recently executed (oldest first). Press [F5] to refresh. The seconds elapsed between a line and the one after it is in parentheses to the right (if not 0). The bottommost line's elapsed time is the number of seconds since it executed.

---- C:\Users\BEEZLEBUB\Documents\SCEMOTES6.ahk
002: SetKeyDelay((250))
004: {
008: Exit (6.94)

Press [F5] to refresh.

It's like the computer sees the keypress but doesn't send event while SC is active

User avatar
DuckingQuack
Posts: 219
Joined: 20 Jan 2023, 18:20

Re: Emote autohotkey star citizen

Post by DuckingQuack » 28 Mar 2023, 20:14

that says it exited... are you using a script you posted already? If not, can you post it?
Best of Luck,
The Duck

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 28 Mar 2023, 20:43

Code: Select all

SetKeyDelay (250)
1::
{
SendEvent "2"
return
}

FlyInYourCircuit
Posts: 13
Joined: 25 Mar 2023, 14:20

Re: Emote autohotkey star citizen

Post by FlyInYourCircuit » 02 Apr 2023, 12:47

Jumping ship on this, just use voice attack it works with SC

Post Reply

Return to “Gaming”