Operator " & NOT "

I’m trying to modify a script but don’t know what is the word for logic operator “& not”:

set tags of anEntry to oTags & "Past Due" & (not "Oggi")


 & (not "Oggi")

everything works great but I want exactly to delete “Oggi” from the tags
if I add

& (not "Oggi")

the answer is “Can’t change "Oggi" in boolean type.” (something like that, I’m translating from italian!

is it possible to have a “& not” operator?
every help would be appreciated

you would have to use text item delimeters. Do a search in the forums, theres tons of topics about them.

Ciao Nestor,

the not operator is exclusively a boolean operator.
It changes true to false and vice versa, nothing else.

As mentioned by Hendo, the best way to filter text is to use AppleScript’s text item delimiters
Take a look at thistutorial

Ciao StepfanK,

tried to get it to work with the tutorial but don’t succeded maybe because the code uses conditions (?).
Here’s the code, coul you help:

tell application "Journler"
	set Now to (current date) --(- 2 * days)
	set time of Now to 6 * 3600 -- 6 AM 
	set TD to entries of folder "Agenda GTD"
	set TDF to name of folders of folder "Agenda GTD"
	repeat with F in TDF
		set TD to TD & entries of folder F
	end repeat
	repeat with anEntry in TD
		set TG to ((date due of anEntry) - Now) / days
		if TG < 0 then
			get tags of anEntry
			set oTags to tags of anEntry
			set tags of anEntry to oTags & "Past Due"
			set nTags to oTags & "Past Due"
			get rich text of nTags
			--if tags of anEntry contains "Oggi", "Domani", "2 Giorni", "Settimana, "Mese" then
			---replace this tags with "Past Due"
			--if tags of anEntry does not contain "Oggi", "Domani", "2 Giorni", "Settimana, ---"Mese" then 
			--set tags of anEntry to oTags & "Past Due"
		else if TG > 0 and TG < 1 then
			set tags of anEntry to "Oggi"
		else if TG > 1 and TG < 2 then
			set tags of anEntry to "Domani"
		else if TG > 2 and TG < 3 then
			set tags of anEntry to "2 Giorni"
		else if TG > 3 and TG < 7 then
			set tags of anEntry to "Settimana"
		else if TG > 7 and TG < 30 then
			set tags of anEntry to "Mese"
			set tags of anEntry to "Pending"
		end if
	end repeat
end tell

I’d like to, but I have no idea about the data structure.
Can you please post an example of the contents of tags, and its class (list or just text)?

Hi StefanK if I ask “get tags of anEntry” the result is:

{“oggi”, “carrasco germán”}. And class is a list of text

thanks for your help;)

to delete a specified item from a list,
use something like this

property myList : {"oggi", "carrasco germán"}
set myList to deleteItemFromList(myList, "oggi")

on deleteItemFromList(theList, theItem)
	if {theItem} is not in theList then return theList
	set newList to {}
	repeat with i in theList
		if contents of i is not theItem then set end of newList to contents of i
	end repeat
	return newList
end deleteItemFromList