Reputation: 1
I need to be able to add to use Terminal to:
Would any of this be possible? I have no experience with shell commands, just Apple Script which I first started and made a script for yesterday, so any insight would be much appreciated :).
Bonus: Would it be possible to use the title of the current webpage being viewed as the item that gets added?
Upvotes: 0
Views: 34
Reputation: 1757
I agree with jweaks, you should approach this with a plist. You can do this with
defaults write com.domain.scriptName dataName 'dataValue'
That command can be done in the terminal or in an applescript. Change domain.scriptName to your own information. Change dataName to some name that represents your data and dataValue to the actual data you want to store. If you want to do this in an applescript...
do shell script "defaults write com.domain.scriptName dataName 'dataValue'"
If you do it with a plist, you shouldn't have to quit and restart your applescript, just have it read the plist file as it runs it's process.
set theData to do shell script "defaults read com.domain.scriptName dataName"
You can find more information here... https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/defaults.1.html
Upvotes: 1