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

Finder-Objekt-Namen Suffix anhängen:Modification-DATUM+ZEIT

 
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 -> Pool
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen  
Autor Nachricht
spirigwi
•----->
•----->


Anmeldedatum: 10.07.2003
Beiträge: 1517
Wohnort: Olten-CH

BeitragVerfasst am: 07.10.2006 - 12:56    Titel: Finder-Objekt-Namen Suffix anhängen:Modification-DATUM+ZEIT Antworten mit Zitat

Problem: Ein Finder-Objekt wie ZB File oder Ordner oder Image usw soll mehrmals im selben Ordner als Duplikat gespeichert werden können und damit neben dem Original einsehbar bleiben. Die von Apple generierten Zusätze an den Original-Namen(Kopie 1...) sind mir zu wenig informativ.

Idea Idee mit AS:
• Ein Duplikat anlegen lassen Z.B von Hand mit [APFEL-æ]+D (oder ebenfalls mit einem AS).
• Dieses Produkt auf ein Drop-AS (dplt) (oder auf dessen Alias, welches ZB auf Schreibtisch liegt) "ziehen".
• Damit soll dem Dupplikat_Namen eine sinnvolle Zusatz-Bezeichnung angehängt werden, quasi als "Suffix".
Dabei soll der Original-Name weitgehend erhalten bleiben und das "Suffix" soll das Modifications-Datum/+ Zeit (= letzte Veränderung) beinhalten. Somit soll sich der neue Objekt-NAME gemäss seiner Datums- und zeitlichen Kriterien der Modification leicht einordnen lassen mit der Finder-Sortier-Obtion "nach Namen sortiert"
Beispiel hat Folgendes geschrieben:
HOST_SERVER.img..........................= Original Name
HOST_SERVER.img Kopie................= Name der durch Finder erzeugten Kopie
HOST_SERVER.img Kop-07.04.08T
HOST_SERVER.img Kop-07.04.09T..= Namen durch das "Namengeber-Droplet" erzeugt



Datum Geber
ein als Droplet speicherbares AppleSkript hat Folgendes geschrieben:

global DatTEX, d, HH, JJ, JJJJ, KalWoZA, MiMi, MM, MoName, TT, WoTgName, WoTgName2Its, WoTgName3Its, WoTgNameZA, MtName3Its, ss --DatTEXtER()
--
=======================
property MaxLang : 31 - 1 - 9 - 5 --<--[OS9-max.Namenslänge 31]-Minus(1), -Datum(9), -Zeit (5)
--
=======================
on run
   --
tell application "Finder" -- = "System Events"
   --
set FileListe to every file of (choose folder with prompt "Quellordner auswählen")
   
set FileListe to ¬
      {
file (choose file with prompt "Wähle ein file, um seinem Namen das Mod-Datum anzuhängen" as list)}
   --
{}<--EDIT am 22.11.06
   --
return FileListe
   --
end tell
   
my DatumGebER(FileListe)
end run

on open FileListe
   
my DatumGebER(FileListe)
end open

on DatumGebER(FileListe) --oooo
   --
error 0 & MaxLang
   
repeat with EinFile in FileListe
      
tell application "Finder"
         
set d to modification date of EinFile
      
end tell
      --
##########################
      
set DatTEX to (d) as string
      
my DatTEXtER() -- oooo
      --
##########################
      
set DatGeTEXtet to ¬
         
JJ & "." & MM & "." & TT & "T"
      
set ZeitGeTEXtet to HH & "h" & MiMi --=5
      
set DatName to DatGeTEXtet & ZeitGeTEXtet
      
      
tell application "Finder"
         
set NameUr to name of EinFile
         
if (length of NameUr > MaxLang) then -->20
            
set NameNeu to (text 1 thru (MaxLang) of NameUr)
         
else
            
set NameNeu to NameUr
         
end if
         
set NameNeu to NameNeu & "-" & DatName
         
set name of (contents of EinFile) to NameNeu
         
activate
      
end tell
   
