Jump to content











Photo
- - - - -

[script] SetKeyboard


  • Please log in to reply
14 replies to this topic

#1 edborg

edborg

    Frequent Member

  • .script developer
  • 387 posts
  •  
    Italy

Posted 13 October 2006 - 10:05 AM

@Nuno
As reported here, the 'old' Setkeyboard script included by you in the ScriptPack does not work in WinBuilder, even after the adaptation I made as for all other scripts of the ScriptPack. :P
I thought it could conflict with the Autolocalization script, but it doesn't work either with the basic set of building scripts (no autolocalization).
It's rather important to me, as its absence makes the build almost unusable.
Can you help in pointing to me the changes to make?
Thanks :P
edborg

#2 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10545 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 13 October 2006 - 11:38 AM

I've found a usable keyboard script on openbuilder 046 - available here: http://www.boot-land...ilder/packages/

I hope this is what you're looking for, otherwise you can post your script version and I'll check what needs to be done.

Here's the script:
Attached File  Keyboard.script   11.46KB   353 downloads

Also looked into your updated scripts - you should definitively post a topic for each on the development forum and/or in the download area.. Nice work! :P


[main]

Title=Set Keyboard

Description=Change your keyboard language to fit your regional settings

Selected=True

Level=1

Author=Boot Land community

Contact=http://BootLand.pt.vu

Credits=To all of those who support free software and bernat who initially proposed a way to customize the keyboard - thanks!

Date=2006-06-28

Version=042

Locked=false



[AuthorEncoded]

authorlogo.jpg=3257,4345



[Interface]

pTextLabel3="Choose your keyboard language",1,1,48,58,222,33,9,Bold

pScrollBox1="409 English (United States)",1,4,60,97,171,21,"405 Czech","406 Danish","413 Dutch (Standard)","409 English (United States)","809 English (United Kingdom)","40C French (Standard)","80C French (Belgian)","100C French (Swiss)","C0C French (Canadian)","40B Finnish","407 German (Standard)","807 German (Swiss)","40E Hungarian","40F Icelandic","410 Italian (Standard)","414 Norwegian (Bokmal)","415 Polish","816 Portuguese (Portugal)","416 Portuguese (Brazil)","419 Russian","41B Slovak","40A Spanish (Traditional Sort)","80A Spanish (Mexican)","41D Swedish","424 Slovenian"

pTextLabel1="If your keyboard language is not found on the list box, you can post a request for adding your language in the forums.",1,1,75,133,228,60,8,Normal



[variables]

%KBDDLL%=KBDUS.DLL

%DOSKEYBKEY%=00000409

%DOSKEYBVALUE%=us

%LAYOUTTEXT%=%pScrollBox1%

%LAYOUTNAME%=@%SystemRoot%\\system32\\input.dll#$c-5000



[Process-405 Czech]

set,%KBDDLL%,KBDCZ.DLL

set,%DOSKEYBKEY%,00000405

set,%DOSKEYBVALUE%,cz

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5031



[Process-406 Danish]

set,%KBDDLL%,KBDDA.DLL

set,%DOSKEYBKEY%,00000406

set,%DOSKEYBVALUE%,dk

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5007



[Process-413 Dutch (Standard)]

set,%KBDDLL%,KBDNE.DLL

set,%DOSKEYBKEY%,00000413

set,%DOSKEYBVALUE%,nl

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5009



[Process-409 English (United States)]

set,%KBDDLL%,KBDUS.DLL

set,%DOSKEYBKEY%,00000409

set,%DOSKEYBVALUE%,us

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5000



[Process-809 English (United Kingdom)]

set,%KBDDLL%,KBDUK.DLL

set,%DOSKEYBKEY%,00000809

set,%DOSKEYBVALUE%,uk

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5025



[Process-40C French (Standard)]

set,%KBDDLL%,KBDFR.DLL

set,%DOSKEYBKEY%,0000040c

set,%DOSKEYBVALUE%,fr

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5010



[Process-80C French (Belgian)]

set,%KBDDLL%,KBDBE.DLL

set,%DOSKEYBKEY%,0000080C

set,%DOSKEYBVALUE%,be

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5002



[Process-100C French (Swiss)]

set,%KBDDLL%,KBDSF.DLL

set,%DOSKEYBKEY%,0000100C

set,%DOSKEYBVALUE%,sf

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5023



[Process-C0C French (Canadian)]

set,%KBDDLL%,KBDFC.DLL

set,%DOSKEYBKEY%,00000C0C

set,%DOSKEYBVALUE%,cf

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5005



[Process-40B Finnish]

set,%KBDDLL%,KBDFI.DLL

