Applescript Stopped Working

M

MC

Word 08 on a MacBook OS 10.5.6

I have two Applescripts I rely on. One of them works, but the other has
stopped working.

I can¹t invoke it from the Menu, nor from the keystroke I assigned.

Any ideas?
 
M

MC

MC said:
Word 08 on a MacBook OS 10.5.6

I have two Applescripts I rely on. One of them works, but the other has
stopped working.

I can¹t invoke it from the Menu, nor from the keystroke I assigned.

Any ideas?

By the way, the script in question is to paste text to match the
formatting of the current text.

I went into Script Editor and this is it:

tell application "Microsoft Word"
tell selection
set theClip to string of (the clipboard as record)
set newPoint to (selection start + (length of theClip))
set content of text object to theClip
set selection start to newPoint
set selection end to newPoint
end tell
end tell

___

I tried to Run it in the editor and got the following error message:

"Can't make missing value into type number"

Which might as well be in Esperanto to me!

All I can say is, it has worked just fine for over a year, and now it
doesn't.
 
J

JE McGimpsey

MC said:
By the way, the script in question is to paste text to match the
formatting of the current text.

I went into Script Editor and this is it:

tell application "Microsoft Word"
tell selection
set theClip to string of (the clipboard as record)
set newPoint to (selection start + (length of theClip))
set content of text object to theClip
set selection start to newPoint
set selection end to newPoint
end tell
end tell

___

I tried to Run it in the editor and got the following error message:

"Can't make missing value into type number"

Which might as well be in Esperanto to me!

All I can say is, it has worked just fine for over a year, and now it
doesn't.

What's in the clipboard?

It runs fine for me.
 
M

MC

JE McGimpsey said:
What's in the clipboard?

Doesn't seem to matter.

However... I have just installed an app called "Pasteboard" that allows
you to have mutliple clipboards. I wonder if that's confusing it...
 
J

JE McGimpsey

MC said:
Doesn't seem to matter.

However... I have just installed an app called "Pasteboard" that allows
you to have mutliple clipboards. I wonder if that's confusing it...

Wouldn't be at all surprised.
 
M

MC

JE McGimpsey said:
Wouldn't be at all surprised.

I've disabled it but I still have the problem and I still get the error
message.

Could someone kindly repost the script in case it's become corrupted or
altered in some way?
 
J

JE McGimpsey

MC said:
Could someone kindly repost the script in case it's become corrupted or
altered in some way?

Here it is:

tell application "Microsoft Word"
tell selection
set theClip to string of (the clipboard as record)
set newPoint to (selection start + (length of theClip))
set content of text object to theClip
set selection start to newPoint
set selection end to newPoint
end tell
end tell


HOWEVER, since you're using MT-Newswatcher, you should just be able to
choose Edit/Show Details, where in the headers you'll see something like

References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>

Which is a list of links to all the messages in this thread. Those links
should be live: CMD-click on one of them and you can retrieve any of the
previous messages in the thread, as long as they're still on your news
server (and if they're not, you can always connect to the
news.microsoft.com server directly - Special/News Servers.../New -
generally the messages stick around for a couple of months).
 
M

MC

JE McGimpsey said:
Here it is:

tell application "Microsoft Word"
tell selection
set theClip to string of (the clipboard as record)
set newPoint to (selection start + (length of theClip))
set content of text object to theClip
set selection start to newPoint
set selection end to newPoint
end tell
end tell


HOWEVER, since you're using MT-Newswatcher, you should just be able to
choose Edit/Show Details, where in the headers you'll see something like

References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>

Which is a list of links to all the messages in this thread. Those links
should be live: CMD-click on one of them and you can retrieve any of the
previous messages in the thread, as long as they're still on your news
server (and if they're not, you can always connect to the
news.microsoft.com server directly - Special/News Servers.../New -
generally the messages stick around for a couple of months).

Many thanks.
 
M

MC

JE McGimpsey said:
Here it is:

tell application "Microsoft Word"
tell selection
set theClip to string of (the clipboard as record)
set newPoint to (selection start + (length of theClip))
set content of text object to theClip
set selection start to newPoint
set selection end to newPoint
end tell
end tell


HOWEVER, since you're using MT-Newswatcher, you should just be able to
choose Edit/Show Details, where in the headers you'll see something like

References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>

Which is a list of links to all the messages in this thread. Those links
should be live: CMD-click on one of them and you can retrieve any of the
previous messages in the thread, as long as they're still on your news
server (and if they're not, you can always connect to the
news.microsoft.com server directly - Special/News Servers.../New -
generally the messages stick around for a couple of months).

I've disabled Pasteboard.

I've copied and pasted the script above, and it shows up in Word under
the menu -- but it doesn't work.

Hmmm.....

Could someone point me in the right direction to delete the script I
have and start again from scratch? Step by step, please. I am brain dead
when it comes to Applescript!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top