Fischer-Bayern.de
 FAQFAQ   SuchenSuchen   MitgliederlisteMitgliederliste   BenutzergruppenBenutzergruppen   RegistrierenRegistrieren 
 ProfilProfil   Einloggen, um private Nachrichten zu lesenEinloggen, um private Nachrichten zu lesen   LoginLogin 

Dokumente vereinen - gescannte Dokumente als PDF zusammenfas

 
Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.   Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.    Fischer-Bayern.de Foren-Übersicht -> AppleScript-Forum
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen  
Autor Nachricht
solar
•->
•->


Anmeldedatum: 03.08.2002
Beiträge: 7
Wohnort: Bern, Switzerland

BeitragVerfasst am: 03.08.2002 - 16:18    Titel: Dokumente vereinen - gescannte Dokumente als PDF zusammenfas Antworten mit Zitat

Hallo!
Ich habe ein 80-seitiges, zweiseitg bedrucktes Dokument gescannt. Ich muss die Seiten jeweils einzeln abspeichern, die ungeraden sind ineinem Ordner, die geraden in einem anderen. Ich hab jede Datei als PDF abgespeichert. Nun möchte ich das ganze Dokument zusammenfassen:
Seite 1 (abgespeicher als 1) Ordner  a
Seite 2 (abgespeichert als 1) Ordner b
Seite 3 (abgespeichert als 2) Ordner a
Seite 4 (abgespeichert als 2) Ordner b
etc...

Ich hab nun ziemlich lange überlegt, wie ich das bewerkstelligen könnte, bin aber, ausser der Idee, mit Apple Script dies zu machen, auf nichts weiters gekommen.

Hab OSX (10.1.2), Acrobat oder auch anderes zur Verfügung.
Wer kann mir helfen?
_________________
Herzlichen Dank f¸r Antwort!
Peter, Bern, Schweiz
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden
Folker
•---->
•---->


Anmeldedatum: 11.12.2000
Beiträge: 649
Wohnort: Holsteinische Schweiz

BeitragVerfasst am: 05.08.2002 - 09:52    Titel: Dokumente vereinen Antworten mit Zitat

Hallo Peter,

so, kurz das Forum gewechselt Smile
Problem meinerseits ist, ich kenne Acrobat nur rudimentär und kann da eigentlich wenig helfen. Kannst Du nicht einfach mal das Verzeichnis der Klassen und Befehle rauskopieren und mir zumailen oder hier ins Forum stellen?
Ich kann so nicht beurteilen, ob es nicht evtl. besser gewesen wäre, die einzelnen Seiten in ein Layoutprogramm-kompatibles Format zu bringen und ein komplettes Dokument in dem Layoutprogramm aufzubauen. Mit diesem wird dann meines Wissens eine Postscript-Datei geschrieben. Mit dieser Datei kann Acrobat dann wunderbar ein PDF erzeugen. Wie mit mehreren PDF's eines erstellt wird weiß ich selbst nicht und kann das z.Zt. auch nicht testen.

Gruß,
Folker
_________________
Gruß,
Folker Brandt
=============================
Systemberatung · Datenbanken · Webdesign
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
Snow
Administrator
Administrator


Anmeldedatum: 21.11.2000
Beiträge: 1946
Wohnort: Deiningen

BeitragVerfasst am: 05.08.2002 - 13:07    Titel: Dokumente vereinen Antworten mit Zitat

Hallo Peter, Folker,

ich habe hier nur Acrobat 4.0 und mache eigentlich auch kaum was damit, deshalb kenne ich mich auch kaum damit aus.

Hier mal das Verzeichnis:

Core Suite: The subset of the Core suite that Acrobat Viewers support

close: Close a document
close reference -- The document to close
saving constant -- Whether to save before closing, or not, or ask first
linearize boolean -- If saving the document before closing, whether it should be linearized

count: Return the number of elements of a particular class within the object
count reference -- The object whose elements are to be counted
each type class -- The class of the elements to be counted. Keyword ëeachí is optional in AppleScript.
Result: integer -- The number of elements

delete: Delete an element from an object
delete reference -- The object to delete

exists: Verify if an object exists
exists reference -- The object to verify
Result: boolean -- true if it exists, false if not

get: Get the data or properties of an object
get reference -- the object whose data is to be returned
Result: anything -- the data from the object

hide: Hide the Application
hide reference -- The application

