How do I simulate a keystroke with another keystroke

Get help using Construct 2

Post » Tue Nov 10, 2015 5:09 pm

No action within construct. The action is happening outside in the dmx-software.

It's a game, someone is playing. Without any other person there, who is the light-jockey, who presses the key which sets the lights.
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue Nov 10, 2015 5:16 pm

So how should the dmx-software know a key that isn't being pressed is virtually pressed inside another program?
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Tue Nov 10, 2015 7:57 pm

Thats exactly my task, i have to solve. There are lots of less powerful programs than construct is, which can do that. So, i thought, there might be away. No way?
B
5
S
1
Posts: 45
Reputation: 463

Post » Tue Nov 10, 2015 11:00 pm

You can't do that in construct, since it runs with html5/javascript and it would be a security violation to let stuff that runs on a webpage simulate keystrokes as if the user pressed it.
To do it you'd have to use something much lower level that has access to the winapi, and even then simulating a keystroke in another program is kind of hacky.
B
94
S
33
G
118
Posts: 5,395
Reputation: 75,851

Post » Wed Nov 11, 2015 11:16 am

Maybe you'll have some luck with autohotkey. I believe it can simulate a keystroke when a string is copied to the clipboard.
B
13
S
5
G
1
Posts: 116
Reputation: 1,805

Post » Thu Nov 12, 2015 1:40 pm

Ok, I understand. I will check the autohotkey thing and if that doesn't work either, I will a look for a workaround.

Thanks all for your help!

Held
B
5
S
1
Posts: 45
Reputation: 463

Previous

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 19 guests