Vorheriges Thema anzeigen :: Nächstes Thema anzeigen |
Autor |
Nachricht |
Daisy •-->

Anmeldedatum: 26.04.2002 Beiträge: 79
|
Verfasst am: 26.04.2002 - 15:33 Titel: Extensis Portfolio scripten? - wie bekomme ich die Records i |
|
|
Liebes Forum,
hat jemand von Euch Erfahrung mit dem Scripten von Extensis Portfolio (Bilddatenbank, Version 5 oder 6)? Ich habe alles mögliche hingekriegt aber nicht das Kopieren von Records aus einem offenen Portfoliodokument in ein anderes. Wahrscheinlich steh' ich auf dem Schlauch... Hat jemand eine Idee oder ein Beispielscript?
Viiiielen Dank schon mal für Eure Hilfe! |
|
Nach oben |
|
 |
Snow Administrator


Anmeldedatum: 21.11.2000 Beiträge: 1946 Wohnort: Deiningen
|
Verfasst am: 26.04.2002 - 16:45 Titel: Extensis Portfolio scripten? |
|
|
Hallo Daisy,
ich kann dir da leider auf Anhieb nicht weiter helfen. Könntest du mir mal das Befehlsverzeichnis von Portfolio mailen? Oder gibt's evtl. eine Demoversion. Auf die Schnelle konnte ich jetzt bei Extensis nichts finden. _________________ Peter
-
Fischer-Bayern.de|Shadetreemicro.com |
|
Nach oben |
|
 |
Snow Administrator