make: Create a new object
make
new
type class -- The class of the new object (the ³new² keyword is optional in AppleScript).
at location reference -- The location at which to insert the new object
Result: reference -- An object specifier for the new object

move: Move object (only PDPages can be moved).
move reference -- The PDPage object to move
to location reference -- The new location for the object
[Result: reference]

open: Open document(s)
open a list of alias
invisible boolean -- Whether the opened document should be displayed on screen or not. (default is visible).

quit: Perform tasks before termination, then terminate execution
quit
saving constant -- Whether to save before closing, or not, or ask first

save: Save the document
save reference -- The document to be saved
to alias -- An alias to the file in which to save the document
linearize boolean] -- Whether the document should be saved as linearized

set: Set an object's data or properties
set reference -- The object whose properties are to be changed
to anything -- the new value

Class application: An application program

Elements:
document by name, by numeric index
menu by name, by numeric index
menu item by name
AVPageView by name, by numeric index
Properties:
active doc reference -- The active document
active tool international text -- The type of the currently active tool
best type type class [r/o] -- The best descriptor type
case sensitivity boolean -- Whether searches are case sensitive
class type class [r/o] -- The class
default type type class [r/o] -- The default descriptor type
default zoom factor small real -- The default zoom factor at which new documents are displayed at
default zoom type constant -- The default zoom type, determining the zoom and fit attributes at new document open time. Valid values are ³no vary², ³fit page², ³fit width², ³fit height², and ³fit visible width².
frontmost boolean [r/o] -- Is this the frontmost application?
long menu visibility boolean -- Whether long menus are visible or not
open dialog at startup boolean -- Whether the open dialog is shown at startup when Acrobat is launched without a PDF file to open
name international text [r/o] -- The applicationís name
note color 'RGB ' -- The color of the border around newly created text annotations.
PS level integer -- The PostScript level to be used when printing, etc.
show splash at startup boolean -- Whether the splash screen is shown at startup
shrink to fit boolean
skip warnings boolean -- Whether to skip warning dialogs during program execution
text note label international text -- The text that will appear in the ³title bar² of all newly created text notes
toolbar visibility boolean -- Whether the ToolBar is visible
UI language international text [r/o] -- Identifys which language Acrobatís UI is using. This is a 3 character language codes (ENU is English, for instance).
version integer [r/o] -- The version number of the application
whole word searching boolean -- Whether searches are for whole words
page units international text -- Default page display units. One of Points, Inches, or Millimeters.
note font name international text -- Default note annotation font name
note font size integer -- Default note annotation font size
highlight color 'RGB ' -- Color used to highlight selections
use fullscreen timer boolean -- Whether to use timer to advance pages in fullscreen mode
anti-alias text boolean -- Whether to anti-alias text and monochrome images
page layout international text -- Default page layout
save as linearize boolean -- Default save documents as linearized
maximum documents 'pmdc' [r/o] -- Maximum number of open documents
fullscreen transition international text [r/o] -- Default fullscreen transition
fullscreen click advances boolean -- Mouse click advances in fullscreen mode
fullscreen escape boolean -- Escape key exits fullscreen mode
fullscreen cursor boolean -- Hide cursor in fullscreen mode
open in place boolean -- Open cross document links in the same window
download entire file boolean -- Whether to download entire file

Class document: An Acrobat document
Elements:
PDPage by numeric index
PDBookmark by name, by numeric index
AVPageView
Properties:
best type type class [r/o] -- The best descriptor type
bounds bounding rectangle [r/o] -- The boundary rectangle for the documentís window, in screen coordinates (left, top, right, bottom). Note that (0,0) is in the upper left.
class type class [r/o] -- The class
default type type class [r/o] -- The default descriptor type
file alias alias [r/o] -- An alias to the file where the doc will be saved to if no other name is supplied. This is usually the same file as where it the document was read in from.
name international text [r/o] -- The documentís name (as shown in the windowís titlebar).
modified boolean [r/o] -- Whether the document has been modified enough to warrant saving.
view mode constant -- The view mode of the document (one of: ³just pages², ³pages and thumbs², or ³pages and bookmarks²).



Acrobat Viewer Suite: Acrobat-specific event IDs and objects

bring to front: Bring the window containing the document to the front
bring to front reference -- The document whose window is to be brought to the front. This makes the document inside the window the ³active document²

