Issues with different input languages

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ineedh3lp
Junior Coder
Posts: 26
Joined: Thu Nov 04, 2010 1:11 am

Issues with different input languages

Post by ineedh3lp » Sat Jun 11, 2011 6:47 am

Hello!

I've got a rather annoying issue. The text MacroScheduler sends is influenced by the input language.

Let's say I want to send ; ' [ ] to a text editor. If the text editor's input language is set to RO (Romanian), Macro Scheduler sends ş ţ ă î instead of the before mentioned symbols (; ' [ ]).

But wait, it gets even more complicated... let me create a table:

Trying to send ; ' [ ] from MacroScheduler to a text editor


MacroScheduler[EN] to Notepad[EN] sends ; ' [ ]
MacroScheduler[RO] to Notepad[EN] sends < = ~ `
MacroScheduler[EN] to Notepad[RO] sends ş ţ ă î
MacroScheduler[RO] to Notepad[RO] sends ; ' [ ]

Basically, MacroScheduler and the application it interacts with need to have set the same input language to produce the desired result (in this case sending ; ' [ ]).

Is there a way to fix this? I tried to get used to it, but I can't stand it anymore.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sat Jun 11, 2011 7:29 am

Instead of sending keystrokes you can send the *exact* character by using the Ascii> command. Then it will always send the desired character regardless of the input locale.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

ineedh3lp
Junior Coder
Posts: 26
Joined: Thu Nov 04, 2010 1:11 am

Post by ineedh3lp » Sat Jun 11, 2011 7:52 am

I've checked the Ascii command, but it would be counterproductive for my job. I'm always sending different text to different applications, so getting the ascii equivalent for the text to be sent would take more time than checking and setting the same input language for all involved applications.

I guess a better approach would be finding a way to set an application's language input before sending text to it.

Thank you.

User avatar
JRL
Automation Wizard
Posts: 3526
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Mon Jun 13, 2011 12:45 pm

...getting the ascii equivalent for the text to be sent would take more time...
You could use VBScript's asc function to convert the characters to ascii for you.

Code: Select all

VBSTART
VBEND

Input>strText,Text String
Run>notepad.exe
WaitWindowOpen>Notepad*
Length>strText,vLen

Let>kk=0
Repeat>kk
  Add>kk,1
  MidStr>strText,kk,1,strChar
  VBEval>asc("%strChar%"),ASCIIchar
  Ascii>ASCIIchar
Until>kk=vLen

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts