tomashen Posted February 13, 2012 Share Posted February 13, 2012 ok i found something.I hope im not braking any rules now :| but how do i know what value to put for other keys _SendKeys($HWnD , "{0}") expandcollapse popupFunc _SendKeys($hWnd, $keys) If $hWnd <= 0 Or StringLen($keys) = 0 Then SetError(-1) Return False EndIf $keys = StringUpper($keys) $keys = StringReplace($keys, "`", Chr($VK_OEM_3)) $keys = StringReplace($keys, "~", Chr($VK_OEM_3)) $keys = StringReplace($keys, "-", Chr($VK_OEM_MINUS)) $keys = StringReplace($keys, "=", Chr($VK_OEM_PLUS)) $keys = StringReplace($keys, "{ENTER}", Chr(0xD)) $keys = StringReplace($keys, "{TAB}", Chr(0x9)) $keys = StringReplace($keys, "{ESC}", Chr($VK_ESC)) $keys = StringReplace($keys, "{F5}", Chr($VK_F5)) $keys = StringReplace($keys, "{F12}", Chr($VK_F12)) $keys = StringReplace($keys, "{SHIFT}", "+") $keys = StringReplace($keys, ".", Chr($VK_Period)) $keys = StringReplace($keys, ";", Chr($VK_SEMICOLON)) $keys = StringReplace($keys, "{0}", Chr(0x48)) ; i put this in myself but doesnt work :/ this dec value ;$keys = StringReplace($keys, ":", chr($VK_SEMICOLON)) Local $i, $ret Local $shiftdown = False For $i = 1 To StringLen($keys) If StringMid($keys, $i, 1) = "+" Then DllCall("user32.dll", "int", "PostMessage", "hwnd", $hWnd, "int", 0x100, "int", 0x10, "long", 0x002A0001) DllCall("user32.dll", "int", "PostMessage", "hwnd", $hWnd, "int", 0x100, "int", 0x10, "long", 0x402A0001) $shiftdown = True Sleep(1) ContinueLoop Else $ret = DllCall("user32.dll", "int", "MapVirtualKey", "int", Asc(StringMid($keys, $i, 1)), "int", 0) If IsArray($ret) Then DllCall("user32.dll", "int", "PostMessage", "hwnd", $hWnd, "int", 0x100, "int", Asc(StringMid($keys, $i, 1)), "long", _MakeLong(1, $ret[0])) Sleep(1) DllCall("user32.dll", "int", "PostMessage", "hwnd", $hWnd, "int", 0x101, "int", Asc(StringMid($keys, $i, 1)), "long", _MakeLong(1, $ret[0]) + 0xC0000000) EndIf EndIf If $shiftdown Then Sleep(1) DllCall("user32.dll", "int", "PostMessage", "hwnd", $hWnd, "int", 0x101, "int", 0x10, "long", 0xC02A0001) $shiftdown = False EndIf Next Return True EndFunc Proud of AutoIt Proud of MySelf :) Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2012 Developers Share Posted February 13, 2012 ok i found something.I hope im not braking any rules now :|but how do i know what value to put for other keysSo you spend a whole 30 minutes to find this example and research how this is working and what to put in for Hex codes...right? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
tomashen Posted February 13, 2012 Author Share Posted February 13, 2012 i tryed all codes hex dec and oct non work when i put _SendKeys($HWnD , "{0}") please dont be so hard on me lol i barely know this dll stuf i think you should be supportive :/ Proud of AutoIt Proud of MySelf :) Link to comment Share on other sites More sharing options...
Developers Jos Posted February 13, 2012 Developers Share Posted February 13, 2012 please dont be so hard on me lol i barely know this dll stuf i think you should be supportive :/I am trying to make something clear to you but you seem not to be capable to get the message.I am going to give you 3 days to do some actual work yourself. during that period you will not be able to post.Only come back when you demonstrate some effort and actually comprehend the subject.Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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