URL Access Scripting Dies

I’ve heard people mention that URL Access Scripting for OS X is flawed, but until recently it’s worked fine for me. Except all of the sudden this week it stopped working. Rebooting didn’t help. Upgrading from 10.1.2 to 10.1.3 didn’t help. I don’t have the developer tools installed on that machine, maybe that would help. Has anyone else experienced this problem?

: I should also mention that this script works fine on one machine, and doesn’t
: work at all on another machine (though it worked last week)
I think I see the problem. You need to give UAS a file, not an alias, which is what choose file gives you. You’ll need to convert it first. Another possibility is to do:
set this_item to choose file as string
– then, upload putting file in front of this_item in the upload command

: I think I see the problem. You need to give UAS a file, not an alias, which
: is what choose file gives you. You’ll need to convert it first. Another
: possibility is to do: set this_item to choose file as string
: – then, upload putting file in front of this_item in the upload command
tell application “Finder”
activate
set this_item to (choose file) as string end tell set myURL to “ftp://user:pass@server/path/
try
tell application “URL Access Scripting” to upload file this_item to myURL replacing yes with progress without binhexing
on error errMsg number errorNum
display dialog errMsg & " " & errorNum end try
Ok, I tried modifying the script like you described, and it still times out on one machine but works fine on another. It’s as if there’s something messed up about that machine.

: When you try to do what? Anything? If you try to submit a form using form
: data, UAS is totally broken right now, since 10.1, at least.
: Can you write the command you used here? tell application “Finder”
activate
set this_item to choose file end tell set myURL to “ftp://username:pass@server/path/
try
tell application “URL Access Scripting” to upload this_item to myURL replacing yes with progress without binhexing
on error errMsg number errorNum
display dialog errMsg & " " & errorNum end try

: activate
: set this_item to choose file end tell set myURL to
: “ftp://username:pass@server/path/
: try
: tell application “URL Access Scripting” to upload this_item to
: myURL replacing yes with progress without binhexing
: on error errMsg number errorNum
: display dialog errMsg & " " & errorNum end try
I should also mention that this script works fine on one machine, and doesn’t work at all on another machine (though it worked last week)

: Hmm, this may help: tell application “URL Access Scripting”
: activate upload file this_item to myURL replacing yes with progress
: without binhexing end tell
: Separate out the command into a distinct TELL block. I’ve seen this make a
: difference before, strangely enough.
I just tried it, no luck. I wonder if URL Access Scripting has a prefs file that could be corrupted?

: tell application “Finder”
: activate
: set this_item to (choose file) as string end tell set myURL to
: “ftp://user:pass@server/path/
: try
: tell application “URL Access Scripting” to upload file this_item to
: myURL replacing yes with progress without binhexing
: on error errMsg number errorNum
: display dialog errMsg & " " & errorNum end try
: Ok, I tried modifying the script like you described, and it still times out
: on one machine but works fine on another. It’s as if there’s something
: messed up about that machine.
Hmm, this may help:

 tell application "URL Access Scripting" activate upload file this_item to myURL replacing yes with progress without binhexing end tell 

Separate out the command into a distinct TELL block. I’ve seen this make a difference before, strangely enough.

: I just tried it, no luck. I wonder if URL Access Scripting has a prefs file
: that could be corrupted?
In OS 9, there is a URL Access Log Folder with a URL Access Download Log file in the System:Application Support: folder. Maybe something similar on OS X?

I, too, am having a problem with similar code.
When I have the event log open, my upload command returns a value of “false” and gives the error “URL Access Scripting got an error: Extension failure”

I FINALLY figured it out. I changed my proxy settings, and didn’t have any DNS server entries on that computer. I fixed those items, and the script works like a charm! Thanks for your help!