3

I'd like to stop/start receiving SMS/iMessage via command line, to avoid having to go into system preferences.

Is there a way I can manipulate settings for Messages to enable/disable an account?

2 Answers 2

1

It turns out stopping was more logical than expected:

tell application "Messages"
     repeat with s in services
            set n to name of s
            log out s
     end repeat
end tell

It doesn't seem to work the other way around. I've tried and I've tried, and I can't get no satisfaction.

-1

I dont know, but here is a list of all MacOS command-line commands: https://ss64.com/osx/

Nothing in this list explicitly answers your question. So I would assume there is not a way to do this from the command-line.

2
  • It might be useful if you read the post How to Write a Good Answer in our Help Center. I'm refraining from down voting, though I highly suggest taking a second look at this answer.
    – Allan
    Commented Jan 4, 2019 at 23:09
  • Welcome to Ask Different and thank you for your answer. :) Unfortunately, short answers such as this don't really provide enough detail or context to help many users. And, just providing a link isn't very helpful as it may no longer work in future. Instead, could you please edit your answer to include a summary of the relevant content from the page you're linking to? This will make your answer more self-contained and help preserve it for other users in future.
    – Monomeeth
    Commented Jan 4, 2019 at 23:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .