I have been searching for days and hours for this, I have seen a lot of examples of this, but cannot figure out how NSTask works, let's say I wanted to execute the command killall Dock
or defaults write com.apple.Finder AppleShowAllFiles YES
something like that, how would I go about doing this.
I know how to execute an external shell script (sh) but need to be more sophisticated and use NSTask instead.
Thanks for any help!!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…