Stickies
« AutoHotkey language change hotkey is not working »

Welcome Guest. Please Login or Register.
Feb 23rd, 2018, 4:02pm


Click for the

Zhorn Software Web Site

Search Knowledge Base:

Search:
  All terms Any terms  

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: AutoHotkey language change hotkey is not working  (Read 78 times)
Agat
New Member
Image


member is offline

Avatar




PM


Posts: 2
xx AutoHotkey language change hotkey is not working
« Thread started on: Feb 13th, 2018, 12:06pm »

Hi

I have a small AutoHotkey script that allows me to change languages with Ctrl+Space. It looks like this

^Space::
PostMessage, 0x50, 2, 0,, A ; 0x50 is WM_INPUTLANGCHANGEREQUEST
return

It works everywhere but inside Stickies - when sticker is opened Ctrl+Space is doing nothing and the only way to switch language is to use Windows 10 native Alt+Shift

Thank you for your the great product!
User IP Logged

Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3602
xx Re: AutoHotkey language change hotkey is not worki
« Reply #1 on: Feb 15th, 2018, 2:54pm »

Check the docs for that message smiley

https://msdn.microsoft.com/en-us/library/windows/desktop/ms632630(v=vs.85).aspx

I just used this code successfully, albeit not from AHK:

Quote:

PostMessage(hWnd, WM_INPUTLANGCHANGEREQUEST, 0x0002, 0x0);



The wParam should be 0x0002, not 0x2, and you can also use 0x0004 for going the other way (not relevant if you only have two languages of course)

Tom
User IP Logged

Agat
New Member
Image


member is offline

Avatar




PM


Posts: 2
xx Re: AutoHotkey language change hotkey is not worki
« Reply #2 on: Today at 07:56am »

Thank you for you your answer and sorry for late response

I have tried to change the script to

Code:
^Space::
PostMessage, 0x50, 0x0002, 0x0,, A ; 0x50 is WM_INPUTLANGCHANGEREQUEST
return 


But it didn't help. Unfortunately, I'm not strong in C++ and don't know what can I try to resolve this :( Maybe you have some other thoughts on this?

Thank you
User IP Logged

Tom Revell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 3602
xx Re: AutoHotkey language change hotkey is not worki
« Reply #3 on: Today at 12:36pm »

This might need someone more familiar with AHK than I am. I can tell you that my testing shows that you need to send the message to the control, and not the window, so I tried this:

PostMessage, 0x50, 0x0002, 0x0, RICHEDIT50W1;

However, it's still not working - either in quotes or not, or with or without the "1" on the end.

Can someone else with more AHK experience help out here?

Tom
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls