That did the trick. Thank You!
I examined the super of HTTPSocket1 as saw it was set to TCPSocket. There were two further selections of HTTPSocket > Class1. I switched this to Class1.
I deleted the two unused events from HTTPSocket1. I copied the code from the DownloadComplete of HTTPSocket1, deleted that event and created a DownloadComplete event for Class1 where the code was pasted.
That fixed the issue of running in Xojo. Strangely, this ran fine in RB and RealStudio.
This was a companion app that batch downloaded data from a site which is repackaged for use with my main app. This rarely changes - only one major update since 2007.
I was thus looking for a way to create a loop that would populate the form, submit it, and save the result as a webarchive file from safari. Information would then be extracted from the webarchives files instead of the previous html files my RB app created.
For the time being I was able to create a Applescript by adding my own Applescript code with various bits created by others. Currently I have this running in Script Editor and have not attempted to run said code using Xojo.
I don’t want to give away the specific code I created as this would compromise my main app; however, I will provide links to the Applescript code created by others that you can use to create something similar.
Modifications of these methods are called inside a loop that submits individual substrings from a larger string.
Code to fill out forms:
Code to click button:
Modifications of the code below is used inside a loop to save the files (second post in thread). The top “set theFMPfieldText…” was removed and the lower “keystroke theFMPfieldText” instead uses a string provided by the loop.
I also needed some Applescript that would pad my substrings with extra zeros. My previous RB code used select case to accomplish this.
A delay of 20 was added inside my loop to be on the safe side.