Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Misunder

macrumors newbie
Original poster
Apr 21, 2018
2
0
Right so I wanted to automate a process which I have to do quite often for a program that I run quite often and sometimes open up multiple of.

Normally I open up Terminal and type in the following commands in order:
cd ExoClient
mono ExoClient.exe
email@gmail.com
password

So I made an executable file for this called login.command on my mac. I typed in this is order:
cd ExoClient
mono ExoClient.exe
email@gmail.com
password

So the first two lines work but the last two don't do anything. I thought that this could be because the top 2 commands are actual mac commands and the last two lines are just inputs. But I don't know how to make sure the inputs are inputted.

Thanks for reading, would appreciate any help.
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,973
4,542
New Zealand
Your theory is correct; the last two lines aren't commands.

Try "mono ExoClient.exe email password" or "mono ExeClient.exe /?". It's possible that ExoClient can take the email address and password as parameters.
 

Misunder

macrumors newbie
Original poster
Apr 21, 2018
2
0
Your theory is correct; the last two lines aren't commands.

Try "mono ExoClient.exe email password" or "mono ExeClient.exe /?". It's possible that ExoClient can take the email address and password as parameters.
Alright, thanks, that works great.

I wanted to run this 9 more times on for different emails/passes on different terminal windows. Is there a way I could do this using one script?
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
scripts that run in a shell inside Terminal can be in various scripting languages like bash, perl, python and others. These languages have loops and functions and variables that you can use to write short programs or scripts. If you look up bash shell scripting you'll find lots of info on how to write these scripts.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.