User talk:Hendy:ImageToIPhoto
Jump to navigation
Jump to search
iPhoto
Here are the AppleEvents used in this process:
Sent from Safari:
AE2000 (36985): Sending an event:
------oo start of event oo------
{ 1 } 'aevt': core/cimp (i386){
return id: 0 (0x0)
transaction id: 0 (0x0)
interaction level: 112 (0x70)
reply required: 1 (0x1)
remote: 0 (0x0)
for recording: 0 (0x0)
reply port: 0 (0x0)
target:
{ 2 } 'psn ': 8 bytes {
{ 0x0, 0x245245 } (iPhoto)
}
fEventSourcePSN: { 0x0,0x244244 } (Safari)
optional attributes:
< empty record >
event data:
{ 1 } 'aevt': - 2 items {
key 'insh' -
{ 1 } 'obj ': - 4 items {
key 'want' -
{ 1 } 'type': 4 bytes {
'prop'
}
key 'from' -
{ -1 } 'null': null descriptor
key 'form' -
{ 1 } 'enum': 4 bytes {
'prop'
}
key 'seld' -
{ 1 } 'type': 4 bytes {
'aral'
}
}
key 'impt' -
{ 1 } 'list': - 1 elements {
{ 1 } 'utxt': 80 bytes {
"/tmp/SafariiPhotoImages23VYNP/arabic.jpg"
}
}
}
}
------oo end of event oo------
Received by iPhoto:
AE2000 (36987): Received an event:
------oo start of event oo------
{ 1 } 'aevt': core/cimp (i386){
return id: 0 (0x0)
transaction id: 0 (0x0)
interaction level: 112 (0x70)
reply required: 1 (0x1)
remote: 0 (0x0)
for recording: 0 (0x0)
reply port: 24611 (0x6023)
target:
{ 1 } 'psn ': 8 bytes {
{ 0x0, 0x244244 } (Safari)
}
fEventSourcePSN: { 0x0,0x244244 } (Safari)
optional attributes:
< empty record >
event data:
{ 1 } 'aevt': - 2 items {
key 'insh' -
{ 1 } 'obj ': - 4 items {
key 'want' -
{ 1 } 'type': 4 bytes {
'prop'
}
key 'from' -
{ -1 } 'null': null descriptor
key 'form' -
{ 1 } 'enum': 4 bytes {
'prop'
}
key 'seld' -
{ 1 } 'type': 4 bytes {
'aral'
}
}
key 'impt' -
{ 1 } 'list': - 1 elements {
{ 1 } 'utxt': 80 bytes {
"/tmp/SafariiPhotoImagesiXqAd1/arabic.jpg"
}
}
}
}
------oo end of event oo------
Conveniently, this event seems to correspond precisely to iPhoto's import command.
iPhoto .sdef extract:
<command name="import" code="corecimp" description="Import the given path."> <direct-parameter type="specifier" description="the object for the command"/> <parameter name="from" code="impt" type="text" description="The path(s) to import."/> <parameter name="force copy" code="forc" type="integer" optional="yes" description="Pass true to ignore advanced preference and always create copy in iPhoto library. Useful if original may be in a temporary directory. Default is true."/> <parameter name="to" code="insh" type="album" optional="yes" description="The album to which to import the object. If none specified, import into main Library."/> </command>