Bsp 1.
Spoiler anzeigen
[autoit]
ShellExecute("notepad.exe")
[/autoit] [autoit][/autoit] [autoit]HotKeySet('!.', '_Close')
[/autoit] [autoit][/autoit] [autoit]While ProcessExists("notepad.exe")
sleep(100)
WEnd
MsgBox(0, "", "Notepad wurde beendet, aber dein Programm wird weiterhin ausgeführt")
[/autoit] [autoit][/autoit] [autoit]While 1
WEnd
Func _Close()
ProcessClose("notepad.exe")
EndFunc
Bsp 2
Spoiler anzeigen
[autoit]
ShellExecute("notepad.exe")
[/autoit] [autoit][/autoit] [autoit]HotKeySet('!.', '_Close')
[/autoit] [autoit][/autoit] [autoit]While ProcessExists("notepad.exe")
sleep(100)
WEnd
MsgBox(0, "", "Notepad wurde beendet, das Programm wird nun auch beendet")
[/autoit] [autoit][/autoit] [autoit];und zwar weil hier keine weitere schleife mehr ist
[/autoit] [autoit][/autoit] [autoit]Func _Close()
ProcessClose("notepad.exe")
EndFunc