clear selection: Clear any document selection
clear selection reference -- The document whose selection is to be cleared

close all docs: Close all documents, with optional saving first
close all docs
saving constant] -- Whether to save before closing, or not, or ask user

create thumbs: Create thumbnails for all pages in the document
create thumbs reference -- The document inside which to create the thumbnails

delete pages: Deletes the specified pages in the document
delete pages reference -- The document containing the pages to be deleted
first integer -- The first page to delete
last integer -- The last page to delete

delete thumbs: Delete all thumbnails from the document
delete thumbs reference -- The document whose thumbnails are to be deleted

execute: Execute the menu item as if the user clicked on it
execute reference -- The menu item to execute

find next note: Find and select the next text note
find next note reference -- The document to search
wrap around boolean] -- Whether searches should wrap-around to continue from beginning of document if not found by end of document (default is no)
Result: reference -- The found text annotation.

find text: find text in a document
find text reference -- The document to search
string international text -- The string to search for
Case sensitive boolean -- Whether searching is case sensitive
whole words boolean -- Whether to search for a whole word match
wrap around boolean -- Whether searches should wrap-around to continue from beginning of document if not found by end of document (default is no)
Result: string -- The found word.

get info: Get the string associated with the specified key
get info reference -- The document containing the Info dictionary where the key/value pair is stored
key international text -- The key under which the value is stored

go backward: Go to the previous view in the stored view chain
go backward reference -- The AVPageView object

go forward: Go to the next view in the stored view chain
go forward reference -- The AVPageView object

goto: make the view goto the specified page number
goto reference -- The AVPageView object
page integer -- the number of the page to be displayed

goto next: display the page after the one currently displayed in the AVPageView
goto next reference -- The AVPageView object

goto previous: display the page before the one currently displayed in the AVPageView
goto previous reference -- The AVPageView object

insert pages: Insert page(s) from another document
insert pages reference -- The document to receive the inserted page(s)
after integer -- The page after which page(s) will be inserted
from reference -- The source document, where the inserted page(s) are from
starting with integer -- The first page to insert
number of pages integer -- The number of pages, including the first page, to insert
[insert bookmarks boolean] -- Whether to copy bookmarks referencing the inserted pages over, or not (default is yes)

is toolbutton enabled: return whether the specified toolbutton is enabled or not
is toolbutton enabled reference -- The application object
named international text -- The name of the toolbutton whose enabled state is being queried
Result: boolean

maximize: Set the documentís windowís size to be the maximum or its original size.
maximize reference -- The window to be maximized
max size boolean -- Whether to make the documentís window full size (true), or original size (false)

perform: Causes the objectís action to be executed
perform reference -- The object (PDBookmark or link PDAction) whose action is to be performed

print pages: Print page(s) from a document
print pages reference -- The document containing the pages to print
first integer -- The first page to print (defaults to first page in doc)
last integer -- The last page to print (defaults to last page in doc)
PS Level integer -- The PS level (required only for PostScript printing, defaults to level 1)
binary output boolean -- Whether binary output is OK (Required for PostScript printing only, defaults FALSE)
[shrink to fit boolean] -- Whether page should be shrunk to fit paper in printer (defaults FALSE)

read page down: scroll to the next screenís worth
read page down reference -- The AVPageView object

read page up: scroll to the previous screenís worth
read page up reference -- The AVPageView object

remove toolbutton: Remove the specified toolbutton from the toolbar.
remove toolbutton reference -- The application object
named international text -- The name of the toolbutton to be removed

replace pages: Replaces page(s) with page(s) from another document
replace pages reference -- the document whose page(s) are to be replaced
over integer -- The first page to be replaced
from reference -- The document where the replacement page(s) are coming from
starting with integer -- The first page to be copied over
number of pages integer -- The number of pages, including the first page, to replace
merge notes boolean -- Whether to copy notes from the source document over, or not (default is yes)

scroll: Scroll the page by the specified amount (in device space)
scroll reference -- The AVPageView object
X Amount integer -- The amount to scroll in the horizontal direction, in pixels.
Y Amount integer -- The amount to scroll in the vertical direction, in pixels.

select text: Selects text as specified by either character or word offsets
select text reference -- The AVPageView in which to set the selection
from words a list of integer -- One or more pairs of word offsets (from beginning of document) and word lengths (number of contiguous words).
from chars a list of integer -- One or more pairs of character offsets (from beginning of page) and character lengths (number of contiguous characters).

