Re: Problems with [Applescript]

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 11128
interpreted = N
texte = >>>>[AppleScript]if (current date - date 1997-04-24 19:06:34)>3600 then >>>>return [INCLUDE redanrostat2.form][/AppleScript]>>>There is an AppleScript syntax error here. This needs to be: >>> >>>[AppleScript]if (current date - date 1997-04-24 19:06:34)>3600 then >>>return [INCLUDE redanrostat2.form] >>>end if >>>[/AppleScript]>>No. That was my original code, and did not work.>>>Also, if there are any quotes inside redanrostat2.form, they can mess up >>>AppleScript>>No quotes there.>>But I solved the problem by avoiding the if statement in [Applescript]: >> >>[ShowIf [AppleScript](current date - date [Datum])[/AppleScript]>3600] >>[INCLUDE rosta.form] >>[/ShowIf]>I've been doing a lot of tests on this and it seems to like adding an else >statement clears up all the errors so that something is always returned >(i.e. even return ).So are you saying that the real solution to all this is that we should *always* end our webcat applescripts with either return or with return what we really want returned just to make it work every time?I really wanted to use this WebCat AppleScript feature but I had so many problems earlier that I just gave up. If this technique will resolve most of my previous problems, I will be happy to start using AppleScript with webcat again ...Sincerely, Ken Grome ..... ken@iav.com Associated Messages, from the most recent to the oldest:

    
  1. Re: Problems with [Applescript] (Kenneth Grome 1997)
  2. Re: Problems with [Applescript] (John Hill 1997)
  3. Re: Problems with [Applescript] (Christer Olsson 1997)
  4. Re: Problems with [Applescript] (Grant Hulbert 1997)
  5. Problems with [Applescript] (Christer Olsson 1997)
>>>>[AppleScript]if (current date - date 1997-04-24 19:06:34)>3600 then >>>>return [INCLUDE redanrostat2.form][/AppleScript]>>>There is an AppleScript syntax error here. This needs to be: >>> >>>[AppleScript]if (current date - date 1997-04-24 19:06:34)>3600 then >>>return [INCLUDE redanrostat2.form] >>>end if >>>[/AppleScript]>>No. That was my original code, and did not work.>>>Also, if there are any quotes inside redanrostat2.form, they can mess up >>>AppleScript>>No quotes there.>>But I solved the problem by avoiding the if statement in [Applescript]: >> >>[ShowIf [AppleScript](current date - date [Datum])[/AppleScript]>3600] >>[INCLUDE rosta.form] >>[/ShowIf]>I've been doing a lot of tests on this and it seems to like adding an else >statement clears up all the errors so that something is always returned >(i.e. even return ).So are you saying that the real solution to all this is that we should *always* end our webcat applescripts with either return or with return what we really want returned just to make it work every time?I really wanted to use this WebCat AppleScript feature but I had so many problems earlier that I just gave up. If this technique will resolve most of my previous problems, I will be happy to start using AppleScript with webcat again ...Sincerely, Ken Grome ..... ken@iav.com Kenneth Grome

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:

How did *you* learn Web Catalog? (2000) WebCatalog/Mac 2.1b2 - PIXO (1997) Searching for (field1 OR field2) AND field3 (2000) Problems with [Applescript] (1997) linux WebCatalog ODBC MySQL (2001) Problems passing [SKU] with $Replace in 2.0 (1997) Email Newsletters (2003) shipcost - cleaner with a table (1998) Navigator Parsing (1997) (1997) 1st Comparison inside [fileinfo] broken. = bug? (2004) Single Link browsing (1997) Quitting WebMerchant ? (1997) Add to Cart & List of Products (1997) WebCat2: Items xx to xx shown, etc. (1997) Limit on nested [ShowIf]'s? (1997) dates and hex formatting (1997) [SearchString] usage (1997) Too Much Rootbeer Free Offer (1997) [SetHeader] docs? (1997)