i need an applescript to create that plist on desktop that a part of my project to automate image creation thanks for the futur answer
Plist file to create with Applescript
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RunAtLoad</key>
<true/>
<key>Label</key>
<string>com.apple.iCalToDesktop</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>/Volumes/Fake mac/ABCD.app</string>
</array>
</dict>
</plist>
i found a exemple but i don't managed to use it
Applescript to create plist file
File create
Plist file to create with Applescript
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>RunAtLoad</key>
<true/>
<key>Label</key>
<string>com.apple.iCalToDesktop</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>/Volumes/Fake mac/ABCD.app</string>
</array>
</dict>
</plist>
i found a exemple but i don't managed to use it
Applescript to create plist file
- tell application "System Events"
- -- Create an empty property list dictionary item
- set theParentDictionary to make new property list item with properties {kind:record}
- -- Create a new property list file using the empty dictionary list item as contents
- set thePropertyListFilePath to "~/Desktop/Example.plist"
- set thePropertyListFile to make new property list file with properties {contents:theParentDictionary, name:thePropertyListFilePath}
- -- Add a Boolean key
- tell property list items of thePropertyListFile
- make new property list item at end with properties {kind:boolean, name:"booleanKey", value:true}
- -- Add a date key
- make new property list item at end with properties {kind:date, name:"dateKey", value:current date}
- -- Add a list key
- make new property list item at end with properties {kind:list, name:"listKey"}
- -- Add a number key
- make new property list item at end with properties {kind:number, name:"numberKey", value:5}
- -- Add a record/dictionary key
- make new property list item at end with properties {kind:record, name:"recordKey"}
- -- Add a string key
- make new property list item at end with properties {kind:string, name:"stringKey", value:"string value"}
- end tell
- end tell
File create
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <key>booleanKey</key>
- <true/>
- <key>dateKey</key>
- <date>2016-01-28T19:34:13Z</date>
- <key>listKey</key>
- <array/>
- <key>numberKey</key>
- <integer>5</integer>
- <key>recordKey</key>
- <dict/>
- <key>stringKey</key>
- <string>string value</string>
- </dict>
- </plist>