fmwyso Posted March 14, 2009 Share Posted March 14, 2009 (edited) Hey, I often find myself changing computers nowadays and I'm sick and tired of changing my keyboard format to Dvorak ( Because I don't use QWERTY )... I made a post on another forum, and they said that AutoIt would be able to get keys to be formatted differently ( Changing keys to different send keys )... I went with it, found that it worked beautifully ( and was very easy )... It all now works beautifully, but with one problem... The way I found easiest to make it work was to simply hotkey every key that changes from Qwerty - Dvorak, and then hotkey the key in Qwerty and just send a Dvorak alternative key... The problem I'm having now is that when I capitalize sometimes, the shift gets "stuck" and windows still thinks the shift key is clicked for some odd reason... It will un-stuck once I press either of the shift buttons, but it is something I'd like to fix ( if at all possible )... Anyway, here is essentially what I did... HotKeySet("b","bPressed") Func bPressed() HotKeySet("x") Send("x") HotKeySet("x","xPressed") EndFunc HotKeySet("B","cbPressed") Func cbPressed() HotKeySet("X") Send("X",1) HotKeySet("X","cxPressed") EndFunc -- The Send("X",1) is 1 because I tried to de-bug it and just left it when I figured out it didn't work... If that is problematic, please tell me . -- Since B-Qwerty = X-Dvorak, the function name at the bottom is cbPressed because it is capital B pressed... I can post the full code, but it is 400~ lines long and is too bulky for me to post... It is essentially the same thing as above... P.S. The Send() function... Is there any alternative in other languages? I would very much like to just implement this in a language I am familiar with, but most other functions don't seem to work as well as this one does... Same goes for HotKeySet() . [ I am familiar with c/c++, VB.NET, Delphi ( pascal ) and VC++.NET ( I count it as VERY different from C++ personally >.>... ) ] Thanks for your time, fmwyso Edited March 14, 2009 by fmwyso Link to comment Share on other sites More sharing options...
martin Posted March 14, 2009 Share Posted March 14, 2009 Hey, I often find myself changing computers nowadays and I'm sick and tired of changing my keyboard format to Dvorak ( Because I don't use QWERTY )... I made a post on another forum, and they said that AutoIt would be able to get keys to be formatted differently ( Changing keys to different send keys )... I went with it, found that it worked beautifully ( and was very easy )... It all now works beautifully, but with one problem... The way I found easiest to make it work was to simply hotkey every key that changes from Qwerty - Dvorak, and then hotkey the key in Qwerty and just send a Dvorak alternative key... The problem I'm having now is that when I capitalize sometimes, the shift gets "stuck" and windows still thinks the shift key is clicked for some odd reason... It will un-stuck once I press either of the shift buttons, but it is something I'd like to fix ( if at all possible )... Anyway, here is essentially what I did... HotKeySet("b","bPressed") Func bPressed() HotKeySet("x") Send("x") HotKeySet("x","xPressed") EndFunc HotKeySet("B","cbPressed") Func cbPressed() HotKeySet("X") Send("X",1) HotKeySet("X","cxPressed") EndFunc -- The Send("X",1) is 1 because I tried to de-bug it and just left it when I figured out it didn't work... If that is problematic, please tell me . -- Since B-Qwerty = X-Dvorak, the function name at the bottom is cbPressed because it is capital B pressed... I can post the full code, but it is 400~ lines long and is too bulky for me to post... It is essentially the same thing as above... P.S. The Send() function... Is there any alternative in other languages? I would very much like to just implement this in a language I am familiar with, but most other functions don't seem to work as well as this one does... Same goes for HotKeySet() . [ I am familiar with c/c++, VB.NET, Delphi ( pascal ) and VC++.NET ( I count it as VERY different from C++ personally >.>... ) ] Thanks for your time, fmwyso This might help. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
fmwyso Posted March 15, 2009 Author Share Posted March 15, 2009 (edited) I've ran into another small problem... It seems, for some reason, that I can't get '{', '}' and '+' to work right... Here is what I did, anyone know why it isn't working? O-o chr(124) being '}', chr(123) being '{', chr(43) being "+" When I press +, it doesn't even open up the messageboxes... Which is odd because without using any shift/capitalization, they all are the perfectly correct keys. So, [] and = work fine but {} and + are completely not working... Does anyone know why? HotKeySet(chr(123),"cfbrPressed") HotKeySet(chr(43),"ceqlPressed") HotKeySet(chr(124),"cbbrPressed") Func cbbrPressed() MsgBox(0, "bbr", "Indeed") HotKeySet(chr(43)) SendEx(chr(43)) HotKeySet(chr(43),"ceqlPressed") EndFunc Func ceqlPressed() MsgBox(0, "eql", "Indeed") HotKeySet(chr(124)) SendEx(chr(124)) HotKeySet(chr(124),"cbbrPressed") EndFunc Func cfbrPressed() MsgBox(0, "fbr", "Indeed") HotKeySet(chr(63)) SendEx(chr(63)) HotKeySet(chr(63),"cfslPressed") EndFunc The function posted worked great up until this by the way martin... Thanks . Edited March 15, 2009 by fmwyso Link to comment Share on other sites More sharing options...
martin Posted March 15, 2009 Share Posted March 15, 2009 I've ran into another small problem... It seems, for some reason, that I can't get '{', '}' and '+' to work right... Here is what I did, anyone know why it isn't working? O-o chr(124) being '}', chr(123) being '{', chr(43) being "+" When I press +, it doesn't even open up the messageboxes... Which is odd because without using any shift/capitalization, they all are the perfectly correct keys. So, [] and = work fine but {} and + are completely not working... Does anyone know why? HotKeySet(chr(123),"cfbrPressed") HotKeySet(chr(43),"ceqlPressed") HotKeySet(chr(124),"cbbrPressed") Func cbbrPressed() MsgBox(0, "bbr", "Indeed") HotKeySet(chr(43)) SendEx(chr(43)) HotKeySet(chr(43),"ceqlPressed") EndFunc Func ceqlPressed() MsgBox(0, "eql", "Indeed") HotKeySet(chr(124)) SendEx(chr(124)) HotKeySet(chr(124),"cbbrPressed") EndFunc Func cfbrPressed() MsgBox(0, "fbr", "Indeed") HotKeySet(chr(63)) SendEx(chr(63)) HotKeySet(chr(63),"cfslPressed") EndFunc The function posted worked great up until this by the way martin... Thanks .Look in the help. The hot key for '{' is '{{}' not chr(123), then '{}}' and '{+}' Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Authenticity Posted March 15, 2009 Share Posted March 15, 2009 Actually this keys always posted in combination with the shift key so it: HotKeySet('+[', "cfbrPressed") HotKeySet('{+}', "ceqlPressed") HotKeySet('+]', "cbbrPressed") Link to comment Share on other sites More sharing options...
martin Posted March 15, 2009 Share Posted March 15, 2009 Actually this keys always posted in combination with the shift key so it: HotKeySet('+[', "cfbrPressed") HotKeySet('{+}', "ceqlPressed") HotKeySet('+]', "cbbrPressed") It might be used with shift but '{{}' and '{}}' work for me and that is also what the help says. Maybe with some keyboards the shift isn't used. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
fmwyso Posted March 15, 2009 Author Share Posted March 15, 2009 For some reason... '{{}' Worked fine, but '{}}' doesn't... I switched it to '+]' and now it works perfect!! Thanks for the help everyone!! 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