set,%DOSKEYBKEY%,0000040B

set,%DOSKEYBVALUE%,su

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5009



[Process-407 German (Standard)]

set,%KBDDLL%,KBDGR.DLL

set,%DOSKEYBKEY%,00000407

set,%DOSKEYBVALUE%,gr

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5011



[Process-807 German (Swiss)]

set,%KBDDLL%,KBDSG.DLL

set,%DOSKEYBKEY%,00000807

set,%DOSKEYBVALUE%,sg

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5024



[Process-40E Hungarian]

set,%KBDDLL%,KBDHU.DLL

set,%DOSKEYBKEY%,0000040E

set,%DOSKEYBVALUE%,hu

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5033



[Process-40F Icelandic]

set,%KBDDLL%,KBDIC.DLL

set,%DOSKEYBKEY%,0000040F

set,%DOSKEYBVALUE%,is

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5013



[Process-410 Italian (Standard)]

set,%KBDDLL%,KBDIT.DLL

set,%DOSKEYBKEY%,00000410

set,%DOSKEYBVALUE%,it

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5015



[Process-414 Norwegian (Bokmal)]

set,%KBDDLL%,KBDNO.DLL

set,%DOSKEYBKEY%,00000414

set,%DOSKEYBVALUE%,no

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5018



[Process-415 Polish]

set,%KBDDLL%,KBDPL.DLL

set,%DOSKEYBKEY%,00000415

set,%DOSKEYBVALUE%,pl

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5035



[Process-816 Portuguese (Portugal)]

set,%KBDDLL%,KBDPO.DLL

set,%DOSKEYBKEY%,00000816

set,%DOSKEYBVALUE%,po

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5019



[Process-416 Portuguese (Brazil)]

set,%KBDDLL%,KBDBR.DLL

set,%DOSKEYBKEY%,00000416

set,%DOSKEYBVALUE%,br

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5003



[Process-419 Russian]

set,%KBDDLL%,KBDRU.DLL

set,%DOSKEYBKEY%,00000419

set,%DOSKEYBVALUE%,ru

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5055



[Process-41B Slovak]

set,%KBDDLL%,KBDSL.DLL

set,%DOSKEYBKEY%,0000041B

set,%DOSKEYBVALUE%,sl

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5039



[Process-40A Spanish (Traditional Sort)]

set,%KBDDLL%,KBDSP.DLL

set,%DOSKEYBKEY%,0000040A

set,%DOSKEYBVALUE%,sp

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5020



[Process-80A Spanish (Mexican)]

set,%KBDDLL%,KBDLA.DLL

set,%DOSKEYBKEY%,0000080A

set,%DOSKEYBVALUE%,la

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5017



[Process-41D Swedish]

set,%KBDDLL%,KBDSW.DLL

set,%DOSKEYBKEY%,0000041D

set,%DOSKEYBVALUE%,sv

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5022



[Process-424 Slovenian]

set,%KBDDLL%,KBDCR.DLL

set,%DOSKEYBKEY%,00000424

set,%DOSKEYBVALUE%,yu

set,%LAYOUTTEXT%,%pScrollBox1%

set,%LAYOUTNAME%,@%SystemRoot%\\system32\\input.dll#$c-5041



[process]

Run,%ScriptFile%,Process-%pScrollBox1%

echo,"Copying %KBDDLL% from %sourceDir%.."

FileCopy,"%SourceDir%\I386\%KBDDLL%","%TargetDir%\i386\system32\%KBDDLL%"

RegHiveLoad,"Build","%targetdir%\i386\system32\config\default"

RegWrite,"HKLM",0x1,"Build\Keyboard Layout\Preload","1","%DOSKEYBKEY%"

RegWrite,"HKLM",0x1,"Build\Control Panel\Keyboard","InitialKeyboardIndicators","2"

RegHiveUnLoad,"Build"

RegHiveLoad,"Build","%TargetDir%\i386\system32\setupreg.hiv"

RegWrite,"HKLM",0x1,"Build\ControlSet001\Control\Keyboard Layout\DosKeybCodes","%DOSKEYBKEY%","%DOSKEYBVALUE%"

RegWrite,"HKLM",0x1,"Build\ControlSet001\Control\Keyboard Layouts\%DOSKEYBKEY%","Layout Text","%LAYOUTTEXT%"

RegWrite,"HKLM",0x1,"Build\ControlSet001\Control\Keyboard Layouts\%DOSKEYBKEY%","Layout Display Name","%LAYOUTNAME%"

RegWrite,"HKLM",0x1,"Build\ControlSet001\Control\Keyboard Layouts\%DOSKEYBKEY%","Layout File","%KBDDLL%"

