beste lösung für Voreinstellungen ??

glzm0

glzm0

Aktives Mitglied
Thread Starter
Dabei seit
16.03.2003
Beiträge
882
Reaktionspunkte
9
Hallo,

was ist die beste Lösung wenn ich Preferences brauche?
Soll ich die in ein Textfile schreiben und dann jedes mal wieder einlesen? oder gibt es bessere Möglichkeiten?

Ich möchte gern das er Dateien welche Aktualisiert wurden, in ein bestimmtes Verzeichnis kopiert. Dazu müsste ich ja praktisch immer irgendwo notiert haben wie der letzte Stand der Datei war als das Script lief.

Ist AppleScriptStudio da eine bessere Lösung um was zu basteln?

mfg glzm0
 
Preferences gehören in eine eigende Datei

und diese Datei in den Prefs-Ordner. Das ist das ordentlichste (und am arbeitsintensivsten).

Aber es geht auch anders:

property x: 3
This statement declares a property and sets its initial value. The scope of a property declaration can be either a script object or an entire script. The value set by a property declaration is not reset each time the script is run; instead, it persists until the script is recompiled.

global x
This global declaration is similar to a property declaration except that it doesn’t set an initial value: The scope of a global variable declaration can be limited to specific handlers or script objects or can extend throughout an entire script. Like the value of a property, the value of a global variable is not reset each time a script is run. However, the value of a global variable must be set by other statements in the script.

Grüße
ttwm
 
Zurück
Oben Unten