Opening terminal with applescript - changes default input language....

When I try to use Applescript to open terminal, it opens it but changes the input language to Japanese, so anything that I attempt to feed into terminal via applescript turns into nonsense Japanese. (The default language is English and kotoeri is set to romaji/roman alphabet by default)
How do i stop this?
Thanks

Since my snow leopard MBP can't handle smb mounts, I've resorted to using sharity, except that its gui crashes the instant I try to mount a drive. But I can mount samba shares using sharity from the command line. I'd like to have it mount on startup which is supposedly something sharity can accomplish from its gui but since that doesn't work I would like to write an applescript and add it to the login items. I haven't been able mount it using do shell script as the sharity command line, unlike the normal samba mount command) doesn't seem to have an option of entering the password, so the mount fails:
sharity mount smb://user@address/folder
I thought if I open terminal via applescipt, then have it 'type' the command followed by a delay, then type the password, I could get around it but when I open terminal in applescipt, it starts in Japanese:
activate application terminal
tell application "System Events" to keystroke "sharity mount smb://user@address/folder"
tell application "System Events" to keystroke return
delay 2
tell application "System Events" to keystroke "password"
delay 2
tell application "Terminal"
quit
end tell
This almost does what I want it to but the input language has flipped to Japanese and sharityもうんtsmb://Sトラゲ-0165/けいthぱっすぉrd
is the result
Basically its all because of the samba bug in snow leopard (which I reported to apple and they confirmed its the same issue they know about)

