2

I have been using the following script in Keyboard Maestro to promote/demote paras in Word (for various reasons it works better than a straight custom-keyboard shortcut).

tell application "Microsoft Word"
    outline demote (paragraphs of selection)
end tell

(The parallel script uses outline promote.)

This was working fine for ages, including in the weeks since I upgraded to Mavericks.

Now, however, it fails, with an "Expected end of line but found identifier" error, with demote highlighted in ASE.

Deduplicator
  • 44,692
  • 7
  • 66
  • 118
kikujiro
  • 21
  • 1
  • It seems to work in both ASE and Script Debugger in Mavericks. Have you tried copying and pasting from the code above into ASE and running it from there? – adayzdone Nov 22 '13 at 14:58
  • Thanks – yes, I have tried that, and it's producing the same error (highlighting "demote"). I'm not a heavy AppleScript user; could another dictionary be interfering, or something? – kikujiro Nov 25 '13 at 11:40

1 Answers1

0

For the time being at least I seem to have fixed the problem by changing the first line from

tell application "Microsoft Word"

to

tell application "Word"

When run for the first time in either ASE or Keyboard Maestro, this script acquires syntax highlighting, "Word" is automatically switched back to "Microsoft Word", and from then on (so far) it works.

If anybody can explain to me why that fixed it I would be very grateful.

kikujiro
  • 21
  • 1