Emote autohotkey star citizen
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Emote autohotkey star citizen
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
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
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
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
Re: Emote autohotkey star citizen
I moved your topic to the v2 forum.
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
Thank you
- DuckingQuack
- Posts: 219
- Joined: 20 Jan 2023, 18:20
Re: Emote autohotkey star citizen
@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}"
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
The Duck
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
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
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
- DuckingQuack
- Posts: 219
- Joined: 20 Jan 2023, 18:20
Re: Emote autohotkey star citizen
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
The Duck
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
Nice I'll give that a shot Thanks
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
the script wont execute lines while in sc, outside of sc the lines execute looking at the log.
what does that mean?
what does that mean?
- DuckingQuack
- Posts: 219
- Joined: 20 Jan 2023, 18:20
Re: Emote autohotkey star citizen
I feel bad for not noticing this earlier, but you’re missing the curly brackets around F12 {F12}
Best of Luck,
The Duck
The Duck
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
referring to my last post:
I was just trying to use a simple script to see if I could get another working
I was just trying to use a simple script to see if I could get another working
Code: Select all
1::
{
SendEvent "2"
return
}
- DuckingQuack
- Posts: 219
- Joined: 20 Jan 2023, 18:20
Re: Emote autohotkey star citizen
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
The Duck
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
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
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
- DuckingQuack
- Posts: 219
- Joined: 20 Jan 2023, 18:20
Re: Emote autohotkey star citizen
that says it exited... are you using a script you posted already? If not, can you post it?
Best of Luck,
The Duck
The Duck
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
Code: Select all
SetKeyDelay (250)
1::
{
SendEvent "2"
return
}
-
- Posts: 13
- Joined: 25 Mar 2023, 14:20
Re: Emote autohotkey star citizen
Jumping ship on this, just use voice attack it works with SC