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

Anmeldedatum: 31.01.2002 Beiträge: 25
|
Verfasst am: 07.08.2002 - 17:34 Titel: eigenartiges.... - scripte auf versch. macs ??? |
|
|
hallo, habe mal wieder eine Frage zu einem colorsync- applescript:
"parameter-error" in colorsync auf QS 733. 9.2.2 ( OS-X auf gleichem Rechner) ; auf dem imac 400/ 9.2.1. läuft es. Das beste darin ist, dass ich die ascriptdateien sowie die AS-extension vom imac auf den g-4 installiert habe !!! (Version D1-1.6) die colorsyncsystemdateien sind ebenfalls identisch !!!
Der Fehler erscheint bei: --> on open selection, -->set resultFilePath to...... (path to desktop as string)
>property textButton : "Textdatei"
property dialogButton : "Dialog"
global feedback, resultFilePath, theFileName
on run
display dialog "Bewegen Sie ein Bild oder Profil auf dieses Skriptprogramm, um die Informationen über das Profil anzuzeigen." buttons {"OK"} default button 1
end run
on open theSelection
set feedback to button returned of (display dialog "Informationen als Textdateien oder Dialoge anzeigen?" buttons {textButton, dialogButton} default button 2)
tell application "Finder"
set resultFilePath to (path to desktop as string) & "showProfileInfo.txt"
if exists file resultFilePath then delete file resultFilePath
end tell
handle(theSelection)
tell application "Finder"
if (exists file resultFilePath) and (feedback is textButton) then open file resultFilePath
end tell
end open
on handle(theList)
repeat with thisFile in theList
try
set thisFile to thisFile as alias
tell application "Finder" to set theFileType to file type of thisFile
tell application "Finder" to set theFileName to name of thisFile
if theFileType is in {"TIFF", "JPEG", "GIFf"} then
tell application "ColorSync Erweiterung"
set openImage to open thisFile
set profCount to count of every profile of openImage
end tell
if profCount is 0 then
display dialog "Kein Profil in " & theFileName buttons {"OK"} default button 1
else
tell application "ColorSync Erweiterung" to set theProfile to profile 1 of openImage
if feedback is textButton then writeOut(getProfileInfoList(theProfile))
if feedback is dialogButton then display dialog getProfileInfoList(theProfile) buttons {"OK"} default button 1
end if
tell application "ColorSync Erweiterung" to close openImage
else if theFileType is in {"prof"} then
tell application "ColorSync Erweiterung" to set theProfile to (first profile whose location is thisFile)
try
get theProfile
if feedback is textButton then writeOut(getProfileInfoList(theProfile))
if feedback is dialogButton then display dialog getProfileInfoList(theProfile) buttons {"OK"} default button 1
on error
set errmsg to theFileName & " ist nicht installiert oder ist ungültig"
if feedback is textButton then writeOut(return & theFileName & return & errmsg & return)
if feedback is dialogButton then display dialog "Fehler in " & theFileName & return & errmsg
end try
else
if feedback is textButton then writeOut(return & "Nicht unterstützter Dateityp " & theFileType & " von " & theFileName & return)
if feedback is dialogButton then display dialog "Nicht unterstützter Dateityp " & theFileType & " von " & theFileName buttons {"OK"} default button 1
end if
on error errmsg number errnum
--bring up a dialog to inform the user
display dialog errmsg buttons {"OK"} default button 1
--but we won't return an error, this way we'll just blow off any errors we encounter
--with multiple files, and keep processing the rest of the files in the selection
end try
end repeat
end handle
--returns the attributes of a profile
--as a list of strings
on getProfileInfoList(prof)
--some profile attributes are strings, but others (intent, quality) are constants
--just coerce the constants into strings so we have a list of string variables
tell application "ColorSync Erweiterung"
set profName to name of prof
set profClass to device class of prof as string
set profPlatform to platform of prof
set profManufacturer to device manufacturer of prof
set profModel to device model of prof
set profColor to color space of prof as string
set profConnection to connection space of prof as string
set profQuality to quality of prof as string
set profIntent to rendering intent of prof as string
set profCMM to preferred CMM of prof
set profCreator to creator of prof
set profSize to size of prof
set profVersion to version of prof
set profDate to creation date of prof
end tell
--concatenate all the above into one big string for display in a standard dialog window
--anything over 255 characters will be truncated by the dialog
--which is why there's no "location" here
set returnString to return & "Datei " & theFileName & return ¨
& "Profil " & profName & return ¨
& "Klasse " & profClass & return ¨
& "Plattform " & profPlatform & return ¨
& "Hersteller " & profManufacturer & return ¨
& "Modell " & profModel & return ¨
& "Farbraum " & profColor & return ¨
& "Einbindung " & profConnection & return ¨
& "Qualität " & profQuality & return ¨
& "Farbanpassungsart " & profIntent & return ¨
& "CMM " & profCMM & return ¨
& "Größe " & profSize & return ¨
& "Datum " & profDate & return
--& "Creator " & profCreator & return ¨
--& "Version " & profVersion & return ¨
return returnString
end getProfileInfoList
on writeOut(theString)
--write out results to text file, returns an integer reference number
set fileRefNum to (open for access file resultFilePath with write permission)
write theString to fileRefNum starting at eof
close access fileRefNum
end writeOut<
wieo läuft das auif einer Kiste, und auf der anderen nicht ??? wie kann ich das script debuggen ???
Danke, tAmbo |
|
Nach oben |
|
 |
