Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21185

Confused

$
0
0
I'm trying to convert this (from autohotkey to vb6);
Code:

*Space::
Loop
{
GetKeyState, state, space, P
if State = U ; The button has been released, so stop the loop.
break
; Otherwise:
Send, {SPACE}
Sleep, 1 ; i.e. 26 ms delay between clicks. Adjust this value as needed.
}
return

into visual basic 6.0, and I'm really stuck.. I found a bunch of things about if the keystate is negative, it is being pressed, and if its positive, it's released.
But I can't seem to convert the exact code to visual basic 6.0, so if anyone could help me, I would be really thankful!
To make it clear, I want the program to check if my space bar is RELEASED, then stop the loop, otherwise SendKeys " " (space).

Thanks for any help!

Viewing all articles
Browse latest Browse all 21185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>