set info: Set a key/value string pair in the documentís Info dictionary
set info reference -- The document whose info dictionary is to be modified
key international text -- The key under which the string value is to be stored
value international text -- The value to be stored

zoom: zoom the display of the current page
zoom reference -- The AVPageView object
to small real -- the zoom factor, in percent (100 is normal, fullsize)

Class AVPageView: The view containing the currently displayed page of the specified document (corresponds to Acrobatís AVPageView object)
Elements:
PDPage
Properties:
best type type class [r/o] -- The best descriptor type
class type class [r/o] -- The class
default type type class [r/o] -- The default descriptor type
name international text [r/o] -- The documentís name (as shown in the windowís titlebar).
page number integer -- the number of the current displayed page
zoom factor small real -- The current zoom factor
zoom type constant -- The zooming and content fitting algorithm current employed. Valid values are ³no vary², ³fit page², ³fit width², ³fit height², and ³fit visible width².

Class PDPage: A document page (corresponds to Acrobatís PDPage object)
Elements:
PDAnnot by numeric index
Properties:
best type type class [r/o] -- The best descriptor type
bounds a list of small real -- The boundary rectangle for the page, in PDF space (left, top, right, bottom).
class type class [r/o] -- The class
default type type class [r/o] -- The default descriptor type
number integer [r/o] -- The pageís number
rotation integer -- The rotation angle of the page (0, 90, 180, 270).

Class PDBookmark: A bookmark (corresponds to Acrobatís PDBookmark object)
Properties:
best type type class [r/o] -- The best descriptor type
class type class [r/o] -- The class
default type type class [r/o] -- The default descriptor type
destination page number integer -- The number of the page the view goes to when the bookmark is performed.
destination rectangle a list of small real -- The boundary rectangle for the view of the destination, in PDF space (left, top, right, bottom). [Set this only after setting the fit type property]
fit type constantindex integer [r/o] -- The bookmarkís index within the Document.
name international text -- The bookmarkís title
zoom factor small real -- If fit type is ³Left Top Zoom², then this specifies the zoom factor, otherwise, this property is ignored. Setting this property automatically sets the fit type to ³Left Top Zoom.²

Class PDAnnot: An annotation (corresponds to Acrobatís PDAnnot, PDTextAnnot, and PDLinkAnnot objects).
Properties:
best type type class [r/o] -- The best descriptor type
bounds a list of small real -- The boundary rectangle for the annotation, in PDF space (left, top, right, bottom).
class type class [r/o] -- The class
color 'RGB ' -- The color of the border around the annotation
contents international text -- Text subtype only: The textual contents of the annotation
default type type class [r/o] -- The default descriptor type
destination page number integer -- Link subtype only: The number of the page the view goes to when the link annotation is performed.
destination rectangle a list of small real -- Link subtype only: The boundary rectangle for the view of the destination, in PDF space (left, top, right, bottom).
fit type constantindex integer [r/o] -- The annotationís index within the PDPage.
modification date date -- The date and time the annotation was last modified
name international text -- Text subtypes only: The annotationís label
open state boolean -- Text subtype only: Whether the annotation is open
subtype international text [r/o] -- The subtype of the annotation
zoom factor small real -- Link subtype only: If fit type is ³Left Top Zoom², then this specifies the zoom factor, otherwise, this property is ignored. Setting this property automatically sets the fit type to ³Left Top Zoom.²

Class PDTextAnnot: Only use this class as the target of a Make command!

Class PDLinkAnnot: Only use this class as the target of a Make command!



miscellaneous standards: Standard AppleEvent constructs that donít belong to a suite

Class menu: A menu (encapsulating Acrobatís AVMenu object)
Elements:
menu item by name, by numeric index
Properties:
best type type class [r/o] -- The best descriptor type
class type class [r/o] -- The class
default type type class [r/o] -- The default descriptor type
name international text [r/o] -- The menuís name (a language-independent name that uniquely identifies the menu)
title international text [r/o] -- The menuís title (as shown in the menu itself). This title will be in the applicationís UI language.

