Hi,
I use Xcode for Applescript the first time. I have pasted the code, which works fine in the Apple script editor, into xcode (3.2) and ran it, but it states the mentioned message: File…wasn´t found (-43)
set sc_folder to ":Library:Application Support:Native Instruments:Service Center" as alias
a common mistake: HFS paths start always with a disk name,
a leading colon is never a replacement for the startup volume like a leading slash in POSIX paths.
It’s not necessary to specify the startup volume, just use a relative path
set sc_folder to (path to application support folder as text) & "Native Instruments:Service Center" as alias
It unfortunately still doesnt work. I have tried this:
set sc_folder to ((path to startup disk) as Unicode text) & ":Library:Application Support:Native Instruments:Service Center" as alias
Again it works fine in AppleScript Editor, but not in xcode.
This one doesn´t work also:
display dialog "Enter admin password:" default answer "" with hidden answer
set admin_pass to text returned of result
Xcode spits out a fatal error, but it doesn´t give me an exact error or something like the events and results in the Editor. It´s the second line coursing the trouble. I had to find this out by trial and error.
The only reason for me to use xcode is a progress bar. I also like the used admin pass prompt with the inclided icons…
Do you have a hint for general xcode vs. editor issues to port code from the editor?
I wonder it states “file”, as it is a folder. Might be a hint?!
I know, I don´t write anything. I have to read out a lot of plist files and list and analyse other existing directories. It´s a diagnostic tool I´m scripting. It´s already working fine in the editor, only: there is no progress bar and it takes pretty long, so I need one too keep users calm…