vendredi 6 octobre 2017

Applescript comparison stopped working

I have a script that does a cURL request and returns a string if no database rows are found. At one point this was working and then all the sudden it stopped working.

set testURL to the quoted form of ("http:/  
set theURL to (do shell script "curl " & testURL & "")  

if theURL = "no rows" then  

    display dialog "error"  
    error number -128 

else  
     display dialog("success")  
end if  

when i display the veriable setURL it always comes back "no rows" and the comparison never works. It skips over the error message and skips right to success no matter what. What is this and why did my comparison stop working all of the sudden? I have tried everything from trying to set it as a string to different ways of saying the same thing and it never works.

Aucun commentaire:

Enregistrer un commentaire