Sign in to follow this  
Followers 0
coucou

Keyword Conditions Help

5 posts in this topic

Hi,

I'm looking for installing addons software language. May someone check my scripts here bellow if they are correct???

Microsoft BaseLLine 2

I've 2 softwares English and French

$Lang = RegRead("HKEY_CURRENT_USER\Control Panel\International", "sLanguage")
    If $Lang = "FRA" Then
    Run("MBSA2_FR.exe")

    Else
    Run("MBSA2_EN.exe")
Endif

Photofilre

The software is French. The addons is English.

Does the condition if "NOT =" or "#" works?

$Lang = RegRead("HKEY_CURRENT_USER\Control Panel\International", "sLanguage")
if $Lang # "FRA" Then
    Run("Phtofiltre_EN.exe")
Endif
or should i use this
$Lang = RegRead("HKEY_CURRENT_USER\Control Panel\International", "sLanguage")
If $Lang = "FRA" Then
    Exit

    Else
    Run("Phtofiltre_EN.exe")
Endif

MSN Messenger

The software is English, The addons are English and Spanish

$Lang = RegRead("HKEY_CURRENT_USER\Control Panel\International", "sLanguage")
Select
    Case $Lang = "FRA"
        Run("Msgr_FR.exe")
    Case $Lang = "SPA"
        Run("Msgr_SP.exe")
EndSelect

Regards

coucou

Share this post


Link to post
Share on other sites



Photofilre

The software is French. The addons is English.

Does the condition if "NOT ="  or "#" works?

$Lang = RegRead("HKEY_CURRENT_USER\Control Panel\International", "sLanguage")
if $Lang # "FRA" Then
    Run("Phtofiltre_EN.exe")
Endif
or should i use this
$Lang = RegRead("HKEY_CURRENT_USER\Control Panel\International", "sLanguage")
If $Lang = "FRA" Then
    Exit

    Else
    Run("Phtofiltre_EN.exe")
Endif

<{POST_SNAPBACK}>

If Not $Lang = "FRA" Then Run("Phtofiltre_EN.exe")

Have you considered using the builtin macro @OSLANG instead of reading the registry. Your result should be ok though.

Share this post


Link to post
Share on other sites

TNX MHZ

I'm reading the registry to remeber wher's the registry key for checking.

regarding Photofilre

If Not $Lang = "FRA" Then Run("Phtofiltre_EN.exe")
endif
as "Else" is not used. It is a problem?

What about Microsoft BaseLLine 2 na MSN Messenger scripts??? Are they OK

Regards

coucou

Share this post


Link to post
Share on other sites

TNX MHZ

I'm reading the registry to remeber wher's the registry key for checking.

regarding Photofilre

If Not $Lang = "FRA" Then Run("Phtofiltre_EN.exe")
endif
as "Else" is not used. It is a problem?

What about Microsoft BaseLLine 2 na MSN Messenger scripts??? Are they OK

Regards

coucou

<{POST_SNAPBACK}>

Others seem ok, but your last code is incorrect. See that I have no EndIf !!!

You can do this

If Not $Lang = "FRA" Then Run("Phtofiltre_EN.exe")

or you can do this

If Not $Lang = "FRA" Then
    Run("Phtofiltre_EN.exe")
EndIf

But not what you have done. You would get an EndIf error. Else is not compulsory to use.

Share this post


Link to post
Share on other sites

TNX for this enlightening : ;)

BTW are you MHz from MSFN forum???

Cheers

coucou

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0