Une autre version du script qui "hide" Premiere au bout de 1 sec. (c'est mieux que rien... au début ça surprend de voir revenir Premiere tout seul et repartir !!! ;-P):
idle
on idle
tell application "Finder"
set liste_app to the name of every application process whose file type is "APPL"
end tell
if "Adobe Premiere Pro 2020" is in liste_app then
tell application "Adobe Premiere Pro 2020" to activate
if frontmost is false then
tell application "Adobe Premiere Pro 2020"
tell application "System Events"
tell process "Adobe Premiere Pro 2020"
tell application process "Adobe Premiere Pro 2020"
key code 15 using {option down} --touche r+option
end tell
delay 1
set visible to false
end tell
end tell
end tell
end if
end if
return 180
end idle
idle
on idle
tell application "Finder"
set liste_app to the name of every application process whose file type is "APPL"
end tell
if "Adobe Premiere Pro 2020" is in liste_app then
tell application "Adobe Premiere Pro 2020" to activate
if frontmost is false then
tell application "Adobe Premiere Pro 2020"
tell application "System Events"
tell process "Adobe Premiere Pro 2020"
tell application process "Adobe Premiere Pro 2020"
key code 15 using {option down} --touche r+option
end tell
delay 1
set visible to false
end tell
end tell
end tell
end if
end if
return 180
end idle