Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development > Front Ends > Road Runner > RR Plugins


Reply
 
Share Thread Tools Display Modes
Old 09-11-2006, 06:15 AM   #1
Maximum Bitrate
 
tolisn's Avatar
 
Join Date: Dec 2003
Location: Greece
Posts: 663
tolisn is on a distinguished road
Keyboard language indicator extension plugin

I want to make an indicator in RR which changes state when the keyboard language is changed. Is there anyway I can do this in RR (maybe an autoit script)??
__________________
The road is long but we are getting there.
tolisn is offline   Reply With Quote
Advertisement
 
Advertisement
Sponsored links

Old 09-11-2006, 10:46 AM   #2
RoadRunner Mastermind
 
guino's Avatar
 
Join Date: Nov 2004
Location: Vitória, ES - Brazil
Posts: 9,064
guino will become famous soon enoughguino will become famous soon enough
You can do this as an extension plugin, but it will probably require some funky API calls..
__________________
Ride Runner RR's Myspace

"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
guino is offline   Reply With Quote
Old 09-11-2006, 01:36 PM   #3
Maximum Bitrate
 
tolisn's Avatar
 
Join Date: Dec 2003
Location: Greece
Posts: 663
tolisn is on a distinguished road
So there is no other way of doing this apart from writting a plugin?
__________________
The road is long but we are getting there.
tolisn is offline   Reply With Quote
Old 09-11-2006, 01:44 PM   #4
Variable Bitrate
 
Evolution VIII's Avatar
 
Join Date: Dec 2005
Location: Miami-Florida-USA
Posts: 342
Evolution VIII is an unknown quantity at this point
Here we go

Code:
Option Explicit ' ' Declare API calls. ' Public Declare Function GetKeyboardLayout Lib "user32" _ (ByVal dwLayout As Long) As Long ' CopyMemory takes the value in Source, and extracts the byte ' values from the number of bytes indicated by Length from ' Source. Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _ (Destination As Any, Source As Any, ByVal Length As Long) Function LowWord(ByVal lOriginalValue As Long) As Integer ' ' Returns the low word of a Long value. Therefore, if GetKeyboardLayout ' returns the value 67699721, this function extracts the decimal ' value of the of the first word in the lOriginalValue variable, and ' returns 1033 as the value of the first word of lOriginalValue. ' ' The Long data type is a 4-byte Integer that ranges in value from ' -2,147,483,648 to 2,147,483,647. A word is two bytes long. ' CopyMemory LowWord, lOriginalValue, 2 End Function Sub test() Dim lKeyboardValue As Long Dim lResp As Long Dim lLangCode As Long Dim strLang As String ' ' Initialize lKeyboardValue to zero ' lKeyboardValue = 0 ' ' Get the Keyboard Layout value. ' lResp = GetKeyboardLayout(lKeyboardValue) ' ' Extract the language code value. ' lLangCode = LowWord(lResp) ' ' Using the Select Case statement, match the code to one of the ' standard keyboard language types available to Microsoft Windows. ' Select Case lLangCode Case 1028 strLang = "Taiwan - Chinese, Traditional" Case 1029 strLang = "Czech - Czech" Case 1030 strLang = "Denmark - Danish" Case 1031 strLang = "Germany - German" Case 1032 strLang = "Greece - Greek" Case 1033 strLang = "US - English" Case 1034 strLang = "Spain - Spanish" Case 1035 strLang = "Finland - Finnish" Case 1036 strLang = "France - French" Case 1037 strLang = "Israel - Hebrew" Case 1038 strLang = "Hungary - Hungarian" Case 1040 strLang = "Italy - Italian" Case 1041 strLang = "Japan - Japanese" Case 1042 strLang = "Korea - Korean" Case 1043 strLang = "Benelux - Dutch" Case 1044 strLang = "Norway - Norwegian" Case 1045 strLang = "Poland - Polish" Case 1046 strLang = "Brazil - Portuguese" Case 1049 strLang = "Russia - Russian" Case 1051 strLang = "Slovakia - Slovakian" Case 1053 strLang = "Sweden - Swedish" Case 1054 strLang = "Thailand - Thai" Case 1055 strLang = "Turkey - Turkish" Case 1060 strLang = "Slovenia - Slovenian" Case 2052 strLang = "China - Chinese, Simplified" Case 2057 strLang = "UK - English" Case 2060 strLang = "Benelux - French" Case 2070 strLang = "Portugal - Portuguese" Case 3081 strLang = "Australia - English" Case 3084 strLang = "Canada - French" Case 4105 strLang = "Canada - English" Case 5129 strLang = "New Zealand - English" Case 13321 strLang = "Philippines - English" Case 14345 strLang = "Indonesia - English" Case 15369 strLang = "Hong Kong SAR - English" Case 16393 strLang = "India - English" Case 17417 strLang = "Malaysia - English" Case 18441 strLang = "Singapore - English" Case 58378 strLang = "LatAm - Spanish" Case 58380 strLang = "North Africa - French" Case Else strLang = "Not listed" End Select ' ' Display a Message box with the language code and name. ' MsgBox "The Keyboard language is: " & lLangCode & ": " & strLang End Sub

Evolution VIII is offline   Reply With Quote
Old 09-11-2006, 02:18 PM   #5
Maximum Bitrate
 
tolisn's Avatar
 
Join Date: Dec 2003
Location: Greece
Posts: 663
tolisn is on a distinguished road
Thanks a million Evo but what version of autoit is this for. I keep on getting error when I try to compile
__________________
The road is long but we are getting there.
tolisn is offline   Reply With Quote
Old 09-11-2006, 02:24 PM   #6
Variable Bitrate
 
