1

When I run an AppleScript and I am in fullscreen, it's always bring back to the desktop.

as a work around I use "tell front window of application "Google Chrome" activate" but that still very annoying

is there not a way to get rid of the focus to the desktop ?

here is an exemple

set newFile to (path to desktop folder as text) & "_Note_Backup.txt"
set theFileContents to read file newFile


set myDate to date string of (current date)
set {year:y, month:m, day:d} to (current date)
set mymonthVariable to m & " " & y as text

tell front window of application "Google Chrome"
    activate

end tell

set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to myDate
set aList to the text items in the theFileContents
set theCount to (the count aList) - 1
set AppleScript's text item delimiters to tid

set remainingcase to theCount - 5


set tid to AppleScript's text item delimiters
set AppleScript's text item delimiters to mymonthVariable
set aList to the text items in the theFileContents
set theMonthCount to (the count aList) - 1
set AppleScript's text item delimiters to tid


set remainingcaseontheMOnth to theMonthCount - 10


display notification "Month left" & remainingcaseontheMOnth with title "Today : " & theCount subtitle "Remaining case" & remainingcase

You must log in to answer this question.

Browse other questions tagged .