"repeat until" bis ein Programm gestartet ist

Jupidu

Mitglied
Thread Starter
Dabei seit
10.02.2008
Beiträge
57
Reaktionspunkte
0
Hi,

ich möchte einen image Mounten und danach ein Programm starten, das auf Dateien in dem Image zugreift.
Mein Script erzeugt im Moment eine endlos-Schleife. Siehe:
Code:
tell application "Finder"
	if not (exists the disk "imagename") then
		open document file "imagename.dmg" of folder "Documents" of folder "user" of folder "Users" of startup disk
	end if
	delay 1
	repeat 
		if exists the disk "imagename" then
			run application "/Applications/appname.app/Contents/MacOS/appname"
			activate application "/Applications/appname.app/Contents/MacOS/appname"
		end if
	end repeat
end tell

wie kann ich die Repeat-schleife beenden? Sinnvoll wäre ein repeat until befehl wie "repeat until process is started". Ich weiß nur nicht, wie der genau funktioniert.

Hat jemand eine Idee?
 
so selber gelöst:

so geht es
Code:
tell application "Finder"
	if not (exists the disk "imagename") then
		open document file "imagename.dmg" of folder "Documents" of folder "user" of folder "Users" of startup disk
	end if
	delay 1
	repeat until process "processname" exists
		if exists the disk "imagename" then
			run application "/Applications/appname.app/Contents/MacOS/appname"
			activate application "/Applications/appname.app/Contents/MacOS/appname"
		end if
	end repeat
end tell
 
Zurück
Oben Unten