URL Access Scripting- post data
URL Access Scripting- post data
- Subject: URL Access Scripting- post data
- From: email@hidden (Gerd)
- Date: Sun, 6 Oct 2002 23:14:06 +0200
Hallo Marc, Hallo Rob,
thanks for your help.
1. question:
I tried as you suggested (OS X 10.1.5):
set myFolderRef to ((path to startup disk) as string) & ":Festplatte"
and got the error:
Can't make alias . Can't make some object into a <<handler run>> .
2. question
If i try to run the script this way i still get following error:
Application is not running.
The whole line 'download the action ... ' is highlighted .
Before i choose the UAS when i was asked 'where is UAS ?' .
(I put away the old OS 9 UAS) When i twas there, the sript always loaded
only the OS 9 UAS .
set the action_URL to "
http://hotornot.whow.de/user.php?action=index.php"
set the form_data to
"previmg_wertung=10&previd=244235&state=wertung&redir=nein"
set the query_results_file to "Festplatte:" & "FMData"
with timeout of 100 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
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
end timeout
Any ideas
Gerd
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>
_______________________________________________
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.