do shell script "/bin/tcsh -c PathToMyAppWithQuotes"
But same problem appears. I understand that it could be bug of fpc library, but it works well when running from Terminal on Leopard/Tiger with any system language (I’ve tried to change system language at Preferences->International) - so I’m thinking of solving problem within AppleScript.
This way -
do shell script "open PathToMyApp"
is not solution for me because it leaves Terminal window opened.
Anybody had similar problem?
Model: MacBook Pro
Operating System: Mac OS X (10.5)
I just read the entire post again and I must apologize for my
previous responses. You were already doing it that way. I did
not get much sleep last night is my only excuse.
I could not find anything on changing the locale either. You
say it works fine using the open command but that leaves the
Terminal window open. Would it be sufficient to simply close
the window once the command has run?
Or could you use something like ‘&> /dev/null &’ and close
the window immediately?
Unfortunately it opens 1 terminal window after the activate command. So following code worked for me with small note - I have to specify time for running command:
tell application "Terminal"
do script command
delay 4
tell front window to close
end tell
and Terminal remains open (but without any windows).
I do not want to use the “quit” command because it could cause problem in case when there are opened processes in Terminal.
So it seems I’ve draft solution. But to ensure terminal window is not shown I will look for any methods of specifying locale, especially because in Mac OS 10.4.* as I know the default locale is “C” but not “*.UTF8”.
You could check to see if Terminal is active before you run your command and only close after your command if it was not previously open. If they already have it open you would not want to close it anyway wether a process was running or not.
p.s. (Offtopic) Unfortunately I can just say thanks. (In my native country I/my friends used to give beer to colleague who helped a lot, so if you will attend wwdc’09 you will have a person to drink beer with )