I have wrote code to make a bit faster introduce the time from promodoro in selfcontrol based on the intervals. However I couldn't introduce automatic, it just open the dialog to put the password. password input
tell application "WebPomodoro"
activate
end tell
set input to text returned of (display dialog "Ingresa un número para el Pomodoro:" default answer "" with icon note buttons {"Continue"} default button "Continue")
try
set inputNumber to (input as integer)
on error
display dialog "El texto ingresado no es un número válido."
end try
set total_time to 0
repeat with interval from 1 to inputNumber
set total_time to total_time + 25
if interval mod 4 = 0 then
set total_time to total_time + 25
else
set total_time to total_time + 5
end if
end repeat
set hours to (total_time div 60)
set minutes to (total_time mod 60)
display dialog (hours as string) & " horas y " & (minutes as string) & " minutos"
delay 2
tell application "SelfControl"
activate
end tell
delay 15 --set time
set myPassword to "password"
tell application "System Events"
-- Buscar el cuadro de diálogo de SelfControl
tell process "SelfControl"
keystroke myPassword
keystroke return
end tell
end tell