Thank you Phil & Steve.
There seems to be some sort of underlying problem.
To start, I’ll make sure you know what I’m trying to do.
On my home folder of my website I have two websites…
I have created a folder at the same level, ‘Email List’
In this I have created a txt file, 'Used Emails.txt', using the file creator of Rapid Weaver.
I want to read that txt file, check there is no more than 2 given copies of a particular email address in it, and if not, add the email address and the company name at the end of the text file, as a list.
I’ve tried following your advice, and also tried to open the page, and the folder, and the txt file, using Safari.
However, I’m getting a double colon in the Safari error message, and simply don’t know why! (/http/::)
I’ve also ensured I have full stop where every name on the site lists as a space.
And, Phil, using System Events is a habit, as I often write and text ASCObjC code in Script Editor, or Script Debugger, and just copy and paste when it’s working. Use the same variables. Also why I used the ‘my ‘. I’ve just found it a good habit to get into.
tell application "Safari" open theCheckPath end tell
try # set (my theEmailList) to do shell script "curl " & theCheckPath # set (my theEmailList) to do shell script "curl file_get_contents " & theCheckPath # do shell script "curl file_get_contents " & theCheckPath & " echo " & (my theEmailList) set theEmailList to do shell script "curl " & theCheckPath on error say 0.1 set theEmailList to {} end try try if kind of theEmailList is not list then set theEmailList to {} on error errmsg number errnum if errnum = -1728 then set theEmailList to {} end try try set end of theEmailList to {{EmailAddress}, {businessName}} on error errmsg set end of theEmailList to {{EmailAddress}, {businessName}} tell application "System Events" to display dialog errmsg end try say 2 try do shell script "curl -T -d " & theEmailList & " --url " & theCheckPath on error errmsg tell application "System Events" to display dialog errmsg end try
theEmailList
|