Re: Slow applescript context ...

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 27570
interpreted = N
texte = Hi Ken,If you *have* to have a result returned from your stay open script, then you can use something like this:This is ugly but should work. Make a small stay open script that can call your big script and ignore its results. As soon as the small script passes its data, it will return whatever result you need as evidence that it did its job. [applescript] tell application smallStayOpenScript doCall([var1], [var2], [var3]) end tell [/applescript]----This is your small stay open application---------- on doCall(var1, var2, var3) tell application bigStayOpenScript ignoring application responses doLongStuff(var1, var2, var3) end ignoring end tell return {var1, var2, var3}--or whatever end doCall --------------------------------------------However, if most of the time is spent waiting on some other app to perform, then just use your original script and wrap the time consuming stuff in the ignoring lines. It would be cleaner than building a small stay open app to do the work.If you don't *have* to have a result returned from your stay open script, then you can use something like this:[applescript] tell application myStayOpenScript ignoring application responses doLongStuff(var1,var2,var3) end ignoring end tell [/applescript] But WebCat's [spawn] tag should do a cleaner job of it.[spawn] [applescript] tell application myStayOpenScript doLongStuff(var1,var2,var3) end tell [/applescript] [/spawn] Hope some of this helps, -- Eddie Schriefferads to go.com The online catalog of ready-to-go print ads. http://www.adstogo.com ------snip------------I tried that already, at least as far as I could get with it, but it made no difference in speed that I could see. It looks like my [applescript] passes the variables to the stay-open script and then just sits there and wait for the stay-open script to complete its operation before webcat can continue ...I'm not an applescript expert, so I do not know how (or if there's even a way) to pass variables to a stay-open script *and* to make that stay-open script immediately send a message back to the [applescript] telling it:Thanks, I received the variables you sent me, so please quit now. Do not wait for me to finish running my script.Do you know how to do this? Do you know if it's even possible? ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================-------------snip------------------------------------------------------------------------------ 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: Slow applescript context ... (Eddie Schrieffer 2000)
  2. Re: Slow applescript context ... (Kenneth Grome 2000)
  3. Re: Slow applescript context ... (Eddie Schrieffer 2000)
  4. Slow applescript context ... (Kenneth Grome 2000)
Hi Ken,If you *have* to have a result returned from your stay open script, then you can use something like this:This is ugly but should work. Make a small stay open script that can call your big script and ignore its results. As soon as the small script passes its data, it will return whatever result you need as evidence that it did its job. [applescript] tell application smallStayOpenScript doCall([var1], [var2], [var3]) end tell [/applescript]----This is your small stay open application---------- on doCall(var1, var2, var3) tell application bigStayOpenScript ignoring application responses doLongStuff(var1, var2, var3) end ignoring end tell return {var1, var2, var3}--or whatever end doCall --------------------------------------------However, if most of the time is spent waiting on some other app to perform, then just use your original script and wrap the time consuming stuff in the ignoring lines. It would be cleaner than building a small stay open app to do the work.If you don't *have* to have a result returned from your stay open script, then you can use something like this:[applescript] tell application myStayOpenScript ignoring application responses doLongStuff(var1,var2,var3) end ignoring end tell [/applescript] But WebCat's [spawn] tag should do a cleaner job of it.[spawn] [applescript] tell application myStayOpenScript doLongStuff(var1,var2,var3) end tell [/applescript] [/spawn] Hope some of this helps, -- Eddie Schriefferads to go.com The online catalog of ready-to-go print ads. http://www.adstogo.com ------snip------------I tried that already, at least as far as I could get with it, but it made no difference in speed that I could see. It looks like my [applescript] passes the variables to the stay-open script and then just sits there and wait for the stay-open script to complete its operation before webcat can continue ...I'm not an applescript expert, so I do not know how (or if there's even a way) to pass variables to a stay-open script *and* to make that stay-open script immediately send a message back to the [applescript] telling it:Thanks, I received the variables you sent me, so please quit now. Do not wait for me to finish running my script.Do you know how to do this? Do you know if it's even possible? ================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================-------------snip------------------------------------------------------------------------------ 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 Eddie Schrieffer

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:

WebCatalog can't find database (1997) Error log crashes server? (1999) Possible Bug in 2.0b15.acgi (1997) RE: new cart IDs being assigned somehow (1997) Sorry I didn't pay attention-but ??? (1997) WebCat2 several catalogs? (1997) WebDNA 4.5.1 Now Available [OT] (2003) TIP OF THE DAY (2004) can you reassign loop index? (1998) Can WebDNA do this? (2000) [WebDNA] Anyone interested .... (2011) Is there a max number of fields? (1998) Q: for those who use Cookies for sessions? (2004) SIMS & WebCat .... Alias Folder (2002) WebCatalog2 Feature Feedback (1996) RE: Writefile outside WebSTAR hierarchy? (1997) WebCatalog Technical Reference (1997) Shared databases (2003) Bug Report, maybe (1997) Encrypt/Decrypt (2007)