PDA

View Full Version : Script Editor Help needed




help needer
Apr 21, 2012, 12:46 AM
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.



kryten2
Apr 21, 2012, 10:21 PM
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 :

set Metatrader_command to "cd ~/.wine/drive_c/Program\\ Files/Metatrader\\ -\\ Pepperstone;wine terminal.exe"
do shell script Metatrader_command

help needer
Apr 22, 2012, 03:58 AM
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.