Re: AppleScript does not work properly ...

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 27423
interpreted = N
texte = > >Kenneth Grome wrote at 12/02/00 22:38 > > > >>Why is it that when I run an applescript in the Script Editor, it works > >>fine, but when I copy and paste that exact same script into a webcatalog > >>applescript context, it fails? > > > >Often this is because the script fails to target an application, > >ScriptEditor deals with calls that are handled by the Finder or some > >scripting components without the request being explicitly being directed > >to the FInder (etc). > > > >> > >>This text appears on the resulting web page: > >> > >>Çhandler download_fileÈ > > > >handler download_file > > > >My guess: you need to target the Finder or URL Access Scripting. Post > >the bit of script that makes that call and I'll have a look. > > >Here's the entire script, please tell me what you find that's wrong:I don't think you will make success with using on run handlers. Try to make on script out of it instead. The following should work (not tested): set download_folder to path to launcher items folder as text set the file_name to abc123 set the file_path to download_folder & file_name set the file_URL to http://webdna.net/index.tpl tell application Finder if (the creator type of every process) contains «class uasc» then tell application URL Access Scripting to quit end if end tell try with timeout of 120 seconds tell application URL Access Scripting download the file_URL to file file_path replacing yes quit end tell end timeout return true on error error_message number error_number return false end tryThis script should return true if the file was downloaded and false on error. ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Ljusa Idéer AB S-211 37 Malmoe Fax +46 40 97 99 77 Sweden http://www.ljusaideer.se------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Associated Messages, from the most recent to the oldest:

    
  1. Re: AppleScript does not work properly ... (WebDNA Support 2000)
  2. Re: AppleScript does not work properly ... (Christer Olsson 2000)
  3. Re: AppleScript does not work properly ... (Kenneth Grome 2000)
  4. Re: AppleScript does not work properly ... (Clive Bruton 2000)
  5. AppleScript does not work properly ... (Kenneth Grome 2000)
> >Kenneth Grome wrote at 12/02/00 22:38 > > > >>Why is it that when I run an applescript in the Script Editor, it works > >>fine, but when I copy and paste that exact same script into a webcatalog > >>applescript context, it fails? > > > >Often this is because the script fails to target an application, > >ScriptEditor deals with calls that are handled by the Finder or some > >scripting components without the request being explicitly being directed > >to the FInder (etc). > > > >> > >>This text appears on the resulting web page: > >> > >>Çhandler download_fileÈ > > > >handler download_file > > > >My guess: you need to target the Finder or URL Access Scripting. Post > >the bit of script that makes that call and I'll have a look. > > >Here's the entire script, please tell me what you find that's wrong:I don't think you will make success with using on run handlers. Try to make on script out of it instead. The following should work (not tested): set download_folder to path to launcher items folder as text set the file_name to abc123 set the file_path to download_folder & file_name set the file_URL to http://webdna.net/index.tpl tell application Finder if (the creator type of every process) contains «class uasc» then tell application URL Access Scripting to quit end if end tell try with timeout of 120 seconds tell application URL Access Scripting download the file_URL to file file_path replacing yes quit end tell end timeout return true on error error_message number error_number return false end tryThis script should return true if the file was downloaded and false on error. ************************************************************* Christer Olsson Stora Nygatan 21 Phone +46 40 791 50 Ljusa Idéer AB S-211 37 Malmoe Fax +46 40 97 99 77 Sweden http://www.ljusaideer.se------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Christer Olsson

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Last digit of Credit Card Stripped (1997) Text variables do not show (1999) [WebDNA] Height, width of images (2013) nslookup (2000) WebCatalog for guestbook ? (1997) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) db access problem after switching to SSL (2001) Question re: Format command (2000) date math [2.x] (1999) Not really WebCat- (1997) [WebDNA] Digest from talk@webdna.us (2008) syntax question, not in online refernce (1997) .htaccess to make WebDNA serve HTML (2007) Finding max value for a field (1997) Remove Multiple Line Items (2005) WebCat2 - [include] tags (1997) Grep Help (2003) Multiple Stores and WebCatalog Prefs (1997) sort problems....bug or brain fart? (1997) [ShowNext] (2007)