powermail-discuss Digest #2856 - Friday, June 25, 2010 nested folder path syntax for apple script by "m. osti" <t...@mclink.it> Re: nested folder path syntax for apple script by "PowerMail Engineering" <jer...@ctmdev.com> Re: nested folder path syntax for apple script by "m. osti" <t...@mclink.it> Re: nested folder path syntax for apple script by "PowerMail Engineering" <jer...@ctmdev.com> Re: nested folder path syntax for apple script by "m. osti" <t...@mclink.it>
---------------------------------------------------------------------- Subject: nested folder path syntax for apple script From: "m. osti" <t...@mclink.it> Date: Fri, 25 Jun 2010 09:57:14 +0200 i'm not so confident with apple script i _just_ need to put a nested folder path in a field but havent had a good time. property subj : "just try" property msgTxt : "ta da da" property rTo : "name <it...@me.com>" property acct : "kk" property fldrN : "+++++ here i need to put the nested path +++++" tell application "PowerMail 6.0.5b1" set the newM to make new message with properties {subject:subj, content:msgTxt, recipient:rTo, account:acct} at message container fldrN open the newM end tell as usual ty -- -m ---------------------------------------------------------------------- Subject: Re: nested folder path syntax for apple script From: "PowerMail Engineering" <jer...@ctmdev.com> Date: Fri, 25 Jun 2010 10:30:52 +0200 m. osti wrote: >i'm not so confident with apple script i _just_ need to put a nested >folder path in a field but havent had a good time. property fldrN : message container "subfolder" of message container "parent folder" Jérôme - CTM Engineering --------------------------------------------------------------------- "With FoxTrot I find files I do not find with Spotlight. With FoxTrot I do not get swamped with 2000 found files in one bunch, under "Documents" and now I have to scroll through a long list - with FoxTrot I can quickly and easy narrow my search. With FoxTrot with one click I can see a preview with the search term highlighted. One of the very important reasons I like FoxTrot is that it's results seem so much more appropriate. And searches in FoxTrot returns are almost instantly - way way faster than in Spotlight" Marlyse Comte, FoxTrot Personal Search user Download a demo version from www.foxtrot.ch --------------------------------------------------------------------- ---------------------------------------------------------------------- Subject: Re: nested folder path syntax for apple script From: "m. osti" <t...@mclink.it> Date: Fri, 25 Jun 2010 15:25:51 +0200 PowerMail Engineering 25-06-2010: >property fldrN : message container "subfolder" of message container >"parent folder" got me an error (container underlined) in english should be "waiting for an end of line etc got an ID" (identificativo in italian) just to have more chances next time the right path should be: message container "italy" of message container "europe" of message container "world"?? -- -m ---------------------------------------------------------------------- Subject: Re: nested folder path syntax for apple script From: "PowerMail Engineering" <jer...@ctmdev.com> Date: Fri, 25 Jun 2010 16:08:46 +0200 m. osti wrote: >got me an error (container underlined) in english should be "waiting for >an end of line etc got an ID" (identificativo in italian) > >just to have more chances next time the right path should be: message >container "italy" of message container "europe" of message container "world"?? Well, you can't specify a "folder path" as a single string, you should refer to the folder from its parent folder. For example: property subj : "just try" property msgTxt : "ta da da" property rTo : "name <it...@me.com>" property acct : "kk" property parentFolder : "parent folder name" property childFolder : "child folder name" tell application "PowerMail" set the newM to make new message with properties {subject:subj, content:msgTxt, recipient:rTo, account:acct} at message container childFolder of message container parentFolder open the newM end tell If you need to describe the folder path as a string, and the depth of the hierarchy is variable, you have to parse the string yourself: property subj : "just try" property msgTxt : "ta da da" property rTo : "name <it...@me.com>" property acct : "kk" property folderPath : "parent folder name\\child folder name" tell application "PowerMail" set AppleScript's text item delimiters to {"\\"} set folderNames to text items of folderPath set AppleScript's text item delimiters to {""} set target to application "PowerMail" repeat with folderName in folderNames set target to message container folderName of target end repeat set the newM to make new message with properties {subject:subj, content:msgTxt, recipient:rTo, account:acct} at target open the newM end tell PS: the final version of 6.0.5 is available Jérôme - CTM Engineering --------------------------------------------------------------------- "As someone who's in the business of receiving and (ideally) responding to 50 - 100 emails a day, through three different accounts, using three different ports. As, someone who's in a constant state of disorganzation, always losing, confusing, and misusing. As someone who had to jump between OS9 and OSX machines for much longer than it was in vogue, and needed his email to jump with him. As a Mac user who's email is his bread and butter, and sometimes needs it to work better than he does. I find Powermail to be simply invaluable." J. Vernet, PowerMail user Download a demo version from www.ctmdev.com --------------------------------------------------------------------- ---------------------------------------------------------------------- Subject: Re: nested folder path syntax for apple script From: "m. osti" <t...@mclink.it> Date: Fri, 25 Jun 2010 17:33:09 +0200 PowerMail Engineering 25-06-2010: >Well, you can't specify a "folder path" as a single string, you should >refer to the folder from its parent folder. For example: ahhhh ok. thank you. >PS: the final version of 6.0.5 is available should be up to date: 6.0.5/4621 -- -m ---------------------------------------------------------------------- End of powermail-discuss Digest