end repeat
end DatumGebER



--ooooooooooooooUNIVERSAL-HANDLER oooo
on DatTEXtER() --ooooo
set AppleScript's text item delimiters to "" --falls in vorherigen Skripts umgestellt wurde
set a to DatTEX
set d to date a
set d to d -- + (1 * days)
date "Samstag, 3. September 2005 12:00:00 Uhr" --date-Tester: ZB date "1" dann ENTER
set Wort1 to word 1 of (d as text) --Donnerstag
set Wort2 to word 2 of (d as text) --8
set Wort3 to word 3 of (d as text) --September
set Wort4 to word 4 of (d as text) --2005
-- Wort5--Exkurs
set Wort5 to word 5 of (d as text) --0 OSX macht Fehler bei Rückwandlung
set Zeit to time of date DatTEX
set Stunde to round ((Zeit) / 3800) rounding down -->auf OSX falsch!
try
set Wort5 to word 5 of DatTEX
on error
set Wort5 to "00"
end try
--END -- Wort5--Exkurs
set Wort6 to word 6 of (d as text) --00
set Wort7 to word 7 of (d as text) --00
set Wort8 to word 8 of (d as text) --Uhr
--TAG##################
set TT to text -2 thru -1 of ("0" & d's day) --31.(ZB 31.Januar 05)
set WoTageListe to {"Montag", "Dienstag", "Mittwoch", "Donnerstag", ¬
"Freitag", "Samstag", "Sonntag"} --Montag =1
set WoTgName to word 1 of (d as text) --Dienstag
set WoTgName2Its to (text items 1 thru 2 of WoTgName) as text --Di
set WoTgName3Its to (text items 1 thru 3 of WoTgName) as text --Die
repeat with i from 1 to 7
if WoTgName = item i of WoTageListe then
set WoTgNameZA to text -2 thru -1 of ("0" & i) --Montag=1
exit repeat
end if
end repeat
--Woche################# 2 Donnerstage für Kalender-Wochenzahl
set DoDerWoDAT to (d - (WoTgNameZA * days)) + (4 * days)
set YearDoDerWoZA to DoDerWoDAT's year
set Tag4JanDesYearDoDerWoDAT to date ("4.1." & YearDoDerWoZA)
set WoTgName4JanDesYearDoDerWoDAT to word 1 of (Tag4JanDesYearDoDerWoDAT as text)
repeat with i from 1 to 7
if WoTgName4JanDesYearDoDerWoDAT = item i of WoTageListe then
set WoTgName4JanDesYearDoDerWoZA to text -2 thru -1 of ("0" & i) --Montag=1
exit repeat
end if
end repeat
set DoDesTag4JanDesYearDoDerWoDAT to ¬
(Tag4JanDesYearDoDerWoDAT - (WoTgName4JanDesYearDoDerWoZA * days)) + (4 * days)
set KalWoZA to (DoDerWoDAT - DoDesTag4JanDesYearDoDerWoDAT)
set KalWoZA to round ¬
(1.05 + ((DoDerWoDAT - DoDesTag4JanDesYearDoDerWoDAT) / (7 * 86400)) + (WoTgNameZA / 7)) ¬
rounding down
--Monat #################
set MonatsListe to {"Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", ¬
"August", "September", "Oktober", "November", "Dezember"}
set MoName to word 3 of (d as text)
repeat with i from 1 to 12
if MoName = item i of MonatsListe then
set MM to text -2 thru -1 of ("0" & i) --09
exit repeat
end if
end repeat
set MtName3Its to (text items 1 thru 3 of MoName) as text
--JJJJ #################
set JJJJ to ((year of d) as text) --2005
set JJ to (text items -2 thru -1 of JJJJ) as text --05
--Zeit #################
set HH to Wort5 -- word 5 of (DatTEX) --07 --geht nicht auf OSX!!
set MiMi to Wort6 --00
set ss to Wort7 --09
--0 erzeugen:
set HH to text -2 thru -1 of ("0" & HH)
set MiMi to text -2 thru -1 of ("0" & MiMi)
my MilleniumWandler1900Zu2000() --oooooooo
end DatTEXtER
on MilleniumWandler1900Zu2000() --oooooooo
if text item 1 of JJJJ = "1" then --<-1900
set JJJJ to "20" & (text -2 thru -1 of JJJJ)
end if
end MilleniumWandler1900Zu2000



EDIT= 22.11.06: nun läuft das AS OS9 (_X?) auch dann, wenn es noch nicht als droplet gespeichert ist. Für diese Version habe ich es allerdings auf das "choosen" von lediglich files reduziert. Die droplet-Version kann jedoch nebst files auch Ordner "umtaufen"

[EDIT= 14.4.07 ]
- Die Rolle der Uhrzeit als Namensteil des Finderobjektes habe ich für die Praxis unterschätzt und sie dem Snippet nun zugeführt,
- Die Berechnung der max. Namenslänge ist in property enthalten.
_________________
 Skript-Fan => ein � -Fan =>Scr¿¿-KongFuSius_Kurpfusius
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden AIM-Name
jiuer7845
•---->
•---->


Anmeldedatum: 06.04.2021
Beiträge: 521

BeitragVerfasst am: 09.10.2021 - 05:20    Titel: Antworten mit Zitat

Travis Scott Jordan 1

Yeezy Shoes

Yeezy Supply

Air Jordans

Jordan 11s

Jordan 11

Jordans Shoes

Retro Jordans

Moncler Jackets

Nike Air Jordan

Moncler Outlet

Off-White

Yeezy 450

Yeezy 500

Yeezy

Yeezy 700

Yeezy Supply

Off White Shoes

NFL Jerseys

Jordan Shoes

Jordans Shoes

Yeezy 350 V2

Adidas Yeezy

Yeezy

Yeezy 700

Yeezy

Nike Outlet

Yeezy Shoes

UNC Jordan 1

Jordan 13

Jordan AJ 1

Yeezy Foam Runner

Nike Outlet

Nike Outlet

AJ1

Yeezy Supply

Yeezy Zebra

Jordan 1 Low

Air Jordans

Pandora Charms

Adidas UK

Nike Store

Adidas Yeezy Official Website

Yeezy 350

Jordan 1

Nike Outlet

YEEZY SUPPLY

Pandora Charms

Nike Shoes

Nike Outlet

Pandora Outlet

Jordan Shoes

Air Jordan 4

Pandora Jewelry

Pandora Rings

Pandora Bracelets

Adidas Yeezy

Yeezy

Pandora Charms

Nike Outlet

Adidas Yeezy

Air Max 720

Nike Air Max 270

Air Jordan 11

Air Force 1

Air Jordan 1

Nike Jordans

Jordan 1s

Pandora UK

Nike Jordan 1

Jordan 1

Yeezy Slides

Nike Air VaporMax

Nike Vapormax Flyknit

Air Jordan 1 Mid

Adidas yeezy

Yeezy Shoes

Adidas Yeezy

Yeezy 350

Nike Shoes

Nike Outlet

Yeezy

NFL Shop Official Online Store

Nike UK

Yeezy

Yeezy 350
_________________
https://www.pandoras-jewelry.com/ Pandora Jewelry
https://www.pandoraoutlet.org/ Pandora Outlet
https://www.jordanshoess.com/ Jordan Shoes
https://www.air-jordan4.com/ Air Jordan 4
https://www.charms-pandora.com/ Pandora Charms
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden Website dieses Benutzers besuchen AIM-Name
Nishaknapp
•--->
•--->


Anmeldedatum: 16.03.2022
Beiträge: 217

BeitragVerfasst am: 13.06.2022 - 08:59    Titel: Antworten mit Zitat

Why not settling on games that is fun and at the same time your earning. Well it'll make suspense because of the game as well but dude just try it and it gave me hope while pandemic is real rn. How to Play Like a Professional Online Gambler
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden
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 -> Pool 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