I am trying to read this xml-file with applescript.
<?xml version="1.0" encoding="UTF-8"?>
<user>
<username>benutzer</username>
<password>passwort</password>
<ip>127.0.0.1</ip>
</user>
<vars>
<display>15</display>
<sleep>60</sleep>
<volume>22</volume>
<app1>"Plex Media Server"</app1>
</vars>
The original applescript looks like this:
do shell script "pmset displaysleep 15" password "mypassword" with administrator privileges
do shell script "pmset sleep 60" password "mypassword" with administrator privileges
set volume output 20
tell application "Plex Media Server"
quit
end tell
say "Media off"
How can I insert the value of "display" tp "displayslep", the value of "app1" as the application to quit etc.?
I am using several applescripts and this would make it so much easier changing certain values without having to change each script on its own. Also, I am a beginner with not too much coding knowledge.
Thanks in advance :)
No comments:
Post a Comment