advertisement

Article:
  Controlling Your Mac with AppleScript and Java
Subject:   String resultString = results.stringValue(); Error CodeString resultString = results.stringValue();
Date:   2003-02-27 20:50:42
From:   sdwr98
Response to: String resultString = results.stringValue(); Error CodeString resultString = results.stringValue();

I found the problem - on line 9 of your code above, you added an extra "\n" right after the word item. There should only be 2 line breaks in the string, after the word Finder and after the word desktop.


The whole string assignment line should read:


String script = "tell application \"Finder\" \n"
+ " get the name of the every item "
+ " in the desktop \n" + "end tell";



Let me know if this works for you,


Scott


1 to 1 of 1
  1. String resultString = results.stringValue(); Error CodeString resultString = results.stringValue();
    2003-03-01 00:12:32  thumbsup [View]

1 to 1 of 1