müsste heissen:Zitat von the x-master
if file type of f is "jpg " or file type of f is "pdf " ....
oder, in diesem Fall einfacher:
if file type of f is in {"jpg ","pdf ","gif ","aifc","doc ","icns"} then
end if
mfg pi26
Ergebnis 1 bis 8 von 8
- 08.02.2006, 18:52 #1
Sortieren
hallo leute,
also ich möchte, dass das Script alle datein sortiert.
Und so lautet mein Script:
tell application "Finder"
set flist to (every file of the desktop)
repeat with f in flist
if file type of f is "jpg " or "pdf " or "script" or "gif " or "aifc" or "doc " or "icns" then
move f to the trash
end if
end repeat
end tell
Dummerweise funktioniert es nicht!
Was habe ich falsch gemacht?
the x-master
- 08.02.2006, 19:50 #2Adams Parmäne
- Registriert
- 12.2004
- Ort
- Wien
- Alter
- 52
- Beiträge
- 1.297
set S to{"10,2,3,10,2","10,2,3,com2,2","innovation and roots","3,10 2 2 com"}
repeat with k from 1 to 3
repeat with i from 1 to count S
say item i of S using "Bubbles"
say item ((count S) - i + 1) of S using "Whisper"
say item i of S using "bubbles"
end repeat
end repeat
- 08.02.2006, 20:26 #3
was muss ich denn schreiben wenn ich jpg haben will?
if file type of f is "jpg " then...
Geht nicht!
the x-master
- 08.02.2006, 20:30 #4Adams Parmäne
- Registriert
- 12.2004
- Ort
- Wien
- Alter
- 52
- Beiträge
- 1.297
ich glaube "jpeg"
aber du kannst das für alle Typen ausprobieren:
tell application "Finder"
return file type of file "HD:dasfile"
end tell
...wird dann im Ergebnis-Bereich des Skripteditors angezeigt.
mfg pi26set S to{"10,2,3,10,2","10,2,3,com2,2","innovation and roots","3,10 2 2 com"}
repeat with k from 1 to 3
repeat with i from 1 to count S
say item i of S using "Bubbles"
say item ((count S) - i + 1) of S using "Whisper"
say item i of S using "bubbles"
end repeat
end repeat
- 08.02.2006, 20:46 #5
warum zum Teufel steht da immer "missing value" ?????
- 08.02.2006, 21:02 #6Adams Parmäne
- Registriert
- 12.2004
- Ort
- Wien
- Alter
- 52
- Beiträge
- 1.297
Für dich ist vielleicht besser ein Buch, dort guckst du im Stichwortregister nach unter:
Zitat von the x-master
"Was zum Teufel..."
set S to{"10,2,3,10,2","10,2,3,com2,2","innovation and roots","3,10 2 2 com"}
repeat with k from 1 to 3
repeat with i from 1 to count S
say item i of S using "Bubbles"
say item ((count S) - i + 1) of S using "Whisper"
say item i of S using "bubbles"
end repeat
end repeat
- 08.02.2006, 23:19 #7Uelzener Rambour
- Registriert
- 01.2006
- Beiträge
- 366
Hi,
Zitat von the x-master
ist dir schon mal aufgefallen, dass man mit OS X die File Extensions eingeführt hat (so wie bei *******)? Deswegen brauchen wir jetzt den file type nimmer - daher das 'missing value'.
Mach's lieber mit einem 'do shell script' - das geht schneller:
das war'sCode:set theExtensions to {"[jJ][pP][eEgG]", "[pP][dD][fF]", "[gG][iI][fF]", ... } repeat with ext in theExtensions try do shell script "mv ~/Desktop/*." & ext & " ~/.Trash/" end try end repeat
Geändert von Daisy (08.02.2006 um 23:49 Uhr)
- 10.02.2006, 16:10 #8
wow ich bin beeindruckt DANKE!!
the x-master
Ähnliche Themen
-
Dateien sortieren
Von the x-master im Forum AppleScriptAntworten: 3Letzter Beitrag: 29.01.2006, 21:50 -
AppleScript Datein Sortieren
Von the x-master im Forum OfficeanwendungenAntworten: 2Letzter Beitrag: 29.01.2006, 21:21 -
Camino Lesezeichen sortieren?
Von Plossing im Forum BrowserAntworten: 2Letzter Beitrag: 17.12.2005, 00:27 -
Dateien im Finder sortieren
Von Alejandro im Forum OS XAntworten: 6Letzter Beitrag: 22.11.2005, 15:26


Zitieren