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 ofthe queue and is not released until everyone else is served. At theminimum damage the first in get a cgi timed out. When other applicationsare 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 Emailtemplate, but, I have not had great success running AppleScript fromWebDNA. I try to stick to very simple, stock AS commands. I stay outof the scripting additions folder. If you have a fairly active scriptyou may not want to put it in WebDNA. A work around might be to haveWebDNA [writeFilewatchedFolder/myFileName]value1+value2+value3...[/writeFile].Then put your AS on idle checking the watchedFolder folder every30 seconds. (Your AS can reside on another machine to save the server'sprocessor time.) When it finds a file in the watched folder, it startstodo its thing. If you need to pass only one parameter, a simple way is tohave WebDNA name the file it creates with the value you want to pass. Ifthere is more info your AS needs, write it in the file. Have AS open itand get the data it needs. After the AS is finished, have it delete thefile. (or move it if you need a record) Then, when AS goes back to onidlein 30 seconds, it will look for the next file. If it finds more than onefile, AS will need to create a list and work through the list in arepeat loopuntil 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 youchoose 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 aboutthe 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 thesearch line and my following changes to that line had no effect.Does WebCat cache .tmpl files on start up or when they are calledfor the first time after start up. Just curious.Eddie SchriefferThe Creative EdgeSpartanburg, SC864.585.3343
Associated Messages, from the most recent to the oldest:
>>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 ofthe queue and is not released until everyone else is served. At theminimum damage the first in get a cgi timed out. When other applicationsare 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 Emailtemplate, but, I have not had great success running AppleScript fromWebDNA. I try to stick to very simple, stock AS commands. I stay outof the scripting additions folder. If you have a fairly active scriptyou may not want to put it in WebDNA. A work around might be to haveWebDNA [writeFilewatchedFolder/myFileName]value1+value2+value3...[/writeFile].Then put your AS on idle checking the watchedFolder folder every30 seconds. (Your AS can reside on another machine to save the server'sprocessor time.) When it finds a file in the watched folder, it startstodo its thing. If you need to pass only one parameter, a simple way is tohave WebDNA name the file it creates with the value you want to pass. Ifthere is more info your AS needs, write it in the file. Have AS open itand get the data it needs. After the AS is finished, have it delete thefile. (or move it if you need a record) Then, when AS goes back to onidlein 30 seconds, it will look for the next file. If it finds more than onefile, AS will need to create a list and work through the list in arepeat loopuntil 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 youchoose 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 aboutthe 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 thesearch line and my following changes to that line had no effect.Does WebCat cache .tmpl files on start up or when they are calledfor the first time after start up. Just curious.Eddie SchriefferThe Creative EdgeSpartanburg, SC864.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:
Bug Report, maybe (1997)
Another Excel Problem (2003)
Problem 2 of 2 (was: Shipping Confusion) (2000)
Search/sort in URL Was: GuestBook example (1997)
Security for malls with different webmasters (1998)
possible, WebCat2.0 and checkboxes-restated (1997)
Not reading code (1997)
HTML docs are wrong about listwords ... (2000)
[SQL] on MacOs to SQL Server ... HOW TO? (2000)
[/application] error? (1997)
NT considerations (1997)
Re:WebCatalog f2 Installation (1997)
Pgp&emailer (1997)
HELP WITH DATES (1997)
Bug Report, maybe (1997)
Emailer setup (1997)
getting images' width/height (1998)
[WebDNA] WebDNA programmers for hire? (2010)
WebCat is different user (1999)
Is this possible, WebCat2.0 and checkboxes (1997)