 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
MadDonor
Joined: 27 Nov 2006 Posts: 10
|
Posted: Tue May 13, 2008 3:23 am Post subject: kport question |
|
|
Hi all
I was efz-gamer, i didn't remember my login yesterday
I looked into kport and it now sort of works after windows finally registering the kport service after about 10 restarts...
anyways the problem i have is now that certain keys get "stuck down", like how windows sometimes screw up the ctrl or shift key and you have to physically press the key to release it
i send repeated loops of 54a (down-forward-attack) in a fighting game, with 2 sec intervals.
it looks like
| Code: |
loop
{
down-D() ;press 5 (which i called down direction) DOWN
sleep 50
left-D()
sleep 50
down-U() ; release 5
keyA-D()
sleep 50 ; note there's an overlap between the down motion and forward motion because the game requires an rotation on a joypad
left-U()
keyA-U()
sleep 2000
}
|
so even though each of the BREAK codes are sent like every 2 seconds, the keys still get stuck down and i have to physically press it to get it "unstuck"
is there a way to fix this?
2. also another question
I have no experience in any sort of programming other than javascript, php, and of course ahk.
all my code is derived from examples found on this page
http://www.autohotkey.com/forum/viewtopic.php?t=829&postdays=0&postorder=asc&start=120
mostly by xx3nvyxx
now here's the noobie question: why is there an underscore and the @8 in Kport\_Outportb@8? ( I also tried it without them and it didn't work)
is it the way that the demo is compiled (like the author of the demo program just added _ and @8 as part of the function name or is it something else?
3.
how would you use the 2 byte keys
for example
INSERT
E0,52
E0,D2
Thanks for any input |
|
| Back to top |
|
 |
xx3nvyxx
Joined: 05 Sep 2005 Posts: 86 Location: Down the hall, on your left.
|
Posted: Mon May 26, 2008 11:26 pm Post subject: |
|
|
1. Search the forums for the solution. This can happen anytime you send keystrokes, so I'm sure others have had this problem. If you're using kport it is caused, specifically, by the fact that you are writing directly to the keyboard buffer. Modifier keys like shift are easiest to notice, but any key can become "stuck" down.
2. Using a dependency checker I discovered the function to be named "_Outportb@8". Since that is what it is called, if you try to call it by any other name it won't work. If you're curious as to why the creator decided to call the function "_Outportb@8" you should bring it up with him/her. I, personally, could care less what it's called, so long as it does what it's supposed to.
3.
| Code: | DllCall("Kport\_Outportb@8", Short, 0x64, Char, 0xD2)
DllCall("Kport\_Outportb@8", Short, 0x60, Char, 0xE0)
DllCall("Kport\_Outportb@8", Short, 0x60, Char, 0x52)
Sleep 100
DllCall("Kport\_Outportb@8", Short, 0x64, Char, 0xD2)
DllCall("Kport\_Outportb@8", Short, 0x60, Char, 0xE0)
DllCall("Kport\_Outportb@8", Short, 0x60, Char, 0xD2) |
Untested, I lost kport a few formats ago. _________________ Now the world has gone to bed,
Darkness won't engulf my head,
I can see by infra-red,
How I hate the night.
Now I lay me down to sleep,
Try to count electric sheep,
Sweet dream wishes you can keep,
How I hate the night. |
|
| Back to top |
|
 |
MadDonor
Joined: 27 Nov 2006 Posts: 10
|
Posted: Tue May 27, 2008 9:33 pm Post subject: |
|
|
I've tried what you did for the 2 byte keys, doesn't work
thanks for being responsive to my pm though  |
|
| Back to top |
|
 |
xx3nvyxx
Joined: 05 Sep 2005 Posts: 86 Location: Down the hall, on your left.
|
Posted: Wed May 28, 2008 12:17 am Post subject: |
|
|
Try this then:
| Code: |
DllCall("Kport\_Outportb@8", Short, 0x64, Char, 0xD2)
DllCall("Kport\_Outportb@8", Short, 0x60, Char, 0xE0)
Sleep 100
DllCall("Kport\_Outportb@8", Short, 0x64, Char, 0xD2)
DllCall("Kport\_Outportb@8", Short, 0x60, Char, 0x52)
Sleep 100
DllCall("Kport\_Outportb@8", Short, 0x64, Char, 0xD2)
DllCall("Kport\_Outportb@8", Short, 0x60, Char, 0xE0)
Sleep 100
DllCall("Kport\_Outportb@8", Short, 0x64, Char, 0xD2)
DllCall("Kport\_Outportb@8", Short, 0x60, Char, 0xD2) |
_________________ Now the world has gone to bed,
Darkness won't engulf my head,
I can see by infra-red,
How I hate the night.
Now I lay me down to sleep,
Try to count electric sheep,
Sweet dream wishes you can keep,
How I hate the night. |
|
| Back to top |
|
 |
MadDonor
Joined: 27 Nov 2006 Posts: 10
|
Posted: Fri May 30, 2008 11:54 pm Post subject: |
|
|
still no luck...  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|