[COLOR=#000000][FONT=Verdana][B]on[/B] [/FONT][/COLOR][B]idle
[/B][FONT=Verdana] [B]if[/B] [COLOR=#4f8f00]isRunning[/COLOR]("Adobe Photoshop CS6") [B]then[/B] [COLOR=#5e6161]--Prüfen, ob Photoshop läuft[/COLOR][/FONT]
[FONT=Verdana] [B]tell[/B] [COLOR=#0433ff][I]application[/I][/COLOR] "Adobe Photoshop CS6"[/FONT]
[FONT=Verdana] [B]try[/B][/FONT]
[COLOR=#5E6161][FONT=Verdana][COLOR=#000000] [B]if[/B] [/COLOR][COLOR=#812fdc]current document[/COLOR][COLOR=#000000] [B]is[/B] [/COLOR][COLOR=#812fdc]modified[/COLOR][COLOR=#000000] [B]then[/B] [/COLOR]--Nur speichern, wenn Dokument bearbeitet wurde[/FONT][/COLOR]
[COLOR=#812FDC][FONT=Verdana][COLOR=#000000] [/COLOR][COLOR=#0433ff][B]save [/B][/COLOR]current document[/FONT][/COLOR]
[FONT=Verdana] [COLOR=#0433ff][B]log[/B][/COLOR] ([COLOR=#812fdc]name[/COLOR] [B]of[/B] [COLOR=#812fdc]current document[/COLOR]) & " saved."[/FONT]
[FONT=Verdana] [B]end[/B] [B]if[/B][/FONT]
[FONT=Verdana] [B]end[/B] [B]try[/B][/FONT]
[FONT=Verdana] [B]end[/B] [B]tell[/B][/FONT]
[COLOR=#5E6161][FONT=Verdana][COLOR=#000000] [B]return[/B] 60 [/COLOR]--Sekunden, nach denen gespeichert werden soll[/FONT][/COLOR]
[FONT=Verdana] [B]else[/B][/FONT]
[COLOR=#5E6161][FONT=Verdana][COLOR=#000000] [B]return[/B] 60 [/COLOR]--Sekunden, nach denen geprüft wird, ob Photoshop läuft[/FONT][/COLOR]
[FONT=Verdana] [B]end[/B] [B]if[/B][/FONT]
[FONT=Verdana] [/FONT]
[FONT=Verdana][B]end[/B] [COLOR=#0433ff][B]idle[/B][/COLOR][/FONT]
[FONT=Verdana]
[/FONT]
[COLOR=#4F8F00][FONT=Verdana][COLOR=#000000][B]on[/B] [/COLOR]isRunning[COLOR=#000000]([/COLOR]theApp[COLOR=#000000])[/COLOR][/FONT][/COLOR]
[FONT=Verdana] [B]tell[/B] [COLOR=#0433ff][I]application[/I][/COLOR] "System Events"[/FONT]
[FONT=Verdana] [COLOR=#0433ff][B]exists[/B][/COLOR] ([COLOR=#0433ff][I]processes[/I][/COLOR] [B]where[/B] [COLOR=#812fdc]name[/COLOR] [B]is[/B] [COLOR=#4f8f00]theApp[/COLOR])[/FONT]
[FONT=Verdana] [B]end[/B] [B]tell[/B][/FONT]
[COLOR=#000000][FONT=Verdana][B]end[/B] [/FONT][/COLOR][COLOR=#4F8F00][FONT=Verdana]isRunning[/FONT][/COLOR]