AutoHotkey Community

It is currently May 26th, 2012, 7:02 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: change language hotkey
PostPosted: May 23rd, 2009, 11:58 pm 
Offline

Joined: June 7th, 2007, 1:33 pm
Posts: 1019
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 4:48 pm 
Offline

Joined: June 7th, 2007, 1:33 pm
Posts: 1019
anyone please ?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 26th, 2009, 5:00 pm 
Offline

Joined: May 24th, 2009, 1:23 pm
Posts: 89
Location: Bærum, Norway
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 7th, 2010, 12:49 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 7th, 2010, 3:28 pm 
Offline

Joined: May 24th, 2009, 1:23 pm
Posts: 89
Location: Bærum, Norway
Nice! Your way is very useful.

_________________
Better burden you cannot carry than man-wisdom much -- Hávamál


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2010, 9:02 pm 
Offline

Joined: November 4th, 2007, 3:58 pm
Posts: 36
can you tell me please the full script for SCROLL shortcut?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2010, 10:26 pm 
Quote:
can you tell me please the full script for SCROLL shortcut?

I also would like to know.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: September 14th, 2010, 8:10 am 
Offline

Joined: May 24th, 2009, 1:23 pm
Posts: 89
Location: Bærum, Norway
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. ;)

_________________
Better burden you cannot carry than man-wisdom much -- Hávamál


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: dra, Exabot [Bot], rbrtryn and 60 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group