ScriptSpot

Forum topic · General Scripting

"Umlaut" in strings

By br0t · 2011-01-19

Description

Heyho,

I am loading UVs into an Unwrap modifier with maxscript, which right now only seems to be possible with a UIAccessor-Workaround, that essentially searches for the "Open"-button and presses it for me. It is slow, but still a lot faster than myself and I can do something else while it is busy. The thing that bothers me is, that on my german OS, it does not have to search for the "Open"-button, but for the "Öffnen"-button. But it does not recognize the Umlaut ("Ö") when I put it like this:

			
UIAccessor.PressButtonByName WindowHandle "&Öffnen"

How do I have to write it so MAXScript will recognize the "Ö" ? I dont want to change the input language of my OS everytime I use the script :(

Regards

Comments (1)

Swordslayer · 2011-03-08

Just a suggestion, have you tried using a hexadecimal character for Ö? There's a nice function in help to list the chars:

char = "0123456789abcdef"
for i = 1 to char.count do
for j = 1 to char.count do
(
	s = execute("\"\\x" + char[i] + char[j] + "\"")
	format "%% %\n" char[i] char[j] s
)

Here it gives me "\xd6" for "Ö" but it will probably be different for you.