Yvan, I’m curious. Why did you put this in the Mail handler, rather than outside of it?
tell me to set theUserPath to "" & (path to home folder) set shortSpreadSheet to "Documents:AppRevenue.numbers" # EDITED, was "Documents:MyNumbers.numbers" set my theSpreadSheet to theUserPath & shortSpreadSheet
The first time I ran the script, the property was empty so I assumed that the instructions supposed to fill it weren't executed. It seems to be logical because the entry point is the instruction :
on perform mail action with messages theMessages for rule theRule
My understanding is that it behaves like the code below saved as an application.
property theSpreadSheet : missing value
tell me to set theUserPath to "" & (path to home folder) set shortSpreadSheet to "Documents:AppRevenue.numbers" # EDITED, was "Documents:MyNumbers.numbers" set my theSpreadSheet to theUserPath & shortSpreadSheet
on open droppedItems
display dialog ">>>" & my theSpreadSheet & "<<<" end open
It will display ">>>missing value<<<"
Just a question : what need for :
set this_sheet to (first sheet whose name is "A Sheet”) I wrote this script a couple of years ago. I can’t recall trying the simple way and failing. It might just have been done that way in some script I used as an example from the internet.
Thanks for this answer.
Yvan KOENIG running Sierra 10.12.5 in French (VALLAURIS, France) samedi 3 juin 2017 14:08:47
|