Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 16, 2013, 07:54 PM   #1
Terminal Frost
macrumors newbie
 
Join Date: Jan 2013
Applescript trouble - testing against Label Index

I'm at my wits end trying to do something that seems rather simple. Over and over in examples throughout many forums, I've seen examples of the below code used:

Code:
set theFile to "path" as alias
if label index of theFile is 0 then
It seems obvious to me that this would be the correct syntax, but particularly maddening is the fact that this syntax appears to work for everyone else except me! But every time, the editor highlights "index" and returns

Code:
Expected “then”, etc. but found property.
The interpreter appears to be confused by the fact that the 'label index' property has two words. Are all the examples I'm reading old? The machine has Lion installed.

Help me, obi wans kenobi. You guys are my only hope.
Terminal Frost is offline   1 Reply With Quote
Old Jan 16, 2013, 08:09 PM   #2
Red Menace
macrumors 6502
 
Join Date: May 2011
Location: Littleton, Colorado, USA
The label index is a Finder term, and needs to be in a Finder tell statement.
__________________
MacBook Pro / OS X Mavericks (10.9.4) / Xcode 5.1.1 / RubyMotion FTW
Red Menace is offline   0 Reply With Quote
Old Jan 16, 2013, 08:28 PM   #3
Terminal Frost
Thread Starter
macrumors newbie
 
Join Date: Jan 2013
Pardon me while I kill myself.
Terminal Frost is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Applescript If exists trouble, please help cjaneway Mac Programming 1 Apr 24, 2014 02:35 PM
AppleScript: How do I save multiple Excel sheets to one pdf using Applescript sbtaylor1 Mac Programming 0 Oct 28, 2013 11:38 PM
Applescript trouble with setting default location to choose file TexasStation Mac Programming 2 Sep 4, 2013 01:35 PM
Having trouble with applescript! LBoy3550 Mac Programming 2 Mar 5, 2013 03:54 PM
Resolved: Applescript: Launching self-contained app trouble 1theo0 Mac Programming 2 Oct 15, 2012 09:04 AM

Forum Jump

All times are GMT -5. The time now is 01:35 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC