ribo75016 Posted November 2, 2020 Posted November 2, 2020 Hi, I would like to use send function to simulate a keypress on ² key, ie key below Escape but I dont know how to do it. 222 is the reply from _IsPressed function but I cant simulate this ? Regards
Developers Jos Posted November 2, 2020 Developers Posted November 2, 2020 (edited) 18 minutes ago, ribo75016 said: but I dont know how to do it. Welcome, so what have you tried that isn't working? Also which key do you means as the keyboards are different in each country and have no idea what you mean with : 18 minutes ago, ribo75016 said: send function to simulate a keypress on ² key, ie key below Escape but I dont know how to do it. Edited November 2, 2020 by 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.
Werty Posted November 2, 2020 Posted November 2, 2020 Is it the key used to bring up (down) the game console so you can type game cheatcodes ? Some guy's script + some other guy's script = my script!
ribo75016 Posted November 2, 2020 Author Posted November 2, 2020 My keyboard is azerty, so it's the key left to '1234..', below Escape and above Tab So 'n' or '2' on this picture, and it's used to swap bars in my app
ribo75016 Posted November 2, 2020 Author Posted November 2, 2020 I used this code to catch keycode, and result is 222 : Quote #include <misc.au3> While 1 sleep(10) For $i = 0 to 255 if (_IsPressed(Hex($i))) Then MsgBox(0, "", "You pressed the: " & Chr($i) & " Key!" & @CRLF & "Which would be polled with: _Ispressed(" & $i & ")") EndIf Next WEnd I tried a send(asc('222')) without success
jchd Posted November 2, 2020 Posted November 2, 2020 What about Send("²") This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)
Nine Posted November 2, 2020 Posted November 2, 2020 (edited) #include <WinAPISys.au3> _WinAPI_Keybd_Event(222, 0) _WinAPI_Keybd_Event(222, $KEYEVENTF_KEYUP) It is not always the same character, depends on the KB. Mine is '#'... Edited November 2, 2020 by Nine “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
ribo75016 Posted November 2, 2020 Author Posted November 2, 2020 Quote What about Send("²") Damned, so obvious I dont even think about it ! Seems working, I gonna check this asap in my app, thank you very much, feel stupid
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