what's the syntax for ical POSITION event?

What’s the syntax for ical POSITION event?
I’ve search in dictionary, but “position” (the little gray text down the name of the event) I not found.
In calendar the syntax is “Description”, but in event “Description” in notes…
Thank’s!

Ciao,

the property is location, not position

Sounds illogical. What is this like a trick question?

Thank’s and sorry!
Dear StefanK…
but NSUnknownKeyScriptError
because is not a number?


tell application "iCal"
	set punteggio to 2
	tell event 1 of calendar "Cognome Nome"
		set location to location + punteggio
		set description to "Il tuo punteggio attuale, aggiornato al " & (current date) & " e' di " & location + punteggio & " punti."
		
	end tell
end tell

:P!

+ is an arithmetic operator to add numbers
& is the operator to concatenate strings

set location to location & (punteggio as string)

yes… but I want the SUM of punteggio + location …!

ho capito, then you must do it the other way round

set location to ((location as number) + punteggio) as string

OK! :smiley:

set prevpunt to location
set totale to (prevpunt as string) + (punteggio as string)
set location to (totale as string)

it’s right?

No,

set prevpunt to location -- result is a string set totale to (prevpunt as number) + punteggio -- coerce prevpunt to a number and add punteggio set location to (totale as Unicode text) -- coerce back to text (in this case it's Unicode text)

Hi Maestro,

What is the position of an event in your mind?

gl,

and the correct syntax for…

tell event “nome evento” of calendar “nome calendario”

:smiley:

This is the correct syntax

tell application "iCal"
	tell event "nome evento" of calendar "nome calendario"
		-- fa qualcosa
	end tell
end tell