Very little experience with scripting but I’m actually enjoying learning this stuff!
I want a subroutine (I think?) in my script to check a certain value. If the value is 2 or greater, then the script can proceed. If the value is less than 2 then a web page needs to be clicked once and then the script can proceed.
I tried going down the IF/ELSE route but I couldn’t get the script to proceed after the webpage had been clicked.
Therefore I tried the code below but it doesn’t ever click the page.
Any help greatly appreciated!
tell application “Finder”
set attchList1 to every file of alias “Path:To:Folder:”
set theCNT1 to count of attchList1
end tell
on download_check()
if theCNT < 2 then
activate application "Safari"
tell application "System Events"
tell process "Safari"
click at {609, 464}
end tell
end tell
end if
end download_check