Re: URL Access - post data
Re: URL Access - post data
- Subject: Re: URL Access - post data
- From: Rob <email@hidden>
- Date: Sat, 05 Oct 2002 20:04:50 -0700
On 10/5/02 6:22 PM, "email@hidden"
<email@hidden> wrote:
>
Message: 3
>
Date: Sat, 5 Oct 2002 16:21:04 +0200
>
Subject: URL Access - post data
>
From: email@hidden (Gerd)
>
To: email@hidden
>
>
Hallo Scripters.
>
>
i still have some problems with posting data with URL Access Scripting.
>
My download script works fine, but i got the following sample somewhere
>
and it does not work
>
>
I always get the message 'application does not run'.
>
>
Does anybody know why ?
>
>
set action_URL to "http://hotornot.whow.de/user.php?action=index.php"
>
set the query_results_file to "Festplatte:" & "FMData"
>
set the form_data to
>
"bildid=244235&previmg_wertung=10&previd=244235&state=wertung&redir=nein"
>
>
tell application "URL Access Scripting"
>
download the action_URL to file the query_results_file form data
>
form_data replacing yes with progress
>
end tell
>
>
thanks in advance for any help
>
>
Gerd
Try this....
-- start of script
set the action_URL to "
http://hotornot.whow.de/user.php?action=index.php"
set the form_data to
"bildid=244235&previmg_wertung=10&previd=244235&state=wertung&redir=nein"
set the query_results_file to ((path to startup disk) as text) &
"Festplatte:" & "FMData"
try
with timeout of 30 seconds -- try connecting for 1 minute
tell application "URL Access Scripting"
download the action_URL to file the query_results_file form data
form_data replacing yes with progress
quit
end tell
end timeout
tell application "Finder"
set the file type of the file query_results_file to "TEXT"
set the creator type of the file query_results_file to "MSIE"
open the file query_results_file
end tell
on error the error_message number error_number
tell application "URL Access Scripting" to quit
if the error_number is not -128 then
tell application (path to frontmost application as text)
beep
display dialog the error_message buttons {"Cancel"} default
button 1
end tell
end if
end try
-- end of script
Not Bad!!? ;)
Hope this helps.
Rob
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.