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

Anmeldedatum: 01.12.2000 Beiträge: 2
|
Verfasst am: 01.12.2000 - 14:40 Titel: Installer als AppleScript? |
|
|
Hi,
ich kenn mich absolut nicht mit AppleScript aus (fast zumindest) und ich würde gerne ein AppleScript haben, dass mir eine datei in den system ordner und eine in den prefs ordner eines beliebigen macs legt. ist das möglcih wenn ja (was es ja bestimmt ist.. hoff ich) wie?
könnt ihr mir da helfen?
thx
Ra |
|
Nach oben |
|
 |
Snow Administrator


Anmeldedatum: 21.11.2000 Beiträge: 1946 Wohnort: Deiningen
|
Verfasst am: 01.12.2000 - 14:42 Titel: Installer als AppleScript? |
|
|
Hallo Ra,
Das ist kein Problem. In den Standard Additions gibt's hierfür "path to".
path to: Returns full path name to the folder or application specified
path to apple menu/application support/control panels/control strip modules/desktop/desktop pictures folder/extensions/Folder Action scripts/fonts/help/launcher items folder/modem scripts/plugins/preferences/printer descriptions/printer drivers/printmonitor/... -- the folder or application to return
[as type class] -- the type to return: alias or string (default is alias)
Result: alias -- the path name to the folder or application specified
Für den Pfad zum Systemordner würde die Stelle im Skript dann so aussehen:
set SysPath to path to system folder
Ergebnis: --> Macintosh HD:Systemordner
So kannst du dann weiter machen.
set PrefsPath to path to preferences folder
.
.
. _________________ Peter
-
Fischer-Bayern.de|Shadetreemicro.com |
|
Nach oben |
|
 |
Ra •->

Anmeldedatum: 01.12.2000 Beiträge: 2
|
Verfasst am: 01.12.2000 - 14:43 Titel: Installer als AppleScript? |
|
|
thx.. ich hoff ich bring des jetz hin.. |
|
Nach oben |
|
 |
DanB •-->


Anmeldedatum: 22.11.2000 Beiträge: 38 Wohnort: Weertzen, Niedersachsen
|
Verfasst am: 01.12.2000 - 14:46 Titel: Installer als AppleScript? |
|
|
No Problem! Das folgende Skript legt, als "Applet" gespeichert, alle Dateien, die man auf sein Icon zieht, in den Preferences Ordner:
------
on open filelist
repeat with theitem in filelist
tell application "Finder"
move file theitem to preferences folder
end tell
end repeat
end open
------
Wenn die Dateien im Systemordner landen sollen, ersetze einfach "preferences folder" durch "system folder"
Daniel _________________ danB
[url]mailto:danB@advancedscripting.de[/url]
http://www.advancedscripting.de |
|
Nach oben |
|
 |
|