Thanks yet again to one of @ccstone's previously shared scripts, I think I was able to figure something out. I can't set this up for every app in your macro because I don't have all of them on my system, but you should be able to repeat these actions without further modification for each app:
Activate App and Set to Fullscreen.kmactions (3.8 KB)
##Key AppleScripts
###Make Front App Fullscreen
------------------------------------------------------------
# Auth: Christopher Stone
# Mod: Gabe Glick
# dCre: 2016/04/10 02:43
# dMod: 2017/12/22 08:30
# Appl: System Events
# Task: Set front window of front app to fullscreen.
# Tags: @Applescript, @Script, @System_Events, @Toggle, @Full, @Screen
------------------------------------------------------------
try
tell application "System Events"
tell (first application process whose frontmost is true)
tell (first window whose subrole is "AXStandardWindow")
set fullScreen to value of attribute "AXFullScreen"
if fullScreen = false then
set value of attribute "AXFullScreen" to true
end if
end tell
end tell
end tell
on error e number n
set e to e & return & return & "Num: " & n
if n ≠ -128 then
try
tell application (path to frontmost application as text) to set ddButton to button returned of ¬
(display dialog e with title "ERROR!" buttons {"Copy Error Message", "Cancel", "OK"} ¬
default button "OK" giving up after 30)
if ddButton = "Copy Error Message" then set the clipboard to e
end try
end if
end try
------------------------------------------------------------
###Verify that Front App is Full-Screen (pauses macro until script returns "true")
tell application "System Events"
tell (first application process whose frontmost is true)
tell (first window whose subrole is "AXStandardWindow")
value of attribute "AXFullScreen"
end tell
end tell
end tell
You may be able to make do with just adding the "pause until" actions to your existing macro and keeping the ⌘F4 keystroke to activate fullscreen, but I'm including the AppleScript way here in the hope that it will prove more robust. Give this a try and let me know how it works!