Snow Administrator


Anmeldedatum: 21.11.2000 Beiträge: 1946 Wohnort: Deiningen
|
Verfasst am: 07.08.2002 - 19:01 Titel: eigenartiges.... |
|
|
Hallo tAmbo,
vielleicht hilft dir folgender run-Handler beim Debuggen:
on run
--display dialog "Bewegen Sie ein Bild oder Profil auf dieses Skriptprogramm, um die Informationen über das Profil anzuzeigen." buttons { "OK" } default button 1
set theSelection to { choose file with prompt "Bild oder Colorsync-Profil auswählen" }
set feedback to button returned of (display dialog "Informationen als Textdateien oder Dialoge anzeigen?" buttons { textButton, dialogButton } default button 2)
tell application "Finder"
set resultFilePath to (path to desktop as string) & "showProfileInfo.txt"
if exists file resultFilePath then delete file resultFilePath
end tell
handle(theSelection)
tell application "Finder"
if (exists file resultFilePath) and (feedback is textButton) then open file resultFilePath
end tell
end run
Damit hast du praktisch die gleichen Voraussetzungen wie beim open-Handler, kannst die Sache aber im Eventprotokoll mitverfolgen.
Evtl. solltest du die "Standard Additions" vom iMac auch noch auf dem G4 installieren (path to = "Standard Additions"). _________________ Peter
-
Fischer-Bayern.de|Shadetreemicro.com
Zuletzt bearbeitet von Snow am 22.02.2003 - 15:55, insgesamt einmal bearbeitet |
|
Nach oben |
|
 |
Folker •---->


Anmeldedatum: 11.12.2000 Beiträge: 649 Wohnort: Holsteinische Schweiz
|
Verfasst am: 08.08.2002 - 09:35 Titel: eigenartiges.... |
|
|
Ja, würde auch ich als erstes vermuten. Die Scripting Additions auf beiden Rechnern prüfen und gegebenenfalls abgleichen. Ebenso solltest Du die ColorSync Versionen überprüfen. Evtl. hat ein Rechner eine neuere Version. Dort könnte dann die Syntax leicht abgeändert sein (allerdings ist das eher selten der Fall).
Gruß,
Folker
PS: In jedem fall beteiligte Scripte öffnen und neu kompilieren (einfach irgendwo ein Return reinhauen) - da erkennt man dann schon Syntaxänderungen bzw. fehlende Additions.
(Geändert von Folker um 9:37 Uhr am 8 Aug. 2002) _________________ Gruß,
Folker Brandt
=============================
Systemberatung · Datenbanken · Webdesign |
|
Nach oben |
|
 |
tAmbo •-->

Anmeldedatum: 31.01.2002 Beiträge: 25
|
Verfasst am: 08.08.2002 - 10:15 Titel: eigenartiges.... |
|
|
danke Euch beiden, es waren die verflixten Scripting Additions, die meinen grauen Zellen entgangen sind ...Colorsync hatte ich schon vorher abgegelichen..... da gibts auch buggy versionen, z.b. die vom 9.0 und 9.04, die sind kaum brauchbar, sodass der chef-colorsync-entwickler von apple nen patch auf seiner eigenen site angeboten hatte..... |
|
Nach oben |
|
 |
Folker •---->


Anmeldedatum: 11.12.2000 Beiträge: 649 Wohnort: Holsteinische Schweiz
|
Verfasst am: 08.08.2002 - 10:29 Titel: eigenartiges.... |
|
|
Ja, Apple is' auch nich' mehr das was es mal war Ö  _________________ Gruß,
Folker Brandt
=============================
Systemberatung · Datenbanken · Webdesign |
|
Nach oben |
|
 |
tAmbo •-->

Anmeldedatum: 31.01.2002 Beiträge: 25
|
Verfasst am: 09.08.2002 - 11:28 Titel: eigenartiges.... |
|
|
>Ja, Apple is' auch nich' mehr das was es mal war Ö<
au weia, gleich gibts haue :devil:
gruss, tAmbo _________________ tambo/suretta |
|
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
|
|
|