Aquí hay un pequeño detalle que configuré para ti, que mostrará un diálogo que te pedirá que ingreses la hora para que los eventos del sistema envíen la pulsación de tecla. Puede guardar este script como una aplicación y ejecutarlo cuando lo desee. Otra opción sería eliminar las primeras dos líneas del código y reemplazarlo con este ... property requested_time : "10:40:25 AM”
. Luego, simplemente puede agregar el script a un evento de iCal para iniciar todos los días a la hora que elija.
set requested_time to display dialog "Please Enter Your Start Time With The Following Format: Hour:Minutes:Seconds" default answer "10:40:25 AM" buttons {"OK"} default button 1
set requested_time to text returned of requested_time
set theTime to time string of (current date)
tell application "ProPresenter 5" to launch -- Opens The App Without Bringing It Up Upfront. Added This Line To Make Sure Your Application Is Running When System Events Sends The Keystroke. You Can Always Remove This Line If You Prefer
repeat until theTime is greater than or equal to requested_time -- Added The "Greater Than" Just As A Failsafe
delay 1
set theTime to time string of (current date)
end repeat
tell application "ProPresenter 5" to activate
delay .5 -- My system did not need this delay. Yours may not either, but I added it just in case.
tell application "System Events"
keystroke "z"
end tell
O puede guardar esta versión del script como una aplicación.
property requested_time : "10:40:25 AM”
set theTime to time string of (current date)
tell application "ProPresenter 5" to launch -- Opens The App Without Bringing It Up Upfront. Added This Line To Make Sure Your Application Is Running When System Events Sends The Keystroke. You Can Always Remove This Line If You Prefer
repeat until theTime is greater than or equal to requested_time -- Added The "Greater Than" Just As A Failsafe
delay 1
set theTime to time string of (current date)
end repeat
tell application "ProPresenter 5" to activate
delay .5 -- My system did not need this delay. Yours may not either, but I added it just in case.
tell application "System Events"
keystroke "z"
end tell
Luego, puede crear un nuevo evento de calendario para repetir todos los días, y 20 minutos antes, se iniciará el script que guardó como una aplicación.