RegHiveUnLoad,Build

echo,All done..


#3 edborg

edborg

    Frequent Member

  • .script developer
  • 387 posts
  •  
    Italy

Posted 13 October 2006 - 02:01 PM

I've found a usable keyboard script on openbuilder 046 - available here: http://www.boot-land...ilder/packages/

I hope this is what you're looking for, otherwise you can post your script version and I'll check what needs to be done.

Problem solved! :P

Thanks for the script. :P
Actually, it's not different from the one I had converted from the old syntax (apart from offering a much wider choice of different keyboards).
Unfortunately it didn't work until I discovered (it wasn't that easy!) that the culprit is not the keyboard script, but rather, as I had thought since the beginning, the Autolocalization script.
What I hadn't realised before is that Autolocalization is somewhat hard to kill, as disabling it is not enough.
In fact it creates a script which is stored in the Archive folder and run automatically; this script is not erased after running, so that at the next run it's executed again, even if the Autolocalization is disabled and the Target is completely cleared!
This seems to me a bug difficult to find out :P

In addition, IMHO it's a conceptual error including the keyboard in the Autolocalization process, as it often happens not to be of the same language as the installed OS. :P

Also looked into your updated scripts - you should definitively post a topic for each on the development forum and/or in the download area.. Nice work! :P

Thanks for your comment. :P
What do you mean? The post I've already made is not enough?
If so, I'll add them individually
edborg
EDIT I've uploaded them at the Download area, and added a single cumulative post in the Development section

#4 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4165 posts

Posted 13 October 2006 - 04:56 PM

Problem solved! :P

Thanks for the script. :P
Actually, it's not different from the one I had converted from the old syntax
(apart from offering a much wider choice of different keyboards).
Unfortunately it didn't work until I discovered (it wasn't that easy!)
that the culprit is not the keyboard script, but rather, as I had thought
since the beginning, the Autolocalization script.
What I hadn't realised before is that Autolocalization is somewhat hard
to kill, as disabling it is not enough.
In fact it creates a script which is stored in the Archive folder and run
automatically; this script is not erased after running, so that at the next run
it's executed again, even if the Autolocalization is disabled and the Target is completely cleared!
This seems to me a bug difficult to find out :P

In addition, IMHO it's a conceptual error including the keyboard in the
Autolocalization process, as it often happens not to be of the same language as the installed OS. :P
Thanks for your comment. :P
What do you mean? The post I've already made is not enough?
If so, I'll add them individually
edborg
EDIT I've uploaded them at the Download area, and added a single cumulative post in the Development section


It would be good to have a seperate Topic for each script. That way if a user has a problem they can report it seperately and it also makes it easier to find a specific application script.

They keyboard thing can be discussed with psc when he comes back.
You bring up a good point about the keyboard sometimes not being of the same origin as the OS version.

#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 October 2006 - 10:18 AM

They keyboard thing can be discussed with psc when he comes back.


He is back now :P

@edborg

I thought it could conflict with the Autolocalization script, but it doesn't work either with the basic set of building scripts (no autolocalization).

If you use autoLocalization, there is no need to setup a keyboard because setting up the keyboard is a part of autoLocalization.

If you do not want to use autoLocalization, you should try AutoKeyboard.Script
Compared with the 'old' keyboard script it has

the advantage: It works for all languages which have latin-like characters including greek, I think cyrillic, too.
the disadvantage: It builds the keyboard from your actual PC's locale information: Greek keyboard from US host is not possible.

What I hadn't realised before is that Autolocalization is somewhat hard to kill, as disabling it is not enough.
In fact it creates a script which is stored in the Archive folder and run automatically; this script is not erased after running, so that at the next run it's executed again, even if the Autolocalization is disabled and the Target is completely cleared!

I'm going to change this behaviour.
Thanks :P

Peter

PS @edborg
Please have a look here

#6 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 October 2006 - 10:45 AM

What I hadn't realised before is that Autolocalization is somewhat hard to kill, as disabling it is not enough.
In fact it creates a script which is stored in the Archive folder and run automatically; this script is not erased after running, so that at the next run it's executed again, even if the Autolocalization is disabled and the Target is completely cleared!

I'm going to change this behaviour.
Thanks :P

@edborg
I checked my code and found only one place where 'script which is stored in the Archive folder' (named 'processLocalization.script') is only executed from inside autoLocalization.script.
Run,"%script%",Process-Locales,%DriveLetter%
with
%script%=%BaseDir%\Archive\autoTweaks\autoLocalization\processLocalization.script

That means: If autoLocalization.Script is unchecked this code never is executed.