Class menu item: A menu item (encapsulating Acrobatís AVMenuItem object)
Properties:
best type type class [r/o] -- The best descriptor type
class type class [r/o] -- The class
default type type class [r/o] -- The default descriptor type
enabled boolean [r/o] -- Whether the menu item is enabled
marked boolean [r/o] -- Whether the menu item is checked
name international text [r/o] -- The menu itemís name (a language-independent name that uniquely identifies the menu item)
title international text -- The menu itemís title (as shown in the menu item itself). This title will be in the applicationís UI language.
has submenu boolean [r/o] -- Whether the menu item has a hierarchical sub-menu.



HTH
_________________
Peter
-
Fischer-Bayern.de|Shadetreemicro.com


Zuletzt bearbeitet von Snow am 22.02.2003 - 15:58, insgesamt einmal bearbeitet
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen AIM-Name
Snow
Administrator
Administrator


Anmeldedatum: 21.11.2000
Beiträge: 1946
Wohnort: Deiningen

BeitragVerfasst am: 05.08.2002 - 13:41    Titel: Dokumente vereinen Antworten mit Zitat

So, nachdem ich jetzt zweimal die Formatierungen noch ausgebessert habe, habe ich das Befehlsverzeichnis auch etwas kennengelernt. :wink:

So wie ich das sehe, müsste die erste Seite geöffnet werden und dann dürfte insert pages weiterhelfen.
_________________
Peter
-
Fischer-Bayern.de|Shadetreemicro.com
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen AIM-Name
solar
•->
•->


Anmeldedatum: 03.08.2002
Beiträge: 7
Wohnort: Bern, Switzerland

BeitragVerfasst am: 05.08.2002 - 15:59    Titel: Dokumente vereinen Antworten mit Zitat

Hallo miteinander!
Hab mir noch etwas anderes überlegt. Zuerst könnte ich ja die verschiedenen Teile schön der Reihenfolge nach umbenennen, damit sie der Reihenfolge nach sortiert sind.
Dazu müsste ich die Dateien öffnen und dann in Zweierschritten hochzählen:
Lehrplan 1 wird 1
Lehrplan 2 wird 3
Lehrplan 3 wird 5
usw.

Ausserdem hab ich etwas falsch geschrieben:
u43 wird 2
u42 wird 4
u41 wird 6
usw.

Leider weiss ich nicht, wie ich das machen kann!

Hier ein Anfang:

tell application "Finder"
activate
select folder "Neuer Ordner" of folder "Scans" of folder "Drop Box" of disk "peter"
set expanded of selection to true
select file "Lehrplan#1" of folder "Neuer Ordner" of folder "Scans" of folder "Drop Box" of disk "peter"
set name of selection to "1"
select folder "Neuer Ordner1" of folder "Scans" of folder "Drop Box" of disk "peter"
set expanded of selection to true
select file "u#43" of folder "Neuer Ordner1" of folder "Scans" of folder "Drop Box" of disk "peter"
set name of selection to "2"
select file "Lehrplan#2" of folder "Neuer Ordner" of folder "Scans" of folder "Drop Box" of disk "peter"
set name of selection to "3"
select file "u#42" of folder "Neuer Ordner1" of folder "Scans" of folder "Drop Box" of disk "peter"
set name of selection to "4"
end tell

Das ist natürlich nicht automatisch, da weiss ich wiederum nicht weiter...
Grüsse
Peter, Bern, Schweiz
_________________
Herzlichen Dank f¸r Antwort!
Peter, Bern, Schweiz
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden
Folker
•---->
•---->


Anmeldedatum: 11.12.2000
Beiträge: 649
Wohnort: Holsteinische Schweiz

BeitragVerfasst am: 05.08.2002 - 16:51    Titel: Dokumente vereinen Antworten mit Zitat

Nein, das ist gar nicht nötig! Die Dateien haben ja alle den gleichen Namen, nur die Nummer unterscheidet sie - das reicht!

set the_FolderU to (choose folder with prompt "Ungerade Seiten:") as text
set the_FolderG to (choose folder with prompt "Gerade Seiten:") as text
set {temp_NameU, temp_NameG} to {"u#", "Lehrplan#"}
set x to 0
set {the_Bool1, the_Bool2} to {false, false}