Evolution VIII's Avatar
 
Join Date: Dec 2005
Location: Miami-Florida-USA
Posts: 342
Evolution VIII is an unknown quantity at this point
Quote: Originally Posted by tolisn View Post
Thanks a million Evo but what version of autoit is this for. I keep on getting error when I try to compile

This is VB6 code. What error are you getting?
Evolution VIII is offline   Reply With Quote
Old 09-11-2006, 02:26 PM   #7
Maximum Bitrate
 
tolisn's Avatar
 
Join Date: Dec 2003
Location: Greece
Posts: 663
tolisn is on a distinguished road
Oops!! I though it was autoit. Sorry my bad. I'll try it out with VB and let you know.
__________________
The road is long but we are getting there.
tolisn is offline   Reply With Quote
Old 09-11-2006, 02:29 PM   #8
Variable Bitrate
 
Evolution VIII's Avatar
 
Join Date: Dec 2005
Location: Miami-Florida-USA
Posts: 342
Evolution VIII is an unknown quantity at this point
Quote: Originally Posted by tolisn View Post
Oops!! I though it was autoit. Sorry my bad. I'll try it out with VB and let you know.

Just call "test" method from your testing app to get keyboard
Evolution VIII is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Old 09-11-2006, 02:43 PM   #9
Maximum Bitrate
 
tolisn's Avatar
 
Join Date: Dec 2003
Location: Greece
Posts: 663
tolisn is on a distinguished road
I can’t place the code in a VB6 project. Don’t laugh I’m not a programmer.
Could you please insert the above code in a VB project and post the project ready to compile?
__________________
The road is long but we are getting there.
tolisn is offline   Reply With Quote
Old 09-11-2006, 03:51 PM   #10
Variable Bitrate
 
Evolution VIII's Avatar
 
Join Date: Dec 2005
Location: Miami-Florida-USA
Posts: 342
Evolution VIII is an unknown quantity at this point
Quote: Originally Posted by tolisn View Post
I can’t place the code in a VB6 project. Don’t laugh I’m not a programmer.
Could you please insert the above code in a VB project and post the project ready to compile?

Here we go. But, what are you going to do with that if you are not a programmer?
Attached Files
File Type: zip getkeyboard.zip (2.7 KB, 127 views)

Last edited by Evolution VIII; 09-11-2006 at 03:55 PM.
Evolution VIII is offline   Reply With Quote
Old 09-12-2006, 12:04 AM   #11
Maximum Bitrate
 
tolisn's Avatar
 
Join Date: Dec 2003
Location: Greece
Posts: 663
tolisn is on a distinguished road
Thank you for all your time. I really appreciate it. I can code just enough to use what you have just provided. Thank you again
__________________
The road is long but we are getting there.
tolisn is offline   Reply With Quote
Old 09-12-2006, 02:15 AM   #12
Constant Bitrate
 
Join Date: Nov 2004
Location: France
Posts: 189
grave is on a distinguished road
Go D6 Name thread and see last post of yesterday about VOSK : virtual Keyboard that use Windows'one with transparency so his configuration is the same your real keybord.
grave is offline   Reply With Quote
Old 09-12-2006, 06:00 AM   #13
Maximum Bitrate
 
tolisn's Avatar
 
Join Date: Dec 2003
Location: Greece
Posts: 663
tolisn is on a distinguished road
I tried out the code and it works great. I’m having a problem when I compile the code and make an .exe file. When I run the code from within VB everything goes OK but when I run the compiled file, the code does not do what it is supposed to do.

In brief, the program checks for the keyboard language. If it is Greek, it will copy a file from a source directory to a destination directory. If the keyboard language is not Greek it will erase the file in the destination directory. When the code is executed from within VB it does the above. When it is executed from the compiled file it does not. What am I doing wrong ?
Attached Files
File Type: zip Keyboardcheck.zip (8.0 KB, 80 views)
__________________
The road is long but we are getting there.
tolisn is offline   Reply With Quote
Old 09-12-2006, 08:42 AM   #14
RoadRunner Mastermind
 
guino's Avatar
 
Join Date: Nov 2004
Location: Vitória, ES - Brazil
Posts: 9,064
guino will become famous soon enoughguino will become famous soon enough
Try c:\ instead of c:/ on the paths.. other than that, if it still doesn't work, remove exit_prog from form load and see if it works (should show a window then).
__________________
Ride Runner RR's Myspace

"Being happy is not about having what you want, it's about wanting what you have."
"The best things in life are always free - but that doesn't mean money can't buy you good things."
guino is offline   Reply With Quote
Old 09-12-2006, 08:57 AM   #15
Maximum Bitrate
 
tolisn's Avatar
 
Join Date: Dec 2003
Location: Greece
Posts: 663
tolisn is on a distinguished road
I tried both of your suggestion Guino both still nothing

When I run the .exe I can see the keyboard language change to English, even if it was set to Greek. Why is it doing that? The program runs fine in VB. It does not change the keyboard language and does what it is suppose to do.
__________________
The road is long but we are getting there.
tolisn is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Download destinator voice and language packs here miagi Map Monkey 44 05-22-2009 02:51 PM
RR 03-12-05 .. Keyboard Support ... guino Road Runner 26 03-15-2005 02:48 AM
Destinator v3 Frontend: Keyboard Language (English -> Swedish) sauf Map Monkey 10 02-13-2005 08:28 PM
Winamp LCD display plugin / IRMan plugin - together? Jarrod Software & Software Development 9 06-03-2002 06:39 AM
Keyboard Plugin for Winamp Kevin Software & Software Development 6 08-21-2000 10:43 AM



All times are GMT -5. The time now is 06:10 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics