AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

kport question

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
MadDonor



Joined: 27 Nov 2006
Posts: 10

PostPosted: Tue May 13, 2008 3:23 am    Post subject: kport question Reply with quote

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
View user's profile Send private message
xx3nvyxx



Joined: 05 Sep 2005
Posts: 86
Location: Down the hall, on your left.

PostPosted: Mon May 26, 2008 11:26 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
MadDonor



Joined: 27 Nov 2006
Posts: 10

PostPosted: Tue May 27, 2008 9:33 pm    Post subject: Reply with quote

I've tried what you did for the 2 byte keys, doesn't work Sad

thanks for being responsive to my pm though Wink
Back to top
View user's profile Send private message
xx3nvyxx



Joined: 05 Sep 2005
Posts: 86
Location: Down the hall, on your left.

PostPosted: Wed May 28, 2008 12:17 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
MadDonor



Joined: 27 Nov 2006
Posts: 10

PostPosted: Fri May 30, 2008 11:54 pm    Post subject: Reply with quote

still no luck... Confused
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group