repeat until ({the_Bool1, the_Bool2} = {true, true})
try
set x to (x + 1)
try
set the_FileU to (the_FolderU & temp_NameU & (x as string)) as alias
tell me to log the_FileU
-- verarbeite den Dateiverweis weiter
on error errmsg
set the_Bool1 to true
end try
try
set the_FileG to (the_FolderG & temp_NameG & (x as string)) as alias
tell me to log the_FileG
-- verarbeite den Dateiverweis weiter
on error
set the_Bool2 to true
end try
on error errmsg
display dialog errmsg
-- Fehler
end try
end repeat

So, das ginge sogar fast aus 1 Ordner besser - aber egal. Allerdings musst Du einiges an Sorgfalt walten lassen - kleine Ungenauigkeiten können schon einen ziemlichen Ärger bereiten! Das Script ist nur so hingepfuÖ dürfte eleganter sein!

Gruß,
Folker
_________________
Gruß,
Folker Brandt
=============================
Systemberatung · Datenbanken · Webdesign
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
Folker
•---->
•---->


Anmeldedatum: 11.12.2000
Beiträge: 649
Wohnort: Holsteinische Schweiz

BeitragVerfasst am: 05.08.2002 - 16:53    Titel: Dokumente vereinen Antworten mit Zitat

Achso, das 'tell me to log Ö' ist nur zur Kontrolle, kann raus. Wie Du jetzt weiter verarbeitest - hmm - leider kein Acrobat Experte heute hier im Forum Ö Nix desto trotz kann man mit dem Dateiverweis natürlich auch ein layoutprogramm beschicken
_________________
Gruß,
Folker Brandt
=============================
Systemberatung · Datenbanken · Webdesign
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
solar
•->
•->


Anmeldedatum: 03.08.2002
Beiträge: 7
Wohnort: Bern, Switzerland

BeitragVerfasst am: 05.08.2002 - 17:21    Titel: Dokumente vereinen Antworten mit Zitat

