Tuesday, September 29, 2020

#1 2015-02-25 03:18:01 pm

slashdot
Member
Registered: 2003-11-13
Posts: 289

10.10 Applescript Error - Expected end of line, etc. but found ident..

This is a basic applescript for excel but I keep getting an error in 10.10.1.  This same code worked in all previous iteration of osx.

Has anything changed?  Any help would be appreciated.

Applescript:

tell application "Microsoft Excel"
   activate
   activate object worksheet "Sheet2"
end tell

Syntax Error:
Expected end of line, etc. but found identifier.

Last edited by slashdot (2015-02-25 03:21:24 pm)

Offline

 

#2 2015-02-25 03:29:17 pm

StefanK
Member
From:: St. Gallen, Switzerland
Registered: 2006-10-21
Posts: 11697
Website

Re: 10.10 Applescript Error - Expected end of line, etc. but found ident..

Hi,

according to the dictionary the parameter types of activate object are pane, sheet, window and workbook. Try

Applescript:


tell application "Microsoft Excel"
   activate
   activate object sheet "Sheet2"
end tell

Maybe Yosemite is just less tolerant


regards

Stefan

Offline

 

#3 2015-02-25 03:34:30 pm

slashdot
Member
Registered: 2003-11-13
Posts: 289

Re: 10.10 Applescript Error - Expected end of line, etc. but found ident..

actually that didn't work but this did

Applescript:

tell application "Microsoft Excel"
tell active workbook
activate object worksheet "Sheet1"
end tell
end tell

There seems to be a great deal of things broken/changed in applescript for yosemite.  A lot of my scripts are broken.

Offline

 

#4 2015-02-25 03:38:19 pm

slashdot
Member
Registered: 2003-11-13
Posts: 289

Re: 10.10 Applescript Error - Expected end of line, etc. but found ident..

thats odd it works on one computer and doesn't work on the other.

Offline

 

#5 2015-02-25 03:41:50 pm

slashdot
Member
Registered: 2003-11-13
Posts: 289

Re: 10.10 Applescript Error - Expected end of line, etc. but found ident..

Ok even more stranger. I took that script to the other computer and it worked without any issues.

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)