Skip to main content
December 16, 2009
Question

Error: Can't get every item of...

  • December 16, 2009
  • 1 reply
  • 414 views

I have a script that worked find in Tiger but it gives me an error
after I upgraded to Leopard 10.5.8.  I'm not sure how to fix it.

The script is supposed to make a list of dates that I can choose from.


Here it is:

                repeat with curyear in myyear
                         repeat with curmonth in mymonth
                                 repeat with curdate in mydate
                                         set mytemp to curmonth & " " & curdate & ", " & curyear
                                         set myjournal to (every item of myjournal) & mytemp
                                 end repeat
                         end repeat
                 end repeat

But now I get an error saying:

"Can’t get every item of \"\"."

Help please!

This topic has been closed for replies.

1 reply

Inspiring
December 16, 2009

You're not showing the full script, so it's impossible to tell. Where is the error happening? Where does myjournal come from?

December 16, 2009

Sorry about that. Here's the complete script. It should come up with a list

of dates to choose from.

tell application "Adobe InDesign CS2"

activate

set mydoc to active document

set myjournal to ""

set myyear to {2009, 2010}

set mymonth to {"January", "February", "March", "April", "May",

"June", "July", "August", "September", "October", "November", "December"}

set mydate to {1, 15}

repeat with curyear in myyear

repeat with curmonth in mymonth

repeat with curdate in mydate

set mytemp to curmonth & " " & curdate & ", " & curyear

set myjournal to (every item of myjournal) & mytemp

end repeat

end repeat

end repeat

set mypick to (choose from list myjournal) as string

display dialog mypick

end tell

Bryan Colley

jupiterkansas@gmail.com

Inspiring
December 16, 2009

You still haven't said where you're getting the error -- it works here.

Try changing:

        set myjournal to ""

to
        set myjournal to {}
and:
                 set myjournal to (every item of myjournal) & mytemp
to
                 set end of myjournal to  mytemp