Hallo Folker!
Soweit mal lieben Dank! Ich habs natürlich gleich mal ausprobiert:
Zuerst wähle ich den Ordner U aus (in dem alle Dateien durchnumeriert sind mit "Lehrplan#1, Lehrplan#2 usw.), dann kann ich den zweiten Ordner auswählen (mit den Dateien "u#43, u#42 usw.) danach passiert nichts mehr...
Natürlich könnte ich die verschiedenen Dateien in einem Ordner haben - mir spielts eigentlich keine Rolle. Sie sind ja verschieden benannt und müssen erstmal in die richtige Reihenfolge kommen.
Grüsse
Peter
_________________
Herzlichen Dank f¸r Antwort!
Peter, Bern, Schweiz
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden
Folker
•---->
•---->


Anmeldedatum: 11.12.2000
Beiträge: 649
Wohnort: Holsteinische Schweiz

BeitragVerfasst am: 05.08.2002 - 17:37    Titel: Dokumente vereinen Antworten mit Zitat

Jo, hab ich da den Überblick verloren Wink ? Also u#x steht ja f. die Dateien der ungeraden Seiten - wichtig ist die richtige Auswahl der Ordner (LP2 für die ungeraden - da sträubte es sich bei mir, ungerade fängt mit 1 an Smile
In dem obigen Handler passiert auch noch nicht so viel, er arbeitet die Files der Reihe nach ab , allerdings auf Grund "künstlich" zusammengesetzter Dateipfade und nicht auf Grund v. 'list folder' - ich traue den Sortierfunktionen meist nicht über den weg, zumal in Deinem Falle dann die 11 auf die 1 folgen müsste Ö
Also dachte ich mir, anders ist es besser - allerdings müssen die Namen wirklich identisch sein - darum auch die Kontrolle mit dem 'tell me to log Ö' - das geht mit dem Freeware-Editor Smile wunderbar, gibt aber ähnliche Funktionen in Apple's Script-Editor. (Start log - Stop log ? Help, ich kenne den Editor kaum noch Wink
Das in den Ordnern jeweils gleich viele Dateien bzw. in dem Ungeraden max. 1 Datei mehr befinden dürfte/n habe ich voraus gesetzt - der handler steigt aus dem repeat-loop aus, wenn er in beiden Ordnern keine gültige Datei mehr findet - Du solltest in jedem Fall via 'log' die richtige Reihenfolge prüfen (oder mittels 'display dialog errmsg' im on error errmsg / end try)

Gruß,
Folker
_________________
Gruß,
Folker Brandt
=============================
Systemberatung · Datenbanken · Webdesign
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
solar
•->
•->


Anmeldedatum: 03.08.2002
Beiträge: 7
Wohnort: Bern, Switzerland

BeitragVerfasst am: 05.08.2002 - 18:46    Titel: Dokumente vereinen Antworten mit Zitat

hallo folker!
Ich glaub, momentan reden wir aneinander vorbei...

Ich hab die Dateien gescannt. Dabei wurden für die ungeraden Seiten die Namen "Lehrplan#1, Lehrplan#2, Lehrplan#3 usw. bis Lehrplan#43" vergeben. Für die geraden Seiten wurden die Namen "u#43, u#42, u#41 usw. bis u#1" vergeben.
Diese will ich nun übers Kreuz zusammenführen:

Lehrplan#1 wird zu 1
u#43 wird zu 2
Lehrplan#2 wird zu 3
u#42 wird zu 4
Lehrplaln#3 wird zu 5
u#41 wird zu 6
usw.
die können dann in einem einzigen Ordner abgespeichert werden....
Dann hätte ich nämlich erstmal die richtige Reihenfolge der Dokumente, danach kann ich schauen, wie ich diese zusammen als PDF abspeichere.
Ich hab gedacht, zuerst die Dokumente richtig benennen...
Erstmal hat das also gar nichts mit einem Programm ausser dem Finder zu tun und dem umbenennen der Dateien.
Ich kanns natürlich auch anders machen:

die Lehrpläne umbenennen in 1, 3, 5, etc.
und die u's umbenennen in 2, 4, 6 etc. hier ist aber noch die Schwierigkeit, dass von der letzten Datei aus gezählt werden muss!

wohin die abgespeichert werden, ist an und für sich zweitrangig, das kann ich ja problemlos noch verschieben.

Ach, weshalb ist das alles so kompliziert? Oder will ich was unmögliches? (ich glaub eher, ich kapiers einfach nicht selber zu machen)
Herzlich
Peter, Bern, Schweiz
_________________
Herzlichen Dank f¸r Antwort!
Peter, Bern, Schweiz
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden
solar
•->
•->


Anmeldedatum: 03.08.2002
Beiträge: 7
Wohnort: Bern, Switzerland

BeitragVerfasst am: 06.08.2002 - 09:29    Titel: Dokumente vereinen Antworten mit Zitat

Hallo!

so, ich hab den Beginn des Scirpts versucht zu schreiben, um Dateien zusammenzuführen... Leider gibts eine Fehlermeldung (Laufzeitfehler)

tell application "Acrobat 5.0"
activate
open (choose file)
insert pages
after letzte
end tell

Was ich genau möchte:
- Datei (TIFF) öffnen
- nächste Datei aus demselben Ordner anhängen
usw.
um zum Schluss das Ganze als PDF abspeichern zu können.

Kann mir jemand helfen?

Danke!
Peter, Bern, Schweiz
_________________
Herzlichen Dank f¸r Antwort!
Peter, Bern, Schweiz
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden
Folker
•---->
•---->


Anmeldedatum: 11.12.2000
Beiträge: 649
Wohnort: Holsteinische Schweiz

BeitragVerfasst am: 06.08.2002 - 09:32    Titel: Dokumente vereinen Antworten mit Zitat

--Diese Antwort kommt eigentlich auf den Beitrag vor dem vorhergehenden - da habe ich zu lange geschrieben - das Problem hast Du anscheinend schon gelöst Ö

Moin,

ja, kenne ich: Problem ist, zu wild darauf etwas zu tun und beim zweiten Hinsehen erkennt man die übersehenen Möglichkeiten. Soll heißen, der Ansatz ist nicht so gut gewähltÖ

--Script
property the_type : ".pdf" -- kannst nur Du wissen Ö

set temp1 to (set_nameGerade("u#"))
set temp2 to (set_nameUngerade("Lehrplan#"))
tell application "Finder"
move every item of (temp2 as alias) to (temp1 as alias)
end tell

on set_nameGerade(the_name)
set the_Fold to (choose folder with prompt "Gerade Seiten:") as string
set x to 0
tell application "Finder" to set y to count (every item where name of it contains the_name) of (the_Fold as alias)
repeat with i from y to 1 by -1
set x to (x + 2)
set new_name to ((text -3 thru -1 of "000" & (x as string)) & the_type)
tell application "Finder" to set name of ((the_Fold & the_name & (i as string)) as alias) to new_name
end repeat
return the_Fold
end set_nameGerade

on set_nameUngerade(the_name)
set the_Fold to (choose folder with prompt "Ungerade Seiten:") as string
set x to -1
tell application "Finder" to set y to count (every item where name of it contains the_name) of (the_Fold as alias)
repeat with i from 1 to y
set x to (x + 2)
set new_name to ((text -3 thru -1 of "000" & (x as string)) & the_type)
tell application "Finder" to set name of ((the_Fold & the_name & (i as string)) as alias) to new_name
end repeat
return the_Fold
end set_nameUngerade
--Scriptende

Damit kannst Du die Dateien umbenennen und in einen Ordner zusammenführen. Sortieren des Ordnerinhaltes wird einfacher Ö

Gruß,
Folker

(Geändert von Folker um 9:35 Uhr am 6 Aug. 2002)
_________________
Gruß,
Folker Brandt
=============================
Systemberatung · Datenbanken · Webdesign
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
Folker
•---->
•---->


Anmeldedatum: 11.12.2000
Beiträge: 649
Wohnort: Holsteinische Schweiz

BeitragVerfasst am: 06.08.2002 - 09:41    Titel: Dokumente vereinen Antworten mit Zitat

Nun bin ich, was den Acrobat angeht, auch nicht besonders firm. Kann der Acrobat denn überhaupt TIFF-Dateien öffnen? Kannst Du Dein Verfahren "händisch" nachvollziehen?
Falsch ist auf jeden Fall
'insert page
after letzte'
-
insert pages reference -- The document to receive the inserted page(s)
Ý after integer -- The page after which page(s) will be inserted
soll heißen

'insert pages after 9'
wenn 9 die letzte Seite in dem Dokument ist.

Gruß,
Folker
_________________
Gruß,
Folker Brandt
=============================
Systemberatung · Datenbanken · Webdesign
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen
solar
•->
•->


Anmeldedatum: 03.08.2002
Beiträge: 7
Wohnort: Bern, Switzerland

BeitragVerfasst am: 06.08.2002 - 12:40    Titel: Dokumente vereinen Antworten mit Zitat

Hallo Folker!

Nein, das andere Problem hab ich noch nicht gelöst!
Ich werd Dein Script auch gern ausprobieren. Ich hab einfach das ganze in zwei Teilprobleme aufgeteilt - frage mich nun, obs nicht besser ist, zwei verschiedene Themen dartaus zu machen?

Ok, zum Acrobat:
Ich kann das alles problemlos von Hand nachvollziehen:

Acrobat >Datei >Datei öffnen, Anzeigen: alle Dateien.

Datei lehr#1 auswählen.

Dann ich eine TIFF-Datei öffnen, danach:

>Dokument >Seiten einfügen, Anzeigen alle Dateien

Datei lehr#2 auswählen

Es erscheint der Dialog "Seiten einfügen", den Button "letzte" auswählen und die geöffnete Datei wird zuletzt angehängt.

Nun kann ich das alles natürlich -zig mal wiederholen. Ist kein Problem.

Oder eben, wohl als Script schreiben, denk ich mir!

Grüsse
Peter, Bern, Schweiz
_________________
Herzlichen Dank f¸r Antwort!
Peter, Bern, Schweiz
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden
iScript
•---->
•---->


Anmeldedatum: 29.03.2001
Beiträge: 1116

BeitragVerfasst am: 04.09.2002 - 23:06    Titel: Dokumente vereinen Antworten mit Zitat

Da kann ich dir nur 'ne Software zum umbenennen empfehlen:
DropRename von http://www.chaoticsoftware.com.
Kannst dir 'ne Demo runterladen. Die Software is easy & fast.
Ich glaube, damit kommst Du mit der Umbenennerei schneller weg, als mit AS.
Und für's zusammenfügen hätte ich vieleicht auch noch einen tipp. kannst dich ja nochmal melden, wenn du umbenannt hast.
Viel Erfolg
_________________
- anholn deit kriegen -
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden E-Mail senden Website dieses Benutzers besuchen AIM-Name
Beiträge der letzten Zeit anzeigen:   
Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.   Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.    Fischer-Bayern.de Foren-Übersicht -> AppleScript-Forum Alle Zeiten sind GMT + 2 Stunden
Seite 1 von 1

 
Gehe zu:  
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


AppleScript für absolute Starter