Similar Messages

  • Opening terminal in applescript changes input to Japanese

    When I try to use Applescript to open terminal, it opens it but changes the input language to Japanese, so anything that I attempt to feed into terminal via applescript turns into nonsense Japanese.
    The default language is English
    How do i stop this?
    Thanks

    You might also want to ask in the Applescript forum:
    http://discussions.apple.com/forum.jspa?forumID=724

  • How to change System Key Board Default input language(registry entry) using c# code

    Hi All
    Please help me to write a small console application which helps to change keyBoard default input language in registry using c# code (Manually we can change  as follows: Control Panel\All Control Panel Items\Region and Language\ KeyBoards and languages\Change
    KeyBoards\Default Input Language)
    Note: once system rebooted, English language should not be selected by default. Previously selected language has to be retained after system rebooting

    Hi 
    Avatar
    Would you mind letting us know the result of the suggestion?
    I temporarily mark
    cedric’s last response as an answer. You can unmark
    it if they provide no help.
    Best  regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How change keyboard input language?

    hi,
    i am working on Windowx XP and for multiple language input support i am using the windows language bar.
    How can i change the input language through the java itself.
    i try this code but it not working
    this.jTextField1.getInputContext().selectInputMethod(Locale.CHINESE)give me some advise..

    Does selectInputMethod return true?
    Did you try setting the Character Subset?
    Does your OS support Chinese (I know it's a silly question)?
    Did you try playing with jTextField1.enableInputMethods, revalidating the component, etc..?

  • How to change the input language ?

    Hello,
    I am writing an Add-on that needs to change the input language when the user
    clicks on the Item Code field ("5") in the "Item Master Data" form.
    I can perform the change when I am out side of the SAP application (for example if I create a Windows Form), however I cannot control the input language of the SAP itself through code.
    I even tried using Application.Sendkeys, however I was unable to send a combination of ALT+SHIFT, or at least it did not have any affect
    Here is the code on how to change the input language on a Windows Form:
    For Each Lng As system.Windows.Forms.InputLanguage In system.Windows.Forms.InputLanguage.InstalledInputLanguages
       sValue = Lng.Culture.DisplayName.ToUpper()
       If sValue.StartsWith("ENGLISH") Then
                        system.Windows.Forms.InputLanguage.CurrentInputLanguage = Lng
                        Exit For
        End If
    Next
    Any ideas ?

    I am not sure I understand the problem. Anyway in B1 you change the language by
    changing it from the Administration module. This raises a Application event that
    is sent to all the add-ons. The event is aet_LanguageChanged and you should
    then change the language handled by your add-on when you receive it.

  • Change keyboard input language without changing spotlight shortcut

    I have bought a macbook air recently and installed a second input language. Instead of changing the input language manually each time I want to have a shortcut but the system seems to have only one option which is the "command+space" shortcut, the one for spotlight. This means that I can not have them both at the same time. Help please!

    I am trying but i only get to check/uncheck "command+space" on both of them. My question is how to do it manually?

  • Is there a way to permanently change the input language in the login screen?

    Whenever I start my iMac with Mavericks, after the boot is complete and the login window appears, I have the change the language in the top right corner from US to DE, else I can't type in my password. Mavericks does not remember this setting, next time after startup I have to do it again. The original owner of this Mac was using US as input language, so I guess that's where it's coming from. This extra step of changign language only takes a few seconds, but many times I forget it and try to enter my password but it will not work. There must be a console command or somethign that can fix this? Thank you!

    I managed to find the solution myself. If anyone is interested, just follow those steps here:
    http://apple.stackexchange.com/questions/44913/make-a-custom-keyboard-layout-the -system-default-even-for-the-login-screen
    (terminal skills required tho)

  • I cannot change my input language from multitap to suretype.

    I've tried going to language under device options and switching the input language, but under input language options there is English (United Kingdom) and English (United States), no "ensure multitap" or "ensure suretype." I tried going to the body of a text message and email and opening the menu and clicking on "change input language" but once again my options are English (United Kingdom) and English (United States), no "ensure multitap" or "ensure suretype." I also tried going to the body of a text message or email and holding the * key for 2 to 3 seconds and still nothing happened.
    I just got this new phone two days ago and when I inserted the battery and turned it on it was on suretype. This is what I wanted. Last night I locked the phone when I went out to dinner and when I unlocked it after dinner I went to reply to a text and it was in multitap mode although I never changed it. Now I can't change it back. Please help!
    [email protected]

    To switch from multitap to suretype and vice versa you need to be in a field where you can type text.  Then hit the menu key and select "Enable SureType" or "Enable MultiTap."
    1. Please thank those who help you by clicking the "Like" button at the bottom of the post that helped you.
    2. If your issue has been solved, please resolve it by marking the post "Solution?" which solved it for you!

  • How to change default english Language to Chinese in DSEE 6.0

    Hi,
         Anybody knows how to change language for DSEE 6.0. I want to change default language to Chinese.

    What is DSEE 6.0.?

  • Making and opening folder with applescript

    I'm trying to create and open a folder with applescript, but my script gives an error...
    This is what i've written but can't figure out what i'm doing wrong. I hope you can help me!
    tell application "Finder"
    activate
              set the_folder to "106_WDJZ Eigen Magazine 20pp_Foto"
              set myfolder to make new folder at "Press4:10. Specials:N19. WDJZ Eigen Magazine 20pp:F. Foto:" with properties {name:the_folder}
              set openmap to (myfolder & the_folder)
    end tell
    Thank you very much in advance

    Thank you both for your awnsers. I really appreciate it! I was trying to create a folder (at "Press4:10. Specials:N19. WDJZ Eigen Magazine 20pp:F. Foto:") with a name (106_WDJZ Eigen Magazine 20pp_Foto) and after the folder is created I want the scrpt to open the folder.
    The in FileMakerPro (calculated) applescript is now working and look like this:
    "tell application \"Finder\"" & ¶ &
    "set the_folder to \"" & Editie_standaardgegevens::UitgaveID & "_" & Editie_standaardgegevens::Editienaam_intern & "_Foto" & "\"" & ¶ &
    "set sub_folder to \"Press4:10. Specials:" & Editie_standaardgegevens::Editienaam_intern_totaal & ":F. Foto:\"" & ¶ &
    "set myfolder to make new folder at sub_folder with properties {name:the_folder}" & ¶ &
    "set openfolder to (sub_folder & the_folder & \":\")" & ¶ &
    "open folder openfolder" & ¶ &
    "activate" & ¶ &
    "end tell"

  • Open a terminal with applescript

    I am using this script to open a terminal session and telnet:
    tell application "Terminal"
      activate
              tell application "System Events" to keystroke "n" using {command down}
              do script "telnet ipaddress" in front window
      delay 5
      do script "username" in front window
      delay 5
              do script "password" in front window
      delay 5
      do script "command to close session" in front window
    end tell
    When I run this it opens two terminal windows  is there a way to only open the one?  I have read other threads but they were all archived and didn't address two windows opening.

    try
              set pathToMyFolderOnDesktop to ("Macintosh HD:Users:jodyconnor:Desktop:") & "Dsource:" as alias
              set rnd to (random number from 1 to 6)
              set rndFileName to (rnd as text) & ".scpt"
              set FullPath to pathToMyFolderOnDesktop & rndFileName as text
              set myScript to load script (FullPath as alias)
      run script myScript
    on error the error_message number the error_number
              display dialog "Error: " & the error_number & ". " & the error_message buttons {"OK"} default button 1
              return
    end try
    This code answered my question:  Hats off to Digimonk from stackoverflow and Darrick Herewe from stackoverflow.

  • Stuck to opening .pages with textedit as default

    hello guys, after upgrading to snow leopard from leopard, i am stuck with opening .pages document with textedit. i tried to change it in "*get info*" but it doesn't work, it stick with texteedit as the default application.
    anyone encounter this issue before?

    Hi Peter,
    I installed iWork suite before updating my mac to 10.6
    perhaps that is the problem, will try later
    thanks

  • Changing default "other language" fonts

    Hi,
    I am a Thai mac user. I am pretty ok with Lucilda grande as my default system fonts. But when I switch to thai keyboard layout, the default Thai font for it is quite bad. Is there anyway to change this font? (I don't even know what font it is.) This font seems to be the default font for thai characters in all applications too.
    Thanks

    I am a Thai mac user. I am pretty ok with Lucilda
    grande as my default system fonts. But when I switch
    to thai keyboard layout, the default Thai font for it
    is quite bad. Is there anyway to change this font? (I
    don't even know what font it is.)
    I think this font is Lucida Grande (which includes Thai as well as Hebrew, Cyrillic, and Latin). Surely you can tell by opening the Font Panel and switching among them. I think the only way you can choose a different default font is if the particular app you are using has a setting for that. For instance, Nisus Writer Express has preferences that tie keyboard layouts to fonts.

  • Launching terminal with applescript

    I just recently ventured into the world of MAC, and I am trying to create an applescript (APS) to do the following
    1. Launch Terminal
    2. make terminal a X11 emulator ("/usr/bin/open-x11")
    3. source blah1.sh ("source blah.sh")
    4. source blah2.sh ("source blah.sh")
    5. chage dir to foo1 ("cd foo1")
    6. Leave window open
    i have a good idea on how to use APS tolaunch terminal, but I am not sure if it is reading the source file, because it does not chage directory. Could someone help with an example script.
    Thanks
    MacBook Mac OS X (10.4.8)

    Hi Lanre,
    try this
    tell application "Terminal" to run
    do shell script "/usr/bin/open-x11 ; source blah.sh ; source blah2.sh ; cd foo1"
    or you can make a .term file (search google for how to)

  • When opening iPhoto 9.5.1 a dialog box appears: "A photo has been found in the iPhoto library that was not imported". "Would you like to import it?" After appearing twice iPhoto then opens normally with no changes and works OK. Why dose this happen.

    Unwanted dialog box when opening iPhoto.

    Go to your Pictures Folder and find the iPhoto Library there. Right (or Control-) Click on the icon and select 'Show Package Contents'. A finder window will open with the Library exposed.
    Look there for a Folder called 'Import' or 'Importing'.
    Drag it to the Desktop. Make no other changes. Start iPhoto. Does that help?
    If it does then look inside that folder on your desktop. Does it contain anything you want? If not you can trash the folder.

Maybe you are looking for

  • Calling subtemplate in standalone BIP

    Hi, I've created one main template and two subtemplate. All template have different dataset. I want to print that sub template in separate page based on condition. like Page1-Main template Page2-Subtemplate1(if condition=true) conditon is related to

  • How do I adjust screen brightness HP 320-1120A

    Tried FN F7 etc but no good.  Screen is too bright, especially when showing pages with white background. All help gratefully accepted! This question was solved. View Solution.

  • I want to buy a refurbished ipad mini 2 from your website. Wonder whether it is applicable for the purpose of GST return in airport ?

    i want to buy a refurbished ipad mini 2 from your website. Wonder whether it is applicable for the purpose of GST return in airport ?

  • Internal error in SAP user exit

    Hi,   i am working on the SAP user exits in SD module for Free goods enhancement, if customer buys 100 goods in 'X' material we have to provide 'Y' quantity of goods as free. i did coding part under the standard program "MV45AFZZ " in the form" user

  • Valution Class

    Dear all I have create a new valution Class for service and maintained OBYC settings ,But for GR/IR posting (WRX) its not picking assigned G/L account.Pl. suggest if any other setting needed or correct the existing one Regards,