Re: URL Access - post data
Re: URL Access - post data
- Subject: Re: URL Access - post data
- From: "Marc K. Myers" <email@hidden>
- Date: Sun, 6 Oct 2002 13:38:12 -0400
Date: Sun, 6 Oct 2002 12:22:15 +0200
Subject: URL Access - post data
From: email@hidden (Gerd)
To: email@hidden
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=ne
in"
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
Hallo Rob,
thanks for your help.
With your suggestion i get the error:
runtime error: Can't make alias . Can't make some object into a
<<handler run>>.
The word text in the following sentence is highlighted: set the
query_results_file to ((path to startup disk) as text) & "Festplatte:"
&
"FMData"
To find out the path to startup disk i tried following:
tell application "Finder"
get path to startup disk
set a to result
display dialog a
end tell
and i got the error:
can't make 'startup disk' into an item
Any other suggestions??
Under OS X scripting addition commands don't seem to work very well (if
at all) inside Finder (and other) tell blocks. Do your "get path"
outside the tell block and you should be OK. In fact, skip the Finder
tell block altogether ("display dialog" is part of the Standard
Additions OSAX, too). All it takes is
display dialog (path to startup disk as text)
Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074
[10/06/02 1:32:24 PM]
_______________________________________________
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.