Script Editor Help needed

Discussion in 'Mac Programming' started by help needer, Apr 20, 2012.

  1. macrumors newbie

    Joined:
    Apr 20, 2012
    #1
    Hi
    I'am looking for help to write a script.
    I use the "Wine" program to run the forex trading platform Metatrader 4 on my iMac.
    I normally type the following info into the Terminal.

    cd~/.wine/drive_c/Program\ Files/
    return
    ls
    return
    cd Metatrader\ -\Pepperstone/
    return
    wine terminal.exe
    return

    What I would like to achieve is to have the script in my desktop so I can use
    it like an icon to launch the program.

    Thanks in advance for any help.
     
  2. macrumors 6502a

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #2
    Save the script as application

    Code:
    tell application "Terminal"
    	activate
    	set Metatrader_command to "cd ~/.wine/drive_c/Program\\ Files/Metatrader\\ -\\ Pepperstone;wine terminal.exe"
    	do script Metatrader_command in window 1
    end tell
    Or :

    Code:
    set Metatrader_command to "cd ~/.wine/drive_c/Program\\ Files/Metatrader\\ -\\ Pepperstone;wine terminal.exe"
    do shell script Metatrader_command
     
  3. thread starter macrumors newbie

    Joined:
    Apr 20, 2012
    #3
    A huge thank you

    A huge thank you to Kryten2 for taking the time to assist me with your imput.
    I have been able to achieve my goals thanks to you.
     

Share This Page