Page 1 of 1

Applescript Help Request...Newbie at work!!!

PostPosted: Wed Jun 14, 2017 9:42 am
by MamZelle
Hello Everyone!!!

I'm totally new at applescript and I need help!

I've set up a rule to search for a specific date in a document and I've created a "custom date token". Now what I need is an applescript to create a new Calendar Event from that token

Here is what I have so far...

https://drive.google.com/open?id=0ByhYlb3yS22iUXR0NFJQQW0ycm8

Thanks for your help
MamZelle

Re: Applescript Help Request...Newbie at work!!!

PostPosted: Wed Jun 14, 2017 11:41 am
by Mr_Noodle
It looks like you are setting the start date to the literal text "Delai 30 jours". That has no relationship to the "Delai 30 jours" custom attribute you created earlier. Look up AppleScript in the manual as it should show you how to pass that value in and use it in your script.

Re: Applescript Help Request...Newbie at work!!!

PostPosted: Mon Jun 19, 2017 11:32 am
by MamZelle
Hello again!!

Fisrt, thank you MrNoodle ... I've manage to make it work.

Now here is what I wish to accomplish and I know it might be outside the scope of support but despite all my searches I haven't found any answers.

I want to have my calendar event to display the following text "Délai 30 jours + Reférence (custom token)"

Here is what I've got so far... https://drive.google.com/open?id=0ByhYl ... nNFdFBKTkk

- I'm not sure that my references to the inputAttributes is correct since there are more than one
- I don't know how to invoke a custom token as text

As a result, I'm completely lost and any help would be appreciated.

Re: Applescript Help Request...Newbie at work!!!

PostPosted: Mon Jun 19, 2017 12:22 pm
by Mr_Noodle
"inputAttributes" is a list. You need to refer to each element in the list according to the order you specified. So, to access "Delai 30 jours", you would reference it as "item 1 of inputAttributes".

Re: Applescript Help Request...Newbie at work!!!

PostPosted: Mon Jun 19, 2017 11:32 pm
by MamZelle
Thank you Mr_Noodle... I finally figured it out and it works like a charm!!!