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


Anmeldedatum: 10.07.2003 Beiträge: 1517 Wohnort: Olten-CH
|
Verfasst am: 04.09.2005 - 17:06 Titel: Datum<->Text/Zahlen/Kalender-Woche: für alle(?)Fälle |
|
|
EDIT 23.6.07
hat Folgendes geschrieben: | Problem:
• Wie könnte man einfach aus Datum-Werten oder Texten, die aus Datumsformationen stammen (ZB durch AS oder FileMaker oder iCal oder Dialog-Eingaben des Personals... generierte) -> standardisierte oder frei komponierbare Datum-Texte erzeugen und umgekehrt?
so: TEXT <--(HANDLER)--> DATUM <--(HANDLER)--> TEXT usw
• Dabei soll es analog einfach zugehen wie ZB in Excel:
dort kann man Zellen nämlich so formatieren: T.M.JJJJ h:mm...
Idee:
Für Werte wie: JJ MM TT HH MiMi... verwende ich Variablen-Namen |
Dazu brauche ich für ein Datum-verarbeitendes Skript:
1) Einen wiederholbaren, universellen aber einfach variierbaren
"Handler-Aufruf-Block":
--#########################
my DatTEXtER( DatTEXtet as string) -- liefert t + MM + mt + JJJJ + MiMi u.s.w
--#########################
2) Eine global-Reihe(am Kopf des Skriptes), welche die Variablen ad libitum zur Auswahl anbietet:
global JJ, JJJJ, MM, TT, HH, MiMi, KalWoZA --u.s.w <-aus handler: DatTEXtER() --oooo
3) Eine wiederholbar zu gestaltende Wiedergabe-Text-Variable, welche obige Variablen nach Belieben zu einem Text zusammenknüpft
ZB: set DatTEXtet to TT & "." & MM & "." & JJJJ
4) Einen UNIVERSAL-Handler, der immer ansprechbar am Skript-Ende liegt und nach Aufruf die Variablen generiert wie:
JJ MM TT HH MiMi...
Pool-Skript läuft einfach so, kann aber mit Auskommentieren inidivduelle Eingaben prüfen hat Folgendes geschrieben: | --=======am Kopf (Top) leicht abkopierbare Variablen -=======
global d, t, TT, WoTName, WoTName2Its, WoTName3Its, WoTNameZA, m, MM, MoName, MName3Its, JJ, JJJJ, h, HH, mi, MiMi, s, ss, DatTEXtet, KalWoZA --<--DatTEXtER(DatTEX) --ooooo
-----------------------------EINZEL-BEISPIEL ----------------------------
set DatTEXtet to my DatTEXtER((current date) + (1 * days) as string)
display dialog "Morgen ist : " & WoTName3Its & " " & TT & "." & MM & "." & JJ
---------------------- kann HIER beenden mit Abbruch im Dialog----------
--Dialog-Texte,FileMaker-, iCal od.: MM oder JJJJ oder M u.s.w :
set BeispieleTEXTodDATUMListe to ¬
{current date, ¬
"7.8.09 7:8:9", ¬
"Samstagähnmliches oder sowas ?, 10.11.99 1:2:3 Uhr", ¬
"01.02.03 04:05:06", ¬
"Sonntag, 25. März 2007 11:01:46 Uhr", ¬
1}
--------------------------------------------------------------
--Ab HIER:Mit Auskommentieren Einzeltexte/Datums überprüfbar ZB:
--set BeispieleTEXTodDATUMListe to {(current date) + (1 * days)} --auskommentiert->Schnelltester
--set BeispieleTEXTodDATUMListe to {"Sa oder sowas ?, 10.11.99 1:2:3 Uhr"} --<-OS9 schluckt das noch
--set BeispieleTEXTodDATUMListe to {"SaOder sowas ähnliches ? , 10.11.99 1:2:3 Uhr"} --<-ab OSX nur so
-------------------------------------------------------
--repetitiver UNIV.HANDLER-Aufruf---------------------------------
repeat with i from 1 to (count of BeispieleTEXTodDATUMListe)
my DatTEXtER(item i of BeispieleTEXTodDATUMListe as string) --<--UNIV.HANDLER-Aufruf
------------------------------------------------------------------------
-------------------1.WIEDERGABE-BEISPIEL:------
set DatTEXtet to TT & "." & MM & "." & JJJJ
display dialog (item i of BeispieleTEXTodDATUMListe as string) & "-->" & return & ¬
"1.WIEDERGABE-BEISPIEL:" default answer DatTEXtet
--------------------------------------------------
-------------------2.WIEDERGABE-BEISPIEL:------
set DatTEXtet to t & "." & m & "." & JJ
display dialog (item i of BeispieleTEXTodDATUMListe as string) & "-->" & return & ¬
"2.WIEDERGABE-BEISPIEL:" default answer DatTEXtet
--------------------------------------------------
-------------------3.WIEDERGABE-BEISPIEL:------
set InfoText to ""
if date string of (date (item i of BeispieleTEXTodDATUMListe as string as string)) ¬
= date string of (current date) as string ¬
then set InfoText to "=HEUTE!"
set DatTEXtet to ¬
"In Woche Nr. " & KalWoZA & " ein: " & WoTName3Its & "." & InfoText & return & ¬
t & "." & m & "." & JJ & ¬
" -->Jahr,Monat,Tag: [" & JJJJ & "." & MM & "." & TT & "]" & return & ¬
"->Uhr-Zeit: " & HH & ":" & MiMi & ":" & ss & " h =" & mi & " Min nach " & h & " h"
display dialog (item i of BeispieleTEXTodDATUMListe as string) & "-->" & return & ¬
"3.WIEDERGABE-BEISPIEL:" default answer DatTEXtet
--------------------------------------------------
end repeat
-- ooooooooooooooUNIVERSALHANDLERoooo
on DatTEXtER(DatTEX) --ooooo
set AppleScript's text item delimiters to "" --falls in obigen 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--EDIT hatte noch Fehler
set Wort5 to word 5 of (d as text) --0 OSX macht Fehler bei Rückwandlung
set Wort6 to word 6 of (d as text) --00--Min
set Wort7 to word 7 of (d as text) --00 --Sec
set Wort8 to word 8 of (d as text) --Uhr --<Wort "Uhr"
--TAG##################
set t to (d's day) as text
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 WoTName to word 1 of (d as text) --Dienstag
set WoTName2Its to (text items 1 thru 2 of WoTName) as text --Di
set WoTName3Its to (text items 1 thru 3 of WoTName) as text --Die
repeat with i from 1 to 7
if WoTName = item i of WoTageListe then
set WoTNameZA 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 - (WoTNameZA * days)) + (4 * days)
set YearDoDerWoZA to DoDerWoDAT's year
set Tag4JanDesYearDoDerWoDAT to date ("4.1." & YearDoDerWoZA)
set WoTName4JanDesYearDoDerWoDAT to word 1 of (Tag4JanDesYearDoDerWoDAT as text)
repeat with i from 1 to 7
if WoTName4JanDesYearDoDerWoDAT = item i of WoTageListe then
set WoTName4JanDesYearDoDerWoZA to text -2 thru -1 of ("0" & i) --Montag=1
exit repeat
end if
end repeat
set DoDesTag4JanDesYearDoDerWoDAT to ¬
(Tag4JanDesYearDoDerWoDAT - (WoTName4JanDesYearDoDerWoZA * days)) + (4 * days)
set KalWoZA to (DoDerWoDAT - DoDesTag4JanDesYearDoDerWoDAT)
set KalWoZA to round ¬
(1.05 + ((DoDerWoDAT - DoDesTag4JanDesYearDoDerWoDAT) / (7 * 86400)) + (WoTNameZA / 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
set m to i
exit repeat
end if
end repeat
set MName3Its 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 Zeit to time string of d
set Stunde to Wort5
--error 0 & {Stunde, Zeit}
set h to Wort5 as integer -- word 5 of (DaTTEX) --07 --geht nicht auf OSX!!
set mi to Wort6 as integer --00
set s to Wort7 as integer --09
--0 erzeugen:
set HH to text -2 thru -1 of ("0" & h)
set mimi to text -2 thru -1 of ("0" & mi)
set ss to text -2 thru -1 of ("0" & s)
--
--display dialog 0 default answer "T:" &T& " M:" & M & " m:" & mi & " s:" & s
my MilleniumWandler1900Zu2000() --oooooooo
end DatTEXtER
on MilleniumWandler1900Zu2000() --oooooooo
if text item 1 of JJJJ = "1" then --<-1900
if JJJJ < 1915 then -- <--1914 Tod des ersten D Weltkrieg-Soldaten
set JJJJ to "20" & (text -2 thru -1 of JJJJ)
end if
end if
if jj > 14 then set JJJJ to "19" & jj --Geburten nach 2014
end MilleniumWandler1900Zu2000 |
_________________ Skript-Fan => ein � -Fan =>Scr¿¿-KongFuSius_Kurpfusius
Zuletzt bearbeitet von spirigwi am 25.06.2007 - 08:19, insgesamt 48-mal bearbeitet |
|
Nach oben |
|
 |
spirigwi •----->


Anmeldedatum: 10.07.2003 Beiträge: 1517 Wohnort: Olten-CH
|
Verfasst am: 25.03.2007 - 14:53 Titel: Datumstexter als Skript, welches wiederum Skript erzeugt |
|
|
Nun dient dieser Handler natürlich auch dazu, Texte, die aus Programmen wie iCal oder FileMaker stammen, darauf zu überprüfen, ob sie Datumswerte für AS liefern und vor allem ob dieser Datumswert dem Text entspricht. Falls man Diskrepanzen feststellt, kann man mit den Variablen JJ MM TT HH MiMi... analysieren, welche Textstelle den Fehler erzeugt u.s.w:
ZB würde durch Weglassen der Uhrzeitvariablen die Zeit 00:00:00 für das jeweilige Datum erzeugt.
Der manipulative Anteil durch diesen Handler scheint mir wesentlich grösser als Apples Angebot:
von Skeeve entdeckt und verdankenswerterweise im OSX-Snippet dem Forum mitgeteilt hat Folgendes geschrieben: | set DatumsText to date string of (current date)
--oder
set ZeitText to time string of (current date) |
ein Beispiel dazu:
Zitat: | set AusDatumsProgrammVariable to "do 29. märz 07" --<-- aus FileMaker-Feld
set DatTEX to date AusDatumsProgrammVariable
set DatTEX to date string of DatTEX
error 0 & DatTEX --> Donnerstag, 29.März 2007
--<--diesen Wert erkennt weder FileMaker noch mein Kalenderprogramm als Datum
--es nützt also nicht viel, wenn AS das Datum richtig "textet".
--also:
--#########################
my DatTEXtER (date AusDatumsProgrammVariable as string) -- ooooo--> ZB MM oder JJJJ oder MiMi u.s.w
--#########################
set DatTEX to TT & "." & MM & "." & Jahr
DatTEX = "29.03.07"
--<--nur so erkennt mein Kalenderprogramm das Datum
|
EDIT: um Skripts im Menu abzulegen, kann man sich ja die Eigenschaft des clipboards, Skripttexte "maSkieren" zu können, zunutze machen. _________________ Skript-Fan => ein � -Fan =>Scr¿¿-KongFuSius_Kurpfusius
Zuletzt bearbeitet von spirigwi am 01.08.2007 - 11:37, insgesamt 5-mal bearbeitet |
|
Nach oben |
|
 |
spirigwi •----->


Anmeldedatum: 10.07.2003 Beiträge: 1517 Wohnort: Olten-CH
|
Verfasst am: 13.05.2007 - 10:23 Titel: Besonderheit für FileMaker user(jedenfalls Fm 5.5 geprüft) |
|
|
Hinweis für FileMaker-user
Dieser Handleraufruf funktioniert nur, wenn er ausserhalb des FileMaker-Tell-Block steht!
Zur Veranschaulichung habe ich den Tell-Aufruf auskommentiert
hat Folgendes geschrieben: | --tell application "FileMaker Pro"
--SCRIPT BEISPIELE mit HANDLERAUFRUF:
set EinDatumOderText to ContentOfCellDatum --ZB "25.3.07"<= ContentOfCellDatum aus FileMaker-Feld
--#########################
my DatTEXtER(date EinDatumOderText as string) --liefert ZB MM oder JJJJ oder MiMi u.s.w
--#########################
--end tell |
_________________ Skript-Fan => ein � -Fan =>Scr¿¿-KongFuSius_Kurpfusius |
|
Nach oben |
|
 |
jiuer7845 •---->

Anmeldedatum: 06.04.2021 Beiträge: 521
|
|
Nach oben |
|
 |
Nishaknapp •--->

Anmeldedatum: 16.03.2022 Beiträge: 217
|
Verfasst am: 13.06.2022 - 08:53 Titel: |
|
|
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. Boost Your Odds By Using Baccarat Formula |
|
Nach oben |
|
 |
jiuer7845 •---->

Anmeldedatum: 06.04.2021 Beiträge: 521
|
|
Nach oben |
|
 |
FrankJScott Gast
|
Verfasst am: 09.09.2022 - 08:39 Titel: Updated Heating Details |
|
|
In reply to the lady asking about geothermal service near me, heating and cooling companies near me, hvac mechanical, electric boiler installation, bell heating and cooling, home depot furnace installation, I highly suggest this recommended plumbing repair service advice or heat pump maintenance near me, heating & cooling service near me, comfort systems heating and cooling, affordable plumbing and heating, 24 hour ac repair near me, furnace replacement, alongside all this awesome boiler installation service site as well as heating & cooling service near me, plumbing & heating near me, air care heating and cooling, absolute comfort heating and air, new furnace installation, 24 hour ac repair near me, and don't forget this new plumbing installation service link which is also great. Also have a look at this new boiler repair service advice on top of ductwork replacement, wagner heating and cooling, service express hvac, propane heating system, york heating and cooling, best heating and air, not to mention this high rated heating repair service details as well as draining heating system, mini split maintenance, evergreen heating and air, heat and air repair, new heating and cooling system, hvac companies, alongside all recommended boiler installation service info which is also worth a look. I also suggest this high rated boiler cleaning service url on top of stans heating, 5 star plumbing and heating, hvac mechanical, 24 hour hvac near me, mobile home furnace repair near me, heating and air conditioning service, not to mention this recommended AC cleaning service blog on top of white's heating and cooling, tri state heating and air, central heating installers near me, ac plumbing, heating and ac companies near me, gas boiler maintenance, as well as useful heating repair service info which is also great. Finally, have a look at this useful AC installation service forum for good measure. Check more Great Heating TipsSite 7447b4a |
|
Nach oben |
|
 |
FrankJScott Gast
|
Verfasst am: 07.10.2022 - 14:39 Titel: Useful Duck Decoy TipsSite |
|
|
In reply to the man talking about paper mache duck decoys for sale, dead duck decoy, foam filled goldeneye decoys, knotty duck decoy, full body wood duck decoys, avery duck decoys, i highly recommend this recommended duck decoy blog or duck decoy pond, green head gear decoys, ghg mallard decoys, duck floater decoys, unpainted plastic duck decoys, chris boone duck decoys, alongside all this awesome duck decoy url alongside all folk art duck decoys, avery decoys for sale, ghg canvasback, rigging duck decoys, higdon battleship canvasback decoys, wood duck motion decoys, alongside all this best duck decoy advice which is also great. also have a look at this new duck decoy link and don't forget most realistic mallard decoys, duck dec, john gewerth ducks unlimited, goose hunting decoys for sale, hand carved duck, mallard motel decoy tree, alongside all this top duck decoy advice and don't forget mojo bluebill floater, ducks unlimited decoy of the year 2021, ariduk duck decoys, vintage hand carved duck decoys, drone duck decoy, avery ghg duck decoys, not to mention top duck decoy tips which is also worth a look. i also recommend this recommended duck decoy advice and don't forget herters 63 decoys, cherokee sports fusion inflatable mallard duck decoys 6 pack, full body duck decoys 12 pack, higdon duck, coot decoys for sale, avery ghg duck decoys, not to mention this high rated duck decoy info on top of knutson's duck decoys, final approach live series mallards, mojo mallard duck, vintage hand carved duck decoys, knotty duck decoy, herters foam decoys for sale, on top of top rated duck decoy tips as well as wigeon duck decoys, jules a bouillet duck decoys, puddle duck decoy pack, ghg hot buy mallard decoys, wooden duck decoys, ghg surf scoter decoys, which is also great. finally, have a look at this top duck decoy site for good measure. Check more Cool Air Quality Info 3a7447b |
|
Nach oben |
|
 |
FrankJScott Gast
|
Verfasst am: 16.12.2022 - 16:31 Titel: Awesome Heating Services Details |
|
|
for the people inquiring about commercial hvac companies, furnace maintenance, ducted heating system, comfort air heating and cooling, heater replacement, comfort heating and air conditioning, I highly suggest this great cooling services url or emergency hvac repair near me, empire heating systems, complete heating and air, comfort heating, plumbing heating and cooling near me, mini split ac installation near me, as well as this high rated heating services info alongside all affordable comfort heating and cooling, precision heating and cooling, bluedot hvac, ducted heating service, plumbing heating near me, central heating, on top of this excellent indoor air quality services info which is also great. also have a look at this new heating services site alongside all residential hvac contractors near me, installing a heat pump in an existing home, sunshine heating and cooling, mini split ac installation near me, j and j heating and cooling, furnace not heating, as well as this useful heating services forum on top of ducted gas heating, bryant heating and cooling near me, bay heating and cooling, lennox heating, old york heating and cooling, heating and cooling systems, as well as recommended heating services forum which is also worth a look. i also suggest this useful indoor air quality services info on top of heating and cooling near me, hvac heating and cooling, k & t heating, heater replacement, bay area heating and cooling, ductless heating, as well as this top cooling services details not to mention all seasons heating and air, empire heating systems, air conditioner repair near me, comfort heating, day and night heating and cooling, heating technician near me, not to mention top heating services site as well as ductwork cleaning near me, electric furnace and ac, boiler installation, ductless heating and cooling systems, gas boiler servicing, heating contractors, which is also great. finally, have a look at this top cooling services info with heating and cooling contractors near me, k & t heating, oil furnace repair near me, heating and ac near me, cool care heating and air, barlow heating and air, for good measure. |
|
Nach oben |
|
 |
jiuer7845 •---->

Anmeldedatum: 06.04.2021 Beiträge: 521
|
|
Nach oben |
|
 |
Nishaknapp •--->

Anmeldedatum: 16.03.2022 Beiträge: 217
|
Verfasst am: 27.12.2022 - 14:42 Titel: |
|
|
If you’re looking for a modern game and sports betting that will give you so much entertainment i will recommend this to you. Share the best and awesome & Fun Gaming here: 안전메이저사이트 |
|
Nach oben |
|
 |
FrankJScott Gast
|
Verfasst am: 29.01.2023 - 09:10 Titel: High Rated Car Selling Tips |
|
|
To the person talking about ford sell my car, small cars for sale, best used cars for sale, best place to sell cars by owner, 1990 toyota corolla for sale, used hondas for sale by owner, I highly recommend this great car selling tips or sell car to junkyard for cash, best place to junk my car, broken car buyers near me, suzuki used cars for sale, places that buy junk cars for cash near me, sell your classic car, and don't forget this top rated car selling forum as well as market cars for sale, sell car for cash san jose, hyundai accent 2014 for sale, junk my vehicle for cash, toyota yaris 2019 for sale, used cars for sale private sellers, alongside all this useful car selling info which is also great. Also, have a look at this new car selling url not to mention sell my wrecked car for cash, cheap ford ecosport for sale, car sales internet sites, cars for sale private owner only, gumtree vehicles for sale, best website to sell vehicle, and don't forget this awesome car selling info on top of i want to sale my car, car sell value, want to sell my car online, used suzuki 4x4 for sale, i wanna sell my car fast, sell finance car, on top of updated car selling site which is also worth a look. I also recommend this top rated car selling info and don't forget 2021 used cars for sale, ford ecosport private sale, sell your car to arnold clark, toyota pickups for sale, we buy cars bmw, we buy cars second hand, and don't forget this top rated car selling url on top of used classic cars for sale near me, sell car now cash, used old jeeps for sale, kia picanto 2014 for sale, we buy cars sell my car, cheap nice cars for sale, as well as excellent car selling forum and don't forget car sale quote online, sell my car parts junkyard, find a car for sale online, trade in used cars, best way to sell my used car, buy sell vehicle, which is also great. Finally, have a look at this excellent car selling tips with buy my junk near me, best sites to sell your car, used porsche turbo s for sale, used evo for sale, we sale cars, car 4 sale, for good measure. Check more @ Updated Injury Legal Services Site 92_14e7 |
|
Nach oben |
|
 |
sdenjuopl148 •---->

Anmeldedatum: 17.12.2022 Beiträge: 725 Wohnort: New York city
|
|
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
|
|
|