| View previous topic :: View next topic |
| Author |
Message |
mugz
Joined: 14 Sep 2004 Posts: 7 Location: Moscow
|
Posted: Tue Sep 14, 2004 12:43 pm Post subject: english keys under russian layout |
|
|
this script works under english keyboard layout, but don't under russian
(application understands 'u' as russian 'ge' - it is located on the same button)
| Code: |
~^!c::
IfWinActive, Axapta
Send, {ALTDOWN}m{ALTUP}c{ENTER}u
Exit
|
_________________ http://belugin.info |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Sep 14, 2004 1:28 pm Post subject: |
|
|
When you change layouts via the toolbar or OS hotkey, I believe it only affects the active window. So try opening the script by double-clicking its tray icon, then change its layout to reflect the layout of the previously active window.
Does having both the script and your active window set to the same layout resolve this problem? |
|
| Back to top |
|
 |
mugz
Joined: 14 Sep 2004 Posts: 7 Location: Moscow
|
Posted: Wed Sep 15, 2004 7:17 am Post subject: no |
|
|
| Chris wrote: |
Does having both the script and your active window set to the same layout resolve this problem? |
no - when i do so script sends || instead of english characters.
I need, that script do not emulate keypress under current layout, but emulate keypress under english layout.
can it be achieved? _________________ http://belugin.info |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Wed Sep 15, 2004 12:04 pm Post subject: |
|
|
Although I could add a built-in variable (e.g. A_Layout) that reflects the current language of the script itself, I haven't discovered any way to ask some other window what it's current language is. Still, it's probably better than nothing so I will add it to the to-do list.
When added, you would have to change the script's layout as well. Maybe there needs to be a built-in command to change layout for the script itself, though it seems you could automate this with the following: | Code: | #z::
ListLines ; Shows the script's main window.
Send, !{shift} ; Use the OS language hotkey to change languages
WinHide, A
if Layout = E
Layout = R
else
Layout = E
return |
In fact, I think the above example can already work for you: Whenever you change the layout to Russian (or want the script to KNOW that you're typing in Russian), press a hotkey like the above. Then modify your other hotkey to do this:
| Code: | ~^!c::
if Layout <> E ; i.e. it's blank or R
return ; do nothing
IfWinActive, Axapta
Send, {ALTDOWN}m{ALTUP}c{ENTER}u
Exit |
|
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Wed Sep 15, 2004 12:53 pm Post subject: |
|
|
| Won't the currently used layout reflect somewhere within the registry ? |
|
| Back to top |
|
 |
|