Anmeldedatum: 21.11.2000 Beiträge: 1946 Wohnort: Deiningen
|
Verfasst am: 27.04.2002 - 18:05 Titel: Extensis Portfolio scripten? |
|
|
Hi Daisy,
nachdem ich mir das Befehlsverzeichnis angesehen hatte, habe ich gleich auf "gallery copy" getippt. So wie es beschrieben ist, sollte dieser Befehl doch genau das tun, was du brauchst.
gallery copy: Copies records from one gallery of a catalog to another.
gallery copy selection -- The record set to copy.
to gallery -- The gallery to which to copy the records.
Andererseits habe ich mir gedacht, dass du das ja wohl unmöglich übersehen haben kannst. Also habe ich mir jetzt doch die Trial-Version heruntergeladen. Tja leider hat dieser verheisungsvolle Befehl nicht funktioniert. Ich befürchte aber, dass wir zu keinem Ergebnis kommen werden. "gallery copy" verlangt, dass man eine Selektion angibt. Also habe ich mir als nächstes die "selection" näher angesehen:
Class selection: The selection visible to the user
Elements:
record by numeric index, satisfying a test
Properties:
contents anything -- the information currently selected. Use ëcontents of selectioní to get or change information in a document.
Das sieht doch auch schon wieder vielversprechend aus.
Bisher ist es mir jedoch nicht gelungen einen brauchbaren Wert mittels "selection" zu bekommen.
Als nächsten Schritt habe ich mir gedacht, dass ich es mal mit einer automatischen Selektion versuche, also die Selektion im Skript festlege.
tell application "Extensis Portfolio 6"
select records 5 thru 9 of gallery 1
end tell
Das hat soweit auch funktioniert und die entsprechenden records waren ausgewählt. Ein Blick in das Ergebnisfenster (des Skript Editors) hat mich leider wieder enttäuscht:
{ application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6" }
Was mich an "selection" stört, ist die Tatsache, dass es als eigene Klasse bzw. Objekt existiert, aber gleichzeitig auch eine Eigenschaft von "application" und "gallery" ist.
Das Entfernen von ausgewählten records funktioniert allerdings:
tell application "Extensis Portfolio 6"
activate
set tGal to gallery 1
select records 3 thru 7 of tGal
remove selection
end tell
Das Eventprotokoll hierzu sieht jedoch schon wieder reichlich seltsam aus:
tell application "Extensis Portfolio 6"
activate
get gallery 1
--> document "Portcat.fdb - Beamte - Cartoons*"
select records 3 thru 7 of gallery "Portcat.fdb - Beamte - Cartoons*"
--> { current application, current application, current application, current application, current application }
remove selection current application
--> true
end tell
Wenn man die Eigenschaften einer "gallery" abfragt, funktioniert natürlich alles außer "selection".
tell application "Extensis Portfolio 6"
set tGal to gallery 1
get name of tGal
get modified of tGal
get view of tGal
get selection of tGal
end tell
Auch bei "record" ist es mir nicht gelungen, auf alle Eigenschaften zuzugreifen.
tell application "Extensis Portfolio 6"
set tGal to gallery 1
set Rec1 to record 1 of gallery 1
get name of Rec1
get id of Rec1
get volume of Rec1
get filename of Rec1
get extension win of Rec1
get created of Rec1
get last modified of Rec1
get file size of Rec1
get last updated of Rec1
get cataloged of Rec1
-- get description of Rec1 -- Can't make some data into the expected type.
--get keywords of Rec1 -- Can't make some data into the expected type.
get thumbnail of Rec1
get file type mac of Rec1
get creator mac of Rec1
get short file name win of Rec1
get zone mac of Rec1
get thumbnail size of Rec1
get color mode of Rec1
get horizontal resolution of Rec1 --> ""
get vertical resolution of Rec1 --> ""
get width of Rec1
get height of Rec1
get category of Rec1 --> ""
get number of pages of Rec1
get place holder of Rec1 --> ""
get watermarked of Rec1
get watermark url of Rec1
get directory path of Rec1
end tell
Die Sortierung per Skript funktioniert. Eine weiter Unstimmigkeit ist mir jedoch bei "unselect all" aufgefallen. Man muss dazu die records angeben, die deselektiert werden sollen. Das ist ziemlich unpraktisch. Im folgenden Skript habe ich diesen Befehl am Schluss eingebaut:
tell application "Extensis Portfolio 6"
activate
sort gallery 1 by "last modified" in order descending
unselect all records of gallery 1
end tell
Auch das Ergebnis des "unselect all"-Befehls möchte ich nicht vorenthalten:
{application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6", application "Extensis Portfolio 6"}
So, für's erste soll das mal genug sein. Die Trial-Version läuft ja noch ein paar Tage. Vielleicht komme ich dem Geheimnis der selections noch auf die Spur.
Übrigens habe ich bei MacScripter.net im Skriptarchiv nach Portfolio-Skripten gesucht - leider nichts zu finden. Extensis erklärt auf der eigenen Website, dass sie keine Fragen über die Benutzung der Skriptsprachen beantworten können. Irgendwelche Links zu Beispielskripten waren auch nicht zu finden. Ob je jemand Portfolio geskriptet hat? _________________ Peter
-
Fischer-Bayern.de|Shadetreemicro.com
Zuletzt bearbeitet von Snow am 22.02.2003 - 22:10, insgesamt einmal bearbeitet |
|
Nach oben |
|
 |
Snow Administrator


Anmeldedatum: 21.11.2000 Beiträge: 1946 Wohnort: Deiningen
|
Verfasst am: 27.04.2002 - 18:25 Titel: Extensis Portfolio scripten? |
|
|
Wahrscheinlich ist die AppleScript-Unterstützung in Portfolio fehlerhaft. Eine Suche im Archiv des bbs.macscripter.net brachte gerade mal 2 Beiträge hervor, die kein gutes Licht auf Portfolio's AppleScript-Unterstützung werfen:
Posted By: Kevin Muldoon <kmuldoon@cpsgroup.com> (dallas-pix.bjke.com)
Date: Tuesday, 26 June 2001, at 11:05 a.m.
I can't say enough bad things about the AppleScript support of Extensis Portfolio. Hopefully, there is someone here who knows how to do this.
I would like Portfolio to return all the selected (highlighted) records in the catalog so that the script can take action on those records. The library has a 'selected' command, but doesn't seem to return any data I can work with.
Thanks!
Posted By: Mepasha <mepasha@macbox.com> (user-2inih3l.dialup.mindspring.com)
Date: Sunday, 5 August 2001, at 10:23 p.m.
I'm an intermediate scripter, fairly well versed in reading dictionaries and deciphering the necessary syntax for command lines, but for the life of me I can't figure out the syntax for saving a gallery in Portfolio 5 after making content changes to it so that I can close or quit the application without getting the "Do you want to save changes" dialog. The "with saving" optional parameter just doesn't seem to work. I've tried so many configurations using the "save", "close" and "quit" commands and I just can't get it to work. Any ideas or examples would be greatly appreciated! thanks
Sieht nicht gut aus.  _________________ Peter
-
Fischer-Bayern.de|Shadetreemicro.com
Zuletzt bearbeitet von Snow am 22.02.2003 - 22:12, insgesamt einmal bearbeitet |
|
Nach oben |
|
 |
Daisy •-->

Anmeldedatum: 26.04.2002 Beiträge: 79
|
Verfasst am: 27.04.2002 - 21:38 Titel: Extensis Portfolio scripten? |
|
|
Hallo Snow,
vielen Dank für Deine umfangreichen Bemühungen! Ich hatte das Ergebnis schon fast befürchtet. Natürlich hatte ich auch schon das ganze Web nach Informationen abgesucht und auch fast nix gefunden - das musste Gründe haben (. Wundern tut's mich aber doch schon etwas, da Extensis den Applescripten ja sogar ein eigenes Menü eingeräumt hat.
Sollte ich jemals noch etwas dazu herausfinden werde ich es auf jeden Fall hier posten (falls erwünscht?).
Liebe Grüße,
Daisy |
|
Nach oben |
|
 |
Snow Administrator


Anmeldedatum: 21.11.2000 Beiträge: 1946 Wohnort: Deiningen
|
Verfasst am: 27.04.2002 - 22:44 Titel: Extensis Portfolio scripten? |
|
|
Zitat: | Zitat: von Daisy am 21:38 Uhr am 27 April 2002
Hallo Snow,
vielen Dank für Deine umfangreichen Bemühungen! Ich hatte das Ergebnis schon fast befürchtet. Natürlich hatte ich auch schon das ganze Web nach Informationen abgesucht und auch fast nix gefunden - das musste Gründe haben . Wundern tut's mich aber doch schon etwas, da Extensis den Applescripten ja sogar ein eigenes Menü eingeräumt hat. |
Die Art und Weise, wie sie das gemacht haben deutet aber nicht gerade darauf hin, dass sie besonders überzeugt von ihrer AppleScript-Implementierung sind. Wenn man sich im Vergleich dazu einmal BBEdit oder TexEdit Plus ansieht - da ist der Scripts-Ordner bereits prall gefüllt mit nützlichen Skripten. So hat man auch gleich Beispiele an der Hand.
Zitat: | Sollte ich jemals noch etwas dazu herausfinden werde ich es auf jeden Fall hier posten (falls erwünscht?).
|
Das ist sogar Pflicht!
Gruß _________________ Peter
-
Fischer-Bayern.de|Shadetreemicro.com
Zuletzt bearbeitet von Snow am 22.02.2003 - 22:07, insgesamt einmal bearbeitet |
|
Nach oben |
|
 |
Daisy •-->

Anmeldedatum: 26.04.2002 Beiträge: 79
|
Verfasst am: 29.04.2002 - 22:26 Titel: Extensis Portfolio scripten? |
|
|
Hallo Snow, liebes Forum,
jetzt habe ich doch noch Rückmeldung auf meinen Hilfeschrei aus einer anderen Ecke erhalten. Von dem Typ, der "PortfolioFAQ.com" betreibt. Er schreibt mir 'ne ganze Menge, aber ich blix absolut net ... Wer hilft mir, da was Sinnvolles draus zu machen? Leider hat er mir nämlich auch geschrieben, dass er die nächsten Tage nicht erreichbar ist.
Hier die wichtigsten Passagen aus seinen Mails:
Based on documentation of the AppleScript side of things the method takes the current gallery's records - or selection therein - depending on the parent object and pastes them into another gallery.
I believe the code should be:
' A variable to hold the integer returned by GalleryCopy
Dim intErr as Integer
' I'll assume v5 a Portfolio doc has been set as 'PortObj'
' Now copy all Gallery index #1 records to gallery index #2
intErr = PortObj.Gallery(1).AllRecords.GalleryCopy(2)
' or the same only using the selected records
intErr = PortObj.Gallery(1).SelectedRecords.GalleryCopy(2)
My PortfolioFAQ explains about Gallery numbering and linking to names.
Other points to consider:
1. To avoid unexpected errors make sure both Galleries are open and
do a PortObj.Count to ensure all galleries are indexed properly - I've had
weird behaviour when calling newly made Galleries which I suspect were
unindexed.
2. I expect the function will return zero or an error code such as
explained on a page in the FAQ.
... und in einer zweiten Mail berichtigt er sich nochmal:
This works:
Dim lngCount as LOng
Dim intErr As Integer
lngLong = PortObj.Count
MsgBox lngLong
MsgBox "1 = " & PortObj.Gallery(1).GalleryName
MsgBox "2 = " & PortObj.Gallery(2).GalleryName
intErr = PortObj.Gallery(2).AllRecords.GalleryCopy(1)
MsgBox intErr 'Reports zero if success
~~~~~~~~~~~~~~~~~~~~~
I got it wrong before. In pseudocode the method is :
PortObj.TargetGallery.AllRecords.SourceGallery
(or ...SelectedRecords...)
I had it the wrong way round in my first reply!
I noted one other thing, the GalleryName includes the asterisk denoteing the dirty state. So although the TLB has no 'dirty' flag property you can parse it from the Gallery's name!
Liebe Grüße,
Daisy |
|
Nach oben |
|
 |
Daisy •-->

Anmeldedatum: 26.04.2002 Beiträge: 79
|
Verfasst am: 04.05.2002 - 20:03 Titel: Extensis Portfolio scripten? |
|
|
.. das war leider nix,
ich habe bei dem freundlichen Menschen von PortfolioFaq.com nochmal nachgehakt - er musste leider zugeben dass das alles Quatsch war, was er mir da geschrieben hat (siehe mein vorangegangener Beitrag) - das war irgendwas für die DOSe - jedenfalls wenig hilfreich für mein Applescript-Problem. Schade ...
Nach wie vor bin ich für jeden Tipp zum Thema dankbar.
Gruß,
Daisy |
|
Nach oben |
|
 |
|
|
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen.
|
Powered by phpBB © 2001, 2002 phpBB Group Deutsche Übersetzung von phpBB.de
|
|
|