Can you please explain what exactly happens on your system when processLocalization is running as a ghost?
The best will be to post the log of the complete build.


Peter

#7 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 14 October 2006 - 11:04 AM

@edborg
After beeing outside for a while it tooks some time to realize everything what happened in between.
Anywhere I found you posting

Yes, I do!
Apparently, Autolocalization assumes that one uses the keyboard in the same language of the build, which is not my case. However, what I don't understand is that, even with Autolocalisation disabled, SetKeyboard (which worked fine in OpenBuilder) does no longer work in Winbuilder. blink.gif
I'd appreciate any help to make it work again. smile.gif (I use an italian keyboard with an english XP).
edborg

Now I understand your intention.
I'm thinking about:

Use (if necessary) autoKeyboard after autoLocalization.
Give autoKeyboard the options:
- use your 'native' keyboard
- use locale xxx (e.g. 00000410 for italian)

@edborg
and
@all

Agreed?

Peter

#8 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10545 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 14 October 2006 - 11:34 AM

That's good idea!

Welcome back Peter!! :P

#9 smiley

smiley

    Silver Member

  • .script developer
  • 905 posts
  •  
    Greece

Posted 14 October 2006 - 12:18 PM

Good idea :P

@Nuno: Can you attcah your file enstead of posting it's source?

#10 TheHive

TheHive

    Platinum Member

  • .script developer
  • 4165 posts

Posted 14 October 2006 - 01:01 PM

@edborg
After beeing outside for a while it tooks some time to realize everything what happened in between.
Anywhere I found you posting
Now I understand your intention.
I'm thinking about:

Use (if necessary) autoKeyboard after autoLocalization.
Give autoKeyboard the options:
- use your 'native' keyboard
- use locale xxx (e.g. 00000410 for italian)

@edborg
and
@all

Agreed?

Peter

Welcome back and :P to the idea.

Lets see if Ove can make explorer work if there is no Ramdrive and a person whiches to use the FBWF File Based Write Filter Script Instead of the B drive. Or a combination of the two like now but with ability to use either the Drive being used as X or the B drive to hold the Explorer Settings. I think Ill post something in his Explorer thread.

#11 Nuno Brito

Nuno Brito

    Platinum Member

  • .script developer
  • 10545 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 15 October 2006 - 03:19 PM

@Nuno: Can you attcah your file instead of posting it's source?


It is posted on the above topic, you can also find all the other "old" scripts and files on:
http://www.boot-land.net/openbuilder/

Still need some time to create a special folder to keep all previous releases (including the ones from batcher)..

:P

#12 edborg

edborg

    Frequent Member

  • .script developer
  • 387 posts
  •  
    Italy

Posted 16 October 2006 - 07:40 AM

@edborg
After beeing outside for a while it tooks some time to realize everything what happened in between.
Anywhere I found you posting
Now I understand your intention.
I'm thinking about:

Use (if necessary) autoKeyboard after autoLocalization.
Give autoKeyboard the options:
- use your 'native' keyboard
- use locale xxx (e.g. 00000410 for italian)

@edborg
and
@all

Agreed?

Peter

Thanks for following up the issues raised with my posts. :P
I appreciate the usefulness of your Autolocalization script, though, building from an english XP, I personally don't need it and can't test its features.
What I really need is the 'old' SetKeyboard script (that works fine for me), but if your AutoKeyboard can be modified as you suggest (either reading the native settings or forcing a selection as in the present SetKeyboard, that would be great, giving the maximum of flexibility in every situation.

As you are at it, why not to include the same option (reading from native settings rather than from OS source) to Autolocalization (dates, numbers, currencies). This way I could also use Autolocalization. :P
edborg

#13 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 October 2006 - 07:49 AM

As you are at it, why not to include the same option (reading from native settings rather than from OS source) to Autolocalization (dates, numbers, currencies). This way I could also use Autolocalization. :P
edborg

Currently I'm working on this

When finished, autoKeyboard will remain obsolete.
Peter :P

BTW: If you look into autoKeyboard.Script: It copies the host's keyboard settings to the build, not settings from CD.

#14 edborg

edborg

    Frequent Member

  • .script developer
  • 387 posts
  •  
    Italy

Posted 16 October 2006 - 08:32 AM

Currently I'm working on this

When finished, autoKeyboard will remain obsolete.
Peter :P

BTW: If you look into autoKeyboard.Script: It copies the host's keyboard settings to the build, not settings from CD.

Great! :P
And what do you think about getting also dates, numbers, currencies from host?
edborg

#15 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 16 October 2006 - 10:29 AM

A new version of autoLocalize.script is available.

See here

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users