AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

change language hotkey

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
azure



Joined: 07 Jun 2007
Posts: 694

PostPosted: Sat May 23, 2009 10:58 pm    Post subject: change language hotkey Reply with quote

hello

can you tell me please a script that will toggle between keyboard languages (what normally LEFT SHIFT + ALT does in WinXP) when I hit SCROLL?

however, I am not sure it is ok to have a hotkey to do this, I would prefer a hardcoded method, to associate INSERT clicking with some other action that changes keyboard language, in order not to interfere with other clicks

thanks
Back to top
View user's profile Send private message
azure



Joined: 07 Jun 2007
Posts: 694

PostPosted: Tue May 26, 2009 3:48 pm    Post subject: Reply with quote

anyone please ?
Back to top
View user's profile Send private message
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Tue May 26, 2009 4:00 pm    Post subject: Reply with quote

I think you have to use a SendMessage:
; Switch the active window's keyboard layout/language to English:
PostMessage, 0x50, 0, 0x4090409,, A ; 0x50 is WM_INPUTLANGCHANGEREQUEST.

; Switch input locale:
PostMessage, 0x51, somethingsomething

Take a look at the MSDN library, and AHK help under 'Messages'.
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
fatcrank
Guest





PostPosted: Tue Sep 07, 2010 11:49 am    Post subject: Reply with quote

Thanks for the lead, DreymaR. I used:

PostMessage, 0x50, 0x02,0,, A ; 0x50 is WM_INPUTLANGCHANGEREQUEST.

The first param (0x02) moves forward through the list of installed languages. I bound (0x04) to the shift+hotkey i'm using.

Super useful question. It's a nice alternative to the built in key combos for changing input language. They always get in the way of anyone using photoshop and it's a pain losing focus half the time by pressing the alt+shift key anyway.
Back to top
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Tue Sep 07, 2010 2:28 pm    Post subject: Reply with quote

Nice! Your way is very useful.
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
colore



Joined: 04 Nov 2007
Posts: 36

PostPosted: Sat Sep 11, 2010 8:02 pm    Post subject: Reply with quote

can you tell me please the full script for SCROLL shortcut?
Back to top
View user's profile Send private message
USER_Fogus
Guest





PostPosted: Sat Sep 11, 2010 9:26 pm    Post subject: Reply with quote

Quote:
can you tell me please the full script for SCROLL shortcut?

I also would like to know.
Back to top
DreymaR



Joined: 24 May 2009
Posts: 89
Location: Bćrum, Norway

PostPosted: Tue Sep 14, 2010 7:10 am    Post subject: Reply with quote

For most of my scrolling needs, I simply send a WheelDown/WheelUp keypress! However, there is a Windows message to send scroll events directly:

http://msdn.microsoft.com/en-us/library/bb787577(VS.85).aspx

Doesn't always work in legacy applications, for which there is, apparently, an alternative way.

I don't want to write it up for you - do your own homework. Wink
_________________
Better burden you cannot carry than man-wisdom much -- Hávamál
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group