Property List Fun

Hello Everyone

I have a text file that contains a list of connections that I want to read in and use as connection property lists:
so that I can do this:
repeat with each machine in theSutLIST
    connect machine
end repeat

Unfortunately, Eggplant/ST will not see each line as a property list:
Runtime Error at line 46: Connection Failed - Unable to connect to Server:(serverID:"" on port:(null)
Connection failed:
Error resolving host (serverID:""

Any Ideas?


  • Hello Allen:
    todd$ cat /tmp/fileaccess.txt 

    Ensure the values of a property list are quoted...
    set accessList to "/tmp/fileaccess.txt"
    put file accessList

    also use the line option for chunking type in the repeat command
    repeat with each line machine in file accessList
    	put value(machine) is a property list 
    end repeat

    and finally leverage the value() command to bring in text from a file and convert it to the SenseTalk value object which the text represents. One thing to keep in mind is that text in a file is not the actual object it represents.
    Wed, 12/19/07 2:50:39 PM	START		Running Untitled.script
    Wed, 12/19/07 2:50:39 PM	SUCCESS		Execution Time 0:00:00 Untitled.script

    Happy Holidays!

  • Thanks Todd--

    Joy beat you to it. Happy Holidays!

  • We need to see more Joy in the forums :)
    Have a great holiday time to all you at MakeMusic, wonderful customers and wonderful people!
Sign In or Register to comment.