I am running “High Sierra” 10.13.4 and was using Safari 11.1. I had done a number of things before the crash that might have messed up SD so I’ll list what I was doing before the crash.
So I gave up after a while and just tried using loops. This is when it crashed. The script is messy because I was just trying to find anything that worked.
I uploaded a file called “Load web page.scpt.zip” which is a zipped version of the script I was using. The problem I had was I needed delays because referencing a “TheDocument” property, in this case “name” would error no matter how much of a delay I used. So I used an on error and just kept looping until it no longer got an error referencing the “TheDocument.” Doing this I was able to get the name from the document but it returned the name “Untitled”. So I figured the the script need more time to fully create the document. I ran it again to see if I still got the name “Untitled” and it crashed.
This script reliably crashes SD every time I run it.
I included the “Apple crash report in Apple Crash log.txt.zip” and included the SD crash report in “Script Debugger crash report.txt”
Load web page.scpt.zip (7.7 KB)
Script Debugger crash report.txt.zip (34.1 KB)
Apple Crash log.txt.zip (25.3 KB)
I believe this particular crash is resolved in the Script Debugger 7.0.2 beta build. Please download that build and see if you can reproduce the crash.
I ran the script with Script Debugger 7.0.2 and it no longer crashes.
I still can’t tell when the web page has finished loading. But instead of crashing it just goes forever in the wait loop which is what I expected when it crashed.
I suspect this is because I just updated to “High Sierra” just before the statement below stopped working.
All I work with when getting help text from the online help is things like: https://help.apple.com/pages/mac/7.0/#/tan014c3bd19 If you click the link it should bring up the help text.
What this all comes down to is the help system gets very temperamental about timing stuff. If I do things too quickly then it crashes, or I get part or no help text. But I can not stand the online help system Apple uses. One thing I really hate is not all the information can be reached directly. Sometimes you just have to click various things until you find the buried links. If I perform a search in help it doesn’t work because I need to know what I’m looking for before I can find what I’m looking for. In fact there are 43 links are not accessible at the top level of the help system. They don’t become accessible until you click other links and there is no real hint how to find those links or what information missing from the top level.
To export to Pages I have to work a lot between FileMaker Pro data and the Pages application. I have to pull together a lot of separate parts in the database and put them in a pages document with proper formatting and in a way that makes sense.
So if anybody reading this knows how to tell if a page in Safari is done loading I would love to hear about it.
I’m no sure how the quote marks got educated. They started out as dumb quotes. I copied the line from the script and put it in a text editor window while I typed the post. I guess the editor changed the quote marks.
Thanks for pointing that out. I changed the quote marks in the post.
Check your macOS System Preferences > Keyboard. There’s a setting there that auto-replaces simple quotes with smart quotes. I have turned this off.