El-Trucha Posted January 31, 2005 Share Posted January 31, 2005 OK...I wanna make a game and I wanna know when a key is pressed so that the character moves... How?? Thanx!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 31, 2005 Share Posted January 31, 2005 OK...I wanna make a game and I wanna know when a key is pressed so that the character moves...How??Thanx!! <{POST_SNAPBACK}>UDF:_IsPressed or something like that.Search the forum for the keylogger script that's been floating around. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
El-Trucha Posted January 31, 2005 Author Share Posted January 31, 2005 I tried this and it didnt work: #include <string.au3> While 1 If _IsPressed(_StringToHex("n")) Then MsgBox(64, "See", "n was pressed") EndIf WEnd Func _IsPressed($hexKey) Local $aR, $bRv $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If $aR[0] <> 0 Then $bRv = 1 Else $bRv = 0 EndIf Return $bRv EndFunc I pressed "n" and it didnt work...why?? Thanx!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
El-Trucha Posted January 31, 2005 Author Share Posted January 31, 2005 Nvm, it worked now... Thanx all!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
layer Posted February 1, 2005 Share Posted February 1, 2005 instead of loading a dll, then unloading it... why not just use HotKeySet with the latest beta you can do like HotKeySet ("a", "MyFunc") instead of Ctrl+a... FootbaG Link to comment Share on other sites More sharing options...
El-Trucha Posted February 1, 2005 Author Share Posted February 1, 2005 U CAN do that now?? I didnt know about that!! thanx!! El-Truchahttp://www.truchasoft.tk[url="ftp://tsfc.homeftp.net"]ftp://tsfc.homeftp.net[/url]hotline://tsfc.ath.cx Link to comment Share on other sites More sharing options...
layer Posted February 1, 2005 Share Posted February 1, 2005 no problem FootbaG Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now