Re: Applescript, WebDNA, and PDF

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 12932
interpreted = N
texte = >>Ok., I've created a solution that combines AppleScript and OneClick >>macros to do this. My problem is that I'm afraid that when my site >>starts to really get hit I might have two or more AppleScript executing >>simultaneously, and that would surely crash the process.>Are you absolutely sure AppleScript will run two simultaneously like >this? I'm pretty sure it will run sequentially.I think AppleScript does the first in, last out handling of runs. That is, the first person to call the cgi gets pushed to the end of the queue and is not released until everyone else is served. At the minimum damage the first in get a cgi timed out. When other applications are involved and the time they take to complete their tasks is lengthy, the likelihood of stepping on each other is very real. Then you crash.>>To make absolutely certain, you could put the AppleScript into >>WebMerchant's fulfillment email template, which I know always >>runs sequentially, one process at a time.I'm not familiar with WebMerchant or WebMerchant's fulfillment Email template, but, I have not had great success running AppleScript from WebDNA. I try to stick to very simple, stock AS commands. I stay out of the scripting additions folder. If you have a fairly active script you may not want to put it in WebDNA. A work around might be to have WebDNA [writeFile watchedFolder/myFileName]value1+value2+value3...[/writeFile]. Then put your AS on idle checking the watchedFolder folder every 30 seconds. (Your AS can reside on another machine to save the server's processor time.) When it finds a file in the watched folder, it starts to do its thing. If you need to pass only one parameter, a simple way is to have WebDNA name the file it creates with the value you want to pass. If there is more info your AS needs, write it in the file. Have AS open it and get the data it needs. After the AS is finished, have it delete the file. (or move it if you need a record) Then, when AS goes back to on idle in 30 seconds, it will look for the next file. If it finds more than one file, AS will need to create a list and work through the list in a repeat loop until the list is empty. Then return to on idle>I hope I've explained what I want to do sufficiently. I've got a >headache from trying to figure this out, so I may not be thinking >clearly. . .Michael, I hope I understood what you want. If this is the direction you choose to take (this is obviously, not the only way to skin a cat), and need help with the AS, I'll be glad to lend a hand. Sorry about the headache but I think we've all been there.My headache involved searching for the existance of an Email address. I'd like to thank Gary and Olin for their responses. When I turned off .tmpl caching, the search worked fine. It must have cached one of my first attemps at writing the search line and my following changes to that line had no effect. Does WebCat cache .tmpl files on start up or when they are called for the first time after start up. Just curious. Eddie Schrieffer The Creative Edge Spartanburg, SC 864.585.3343 Associated Messages, from the most recent to the oldest:

    
  1. Re: Applescript, WebDNA, and PDF (Grant Hulbert 1997)
  2. Re: Applescript, WebDNA, and PDF (Eddie Schrieffer 1997)
  3. Re: Applescript, WebDNA, and PDF (Grant Hulbert 1997)
  4. Applescript, WebDNA, and PDF (Michael Bohan 1997)
>>Ok., I've created a solution that combines AppleScript and OneClick >>macros to do this. My problem is that I'm afraid that when my site >>starts to really get hit I might have two or more AppleScript executing >>simultaneously, and that would surely crash the process.>Are you absolutely sure AppleScript will run two simultaneously like >this? I'm pretty sure it will run sequentially.I think AppleScript does the first in, last out handling of runs. That is, the first person to call the cgi gets pushed to the end of the queue and is not released until everyone else is served. At the minimum damage the first in get a cgi timed out. When other applications are involved and the time they take to complete their tasks is lengthy, the likelihood of stepping on each other is very real. Then you crash.>>To make absolutely certain, you could put the AppleScript into >>WebMerchant's fulfillment email template, which I know always >>runs sequentially, one process at a time.I'm not familiar with WebMerchant or WebMerchant's fulfillment Email template, but, I have not had great success running AppleScript from WebDNA. I try to stick to very simple, stock AS commands. I stay out of the scripting additions folder. If you have a fairly active script you may not want to put it in WebDNA. A work around might be to have WebDNA [writeFile watchedFolder/myFileName]value1+value2+value3...[/writeFile]. Then put your AS on idle checking the watchedFolder folder every 30 seconds. (Your AS can reside on another machine to save the server's processor time.) When it finds a file in the watched folder, it starts to do its thing. If you need to pass only one parameter, a simple way is to have WebDNA name the file it creates with the value you want to pass. If there is more info your AS needs, write it in the file. Have AS open it and get the data it needs. After the AS is finished, have it delete the file. (or move it if you need a record) Then, when AS goes back to on idle in 30 seconds, it will look for the next file. If it finds more than one file, AS will need to create a list and work through the list in a repeat loop until the list is empty. Then return to on idle>I hope I've explained what I want to do sufficiently. I've got a >headache from trying to figure this out, so I may not be thinking >clearly. . .Michael, I hope I understood what you want. If this is the direction you choose to take (this is obviously, not the only way to skin a cat), and need help with the AS, I'll be glad to lend a hand. Sorry about the headache but I think we've all been there.My headache involved searching for the existance of an Email address. I'd like to thank Gary and Olin for their responses. When I turned off .tmpl caching, the search worked fine. It must have cached one of my first attemps at writing the search line and my following changes to that line had no effect. Does WebCat cache .tmpl files on start up or when they are called for the first time after start up. Just curious. Eddie Schrieffer The Creative Edge Spartanburg, SC 864.585.3343 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:

Problems getting parameters passed into email. (1997) [showif] / [hideif] (1997) [WebDNA] No more SQL in 7.1? (2012) [group] ? (1997) Trying to Migrate from one server to another (2003) Help Wanted - Stowe, Vermont (1999) PayFlow Pro - Changing the Amount that was Authorized (2003) Stumped by [thisUrl] (2006) Problem with [Search] inside of [Loop]? (1997) Database Security Rev., (2002) Paramater Passing Value (2002) stripping extra spaces from form fields (2000) More Applescript (1997) https validation (2001) encrypt (2000) Emailer setup (1997) WebCat editing, SiteGuard WAS:SiteAssociative lookup style? (1997) [WebDNA] Some JS help please (2010) Spiders, robots, whatever you want to call them (1998) FIXED: Showing Results Alphabetically in Columns (top to (2002)