Re: lock the screen from the keyboard, win a prize
Re: lock the screen from the keyboard, win a prize
- Subject: Re: lock the screen from the keyboard, win a prize
- From: Paul Skinner <email@hidden>
- Date: Tue, 26 Nov 2002 13:45:40 -0500
On Tuesday, November 26, 2002, at 08:07 AM, John Delacour wrote:
At 9:40 pm -0500 25/11/02, Paul Skinner wrote:
Has anyone else lost the ability to run a text selection as script
using CompileAndExecute service since they upgraded to Jaguar?
Can you give an example to show what you mean?
JD
Sure. Ed Lai released a package called Kindershell. It was basically
'do shell script' before 'do shell script' was available. With it he
released a piece of code called CompileAndExecute. It was a service
that allowed any service aware app to run text as applescript
javascript or shell script.
from the read me...
CompileAndExecuteScript is a Service that is modified from the sample
service program in the developer tools. It let you run your text
selection as AppleScript. In other words, you sort of turn any Cocoa
based text editor, such as Project builder, TextEdit, mail into a bare
bone script editor.
To install, open your home folder, then open the Library folder,
create a folder called "Services", put CompileAndExecuteScript in
there. Then log off and log on again. Launch Cocoa application like
TextEditor, type in some AppleScript command like 1+1, select it and
from the Services menu choose Run As AppleScript. Then you should get
1+1
2
It's great! In conjunction with ICeCoffEE (which is a contextual menu
plugin that put a services menu in the contextual menu) I can select
AppleScript code in a Mail.app message and execute it with one click.
No user interaction allowed, but Results are returned into the text
body following the selection. Error messages are inserted under the
erring line indicating the offending code! I could run code just before
posting and be assured that it worked as expected.
Now I seemed to have lost the ability to use that service (it was
greyed out.) as well as several others. I only assumed that the update
to Jaguar had some part in this, as I didn't test after updating.
My question is moot now. I just found that it still works, but is
available only when in an editable document. So, here in this compose
window, if I select the next line and execute it...
do shell script "cd /System/Library/ScriptingAdditions/; ls"
ColorSyncScripting.app
Digital Hub Scripting.osax
FontSyncScripting.app
Image Capture Scripting.app
Keychain Scripting.app
StandardAdditions.osax
URL Access Scripting.app
While...
do shell script "cd /System/Library/ScriptingAdditions
***** Scripting Eror *****
Expected string but found end of script.
Fun. Fast. Free.
--
Paul Skinner
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.