Jump to content
Sign in to follow this  
ZeraKakkade

_IsPressed

Recommended Posts

ZeraKakkade

_IsPressed($sHexKey[, $vDLL = 'user32.dll'])

i cant find the values for $sHexKey

where can i find the key list?

thanks

Share this post


Link to post
Share on other sites
Kerros

help file "ASCII Characters."


Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites
ZeraKakkade

hmm i know the list but thats the wrong o.o

While 1
$msg = GUIGetMsg()

If _IsPressed("105", $dll) Then
MsgBox(0,"_IsPressed", "End Key Pressed")
iKey()
EndIf

wend




Func iKey()
    if Not WinActive("ChatFenster") Then _open_inventar()
EndFunc



Func _open_inventar()
    if WinExists("Inventar") Then
    GUIDelete($window_inventar)
    Return
    EndIf
    
    $window_inventar = GUICreate("Inventar",600,400,-1,50,$WS_POPUPWINDOW,-1,$GameMenu)
    $win_inventar_bg = GUICtrlCreatePic("texture\common\inventar.bmp",0,22,600,378,$SS_CENTERIMAGE)
    $win_titlebar_inventar = GUICtrlCreatePic("texture\common\titlebar_inventar.bmp",0,0,150,22,-1,$GUI_WS_EX_PARENTDRAG)
    $win_titlebar_a_inventar = GUICtrlCreatePic("texture\common\titlebar.bmp",150,0,450,22,-1,$GUI_WS_EX_PARENTDRAG)
    GUISetState()
    
EndFunc

press the i button to open the inventar but it doesnt work!

i know a other list in the old version of autoit but they left in the new version -.-

need help

thanks

Share this post


Link to post
Share on other sites
SmOke_N

1. Your code doesn't make much sense.

2. What is "105"?

3. For _IsPressed() use the Hex values.

Edit Example:

#include <misc.au3>

While 1
    If _IsPressed('23') Then MsgBox(64, "Info", "End button pressed")
    Sleep(10)
WEnd
Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
ZeraKakkade

1. for he sense u need the complete code!

2. helpfile ASCII Characters "i | 105 | 69 | Lowercase i"

3. i know this example but where can i find the hex number???

if i use a hotkey it works. i press the i button and the inventar is open.

Share this post


Link to post
Share on other sites
Kerros

105 is the decimal number for the lower case i. 69 is the hex char.

Taken from the help file ASCII Character Codes

Char Dec Hex Description

i 105 69 Lowercase i

Ok, after trying this as well, it appears that the hex values listed in the help file are not correct for _IsPressed. The values needed are for the virtual keyboard values. The website that XinLu provided does list the correct values.

for the letter i, the value to use is 49.

Kerros

Edited by Kerros

Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×