oh... this is the script so far
dim text_IN, text_OUT as xptextobject
dim Bandera as xpBaseObject
Self.GetObjectByName("Text1", text_IN)
Self.GetObjectByName("Text2", text_OUT)
Self.GetObjectByName("Bandera", Bandera)
Bandera.PosX = 524
If text_IN.text = "ESTADOS UNIDOS" orElse text_IN.text = "USA" orElse text_IN.text = "EEUU" orElse text_IN.text = "ESTADOS UNIDOS DE AMERICA" Then
text_OUT.text = "ESTADOS UNIDOS"
ElseIf text_IN.text = "AFGANISTAN" orElse text_IN.text = "AFGANISTÁN" Then
text_OUT.text = "AFGANISTÁN"
ElseIf text_IN.text = "ALBANIA" Then
text_OUT.text = "ALBANIA"
ElseIf text_IN.text = "ALEMANIA" Then
text_OUT.text = "ALEMANIA"
ElseIf text_IN.text = "ANTIGUA BARBUDA" orElse text_IN.text = "ANTIGUA Y BARBUDA" Then
text_OUT.text = "ANTIGUA Y BARBUDA"
ElseIf text_IN.text = "AZERBAIYAN" orElse text_IN.text = "AZERBAYAN" orElse text_IN.text = "AZERBAJAN" orElse text_IN.text = "AZERBAYÁN" orElse text_IN.text = "AZERBAJÁN" Then
text_OUT.text = "AZERBAIYÁN"
ElseIf text_IN.text = "belgica" orElse text_IN.text = "BELGICA" orElse text_IN.text = "BÁ‰LGICA" Then
text_OUT.text = "BÁ‰LGICA"
ElseIf text_IN.text = "BELIZE" orElse text_IN.text = "BELICE" orElse text_IN.text = "BÁ‰LICE" then
text_OUT.text = "BELICE"
ElseIf text_IN.text = "BENIN" orElse text_IN.text = "BÁ‰NIN" orElse text_IN.text = "BENÁN" Then
text_OUT.text = "BENÁN"
ElseIf text_IN.text = "BIELORUSIA" orElse text_IN.text = "BIELORRUSIA" Then
text_OUT.text = "BIELORRUSIA"
ElseIf text_IN.text = "BOSNIA HERZEGOVINA" orElse text_IN.text = "BOSNIA-HERZEGOVINA" orElse text_IN.text = "BOSNIA Y HERZEGOVINA" Then
text_OUT.text = "BOSNIA Y HERZEGOVINA"
ElseIf text_IN.text = "BOTSWANA" orElse text_IN.text = "BOTSUANA" Then
text_OUT.text = "BOTSUANA"
ElseIf text_IN.text = "BRAZIL" orElse text_IN.text = "BRASIL" Then
text_OUT.text = "BRASIL"
ElseIf text_IN.text = "BRUNEI" orElse text_IN.text = "BRUNÁ‰I" Then
text_OUT.text = "BRUNÁ‰I"
ElseIf text_IN.text = "BURUNDI" orElse text_IN.text = "BURUNDÁ" Then
text_OUT.text = "BURUNDI"
ElseIf text_IN.text = "BUTAN" orElse text_IN.text = "BUTÁN" Then
text_OUT.text = "BUTÁN"
ElseIf text_IN.text = "CAMBODIA" orElse text_IN.text = "CAMBODYA" orElse text_IN.text = "CAMBOYA" Then
text_OUT.text = "CAMBOYA"
ElseIf text_IN.text = "CAMERUN" orElse text_IN.text = "CAMERÁšN" Then
text_OUT.text = "CAMERÁšN"
Else text_OUT.text = ""
Bandera.PosX = -200
End If
dim materialBandera as xpMaterial
dim shaderBandera as xpBaseShader
dim directorio as String
directorio = "E:xpprojectsImagesbanderas - paises" & text_OUT.text & ".png"
Bandera.GetMaterial(0, materialBandera)
materialBandera.GetShader(0, shaderBandera)
shaderBandera.SetFileName(directorio)
''''''''''''''''''''''''''''''''''''''''''''''''''''
as you can see, im trying to correct some common flaws of the operator (to avoid bad spelling), so they dont worry about how they type the country name and still it outputs the "correct" name (thanks to wikipedia), and the correct flag for that country. I have to do it because if they spell wrong the country name, the flag wont update correctly and we could end up showing united states with the canadian flag as an example.
Another way to avoid this would be in theory with a list of the countries and the operator would select one, but I cant find a way to do it inside ross xpression (I could in theory do that within a custom web page, but I have to learn dreamweaver to do it)
thanks!
#XPression