mirror of
https://github.com/gnustep/libs-steptalk.git
synced 2025-02-16 08:21:04 +00:00
Scripting documentation cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@16242 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
18854c5987
commit
70ab16972f
11 changed files with 144 additions and 147 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003 Mar 24
|
||||||
|
|
||||||
|
* GNUmakefile*: Removed unnecessary stuff
|
||||||
|
* Documentation: Moved relevant docs into StepTalk documentation. Removed
|
||||||
|
the directory.
|
||||||
|
|
||||||
2003 Mar 23
|
2003 Mar 23
|
||||||
|
|
||||||
* Added ScriptingMenu.gorm
|
* Added ScriptingMenu.gorm
|
||||||
|
|
|
@ -1,48 +0,0 @@
|
||||||
Application Scripting
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
Creating a scriptable application
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
1 Think of objects you want to provide for scripting.
|
|
||||||
|
|
||||||
2 Make classes available in ScriptingInfo.plist:
|
|
||||||
|
|
||||||
{
|
|
||||||
STClasses =
|
|
||||||
{
|
|
||||||
MessageComposition,
|
|
||||||
InternetAddress
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
Add this line to your makefile:
|
|
||||||
|
|
||||||
MyApp_RESOURCE_FILES = ScriptingInfo.plist
|
|
||||||
|
|
||||||
|
|
||||||
3 Include bundle loading code
|
|
||||||
|
|
||||||
Copy files from Support directory called
|
|
||||||
STScriptingSupport.h
|
|
||||||
STScriptingSupport.m
|
|
||||||
to your project and add following line to your makefile:
|
|
||||||
|
|
||||||
MyApp_OBJC_FILES += STScriptingSupport.m
|
|
||||||
|
|
||||||
4 Make scripting available to the user
|
|
||||||
|
|
||||||
#import "STScriptingSupport.h"
|
|
||||||
|
|
||||||
|
|
||||||
...
|
|
||||||
if([NSApp isScriptingSupported])
|
|
||||||
{
|
|
||||||
[menu addItemWithTitle: @"Scripting"
|
|
||||||
action: NULL
|
|
||||||
keyEquivalent: @""];
|
|
||||||
|
|
||||||
[menu setSubmenu: [NSApp scriptingMenu]
|
|
||||||
forItem: [menu itemWithTitle:@"Scripting"]];
|
|
||||||
}
|
|
||||||
...
|
|
|
@ -1,6 +0,0 @@
|
||||||
Installing AppTalk
|
|
||||||
------------------
|
|
||||||
|
|
||||||
Type:
|
|
||||||
> make
|
|
||||||
> make install
|
|
|
@ -1,57 +0,0 @@
|
||||||
Scripts
|
|
||||||
-------
|
|
||||||
|
|
||||||
Application is looking for scripts in:
|
|
||||||
|
|
||||||
- applications resource directory
|
|
||||||
ApplicationName.app/Resources/Scripts
|
|
||||||
|
|
||||||
- application specific scripts in all GNUstep Library directories
|
|
||||||
*/Library/StepTalk/Scripts/ApplicationName
|
|
||||||
|
|
||||||
- shared scriptins in all GNUstep Library directories
|
|
||||||
*/Library/StepTalk/Scripts/Shared
|
|
||||||
|
|
||||||
- resource directories of all bundles loaded by the application
|
|
||||||
BundleName.bundle/Resources/Scripts
|
|
||||||
|
|
||||||
(*) can be any of GNUstep System, Local, Network or user path
|
|
||||||
|
|
||||||
|
|
||||||
The .stinfo file
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Each script may have accopmpaining file containing information about script.
|
|
||||||
This information file is optional, has extension .stinfo and its name is script
|
|
||||||
name with that extension. For example if script name is insertDate.st then
|
|
||||||
information file is insertDate.st.stinfo. File may contain:
|
|
||||||
|
|
||||||
- script name that will be shown to the user (localizable)
|
|
||||||
- script description (localizable)
|
|
||||||
- scripting language used for script -- overrides language guess based on
|
|
||||||
file extension
|
|
||||||
|
|
||||||
The file is dictionary property list. Kes are:
|
|
||||||
|
|
||||||
Name - Name of a script that is shown to the user.
|
|
||||||
It can be localized.
|
|
||||||
Description - Description of a script. It can be localized.
|
|
||||||
Language - Scripting language name used in script. This value overrides
|
|
||||||
language guess based on script file extension.
|
|
||||||
|
|
||||||
|
|
||||||
Localizable keys have values that are dictionaries:
|
|
||||||
{
|
|
||||||
Default = {
|
|
||||||
Name = "Some name";
|
|
||||||
Description = "Some description";
|
|
||||||
};
|
|
||||||
English = {
|
|
||||||
Name = "Some name in english";
|
|
||||||
Description = "Some description in english";
|
|
||||||
};
|
|
||||||
French = {
|
|
||||||
Name = "Some name in french";
|
|
||||||
Description = "Some description in french";
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -27,13 +27,10 @@ GNUSTEP_MAKEFILES = $(GNUSTEP_SYSTEM_ROOT)/Makefiles
|
||||||
include $(GNUSTEP_MAKEFILES)/common.make
|
include $(GNUSTEP_MAKEFILES)/common.make
|
||||||
include Version
|
include Version
|
||||||
|
|
||||||
PACKAGE_NAME = ApplicationTalk
|
PACKAGE_NAME = ApplicationScripting
|
||||||
|
|
||||||
SUBPROJECTS = \
|
SUBPROJECTS = \
|
||||||
Source \
|
Source
|
||||||
# Apps \
|
|
||||||
# Tools
|
|
||||||
|
|
||||||
|
|
||||||
-include GNUMakefile.preamble
|
-include GNUMakefile.preamble
|
||||||
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
include $(GNUSTEP_MAKEFILES)/aggregate.make
|
||||||
|
|
|
@ -28,8 +28,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Things to do before compiling
|
# Things to do before compiling
|
||||||
before-all::
|
# before-all::
|
||||||
ln -sf Source/Headers .
|
|
||||||
|
|
||||||
# Things to do after compiling
|
# Things to do after compiling
|
||||||
# after-all::
|
# after-all::
|
||||||
|
|
|
@ -1,36 +1,42 @@
|
||||||
(unnamed bundle)
|
Application Scripting bundle
|
||||||
----------------
|
----------------------------
|
||||||
Ahthor: Stefan Urbanek <urbanek@host.fr>
|
Ahthor: Stefan Urbanek <urbanek@host.sk>
|
||||||
|
|
||||||
|
NOTE: this bundle wants another name and cleanup.
|
||||||
|
|
||||||
|
|
||||||
NOTE: this bundle wants name and cleanup.
|
What is Application Scripting Bundle ?
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
What is (unnamed) ?
|
Bundle that allows users to 'script' applications. In other words, for example,
|
||||||
------------------
|
users can:
|
||||||
Application scripting framework.
|
|
||||||
|
|
||||||
With AppTalk it is possible to make applications scriptable by StepTalk.
|
- extend the behaviour of application by adding their own functionality
|
||||||
|
- automate tasks in the application
|
||||||
|
- create a batch task
|
||||||
|
|
||||||
|
How to make applications scriptable is described in Documentation. It can be
|
||||||
|
done very easily in less than five minutes.
|
||||||
|
|
||||||
|
|
||||||
Where to get it?
|
Where to get it?
|
||||||
----------------
|
----------------
|
||||||
AppTalk is part of the StepTalk and you can download StepTalk from
|
|
||||||
|
|
||||||
http://steptalk.host.sk
|
Application Scripting Bundle is part of the StepTalk and you can download
|
||||||
|
it from:
|
||||||
|
|
||||||
|
http://steptalk.host.sk/download.html
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
To install AppTalk type:
|
Application Scripting Bundle is automatically installed with StepTalk. You can
|
||||||
|
install it separately by doing:
|
||||||
|
|
||||||
> make
|
> make
|
||||||
> make install
|
> make install
|
||||||
|
|
||||||
Examples
|
|
||||||
--------
|
|
||||||
|
|
||||||
Ink.app example - Modified scriptable version of Ink.app.
|
|
||||||
|
|
||||||
Feedback
|
Feedback
|
||||||
--------
|
--------
|
||||||
Any bug reports and comments are welcome at
|
Any bug reports and comments are welcome at urbanek@host.sk
|
||||||
<urbanek@host.sk>
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
Copyright (c) 2002 Stefan Urbanek
|
Copyright (c) 2002 Stefan Urbanek
|
||||||
|
|
||||||
Written by: Stefan Urbanek <stefanurbanek@yahoo.fr>
|
Written by: Stefan Urbanek <urbanek@host.sk>
|
||||||
Date: 2002 Apr 13
|
Date: 2002 Apr 13
|
||||||
|
|
||||||
This file is part of the StepTalk project.
|
This file is part of the StepTalk project.
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
Copyright (c) 2002 Stefan Urbanek
|
Copyright (c) 2002 Stefan Urbanek
|
||||||
|
|
||||||
Written by: Stefan Urbanek <stefanurbanek@yahoo.fr>
|
Written by: Stefan Urbanek <urbanek@host.sk>
|
||||||
Date: 2002 Apr 13
|
Date: 2002 Apr 13
|
||||||
|
|
||||||
This file is part of the StepTalk project.
|
This file is part of the StepTalk project.
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2003 Mar 24
|
||||||
|
|
||||||
|
* Documentation: Updated ApplicationScripting.txt
|
||||||
|
|
||||||
2003 Mar 23
|
2003 Mar 23
|
||||||
|
|
||||||
* Added ApplicationScripting
|
* Added ApplicationScripting
|
||||||
|
|
|
@ -1,19 +1,115 @@
|
||||||
Application Scripting
|
Application Scripting
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
NOTE: This is obsolete!
|
Scripting for applications is provided by the Application Scripting Bundle. The
|
||||||
|
bundle is installed together with StepTalk.
|
||||||
|
|
||||||
To make your applications scriptable, you have to make and install AppTalk
|
Content:
|
||||||
library.
|
Creating a scriptable application
|
||||||
|
Scripts
|
||||||
|
Script metafile
|
||||||
|
|
||||||
|
Creating a scriptable application
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
1 Think of objects you want to provide for scripting.
|
||||||
|
|
||||||
|
2 Make classes available in ScriptingInfo.plist:
|
||||||
|
|
||||||
|
{
|
||||||
|
STClasses =
|
||||||
|
{
|
||||||
|
MessageComposition,
|
||||||
|
InternetAddress
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
Add this line to your makefile:
|
||||||
|
|
||||||
|
MyApp_RESOURCE_FILES = ScriptingInfo.plist
|
||||||
|
|
||||||
|
|
||||||
See documents in AppTalk/Documentation where you may find more information
|
3 Include bundle loading code
|
||||||
about:
|
|
||||||
|
|
||||||
Installing AppTalk
|
Copy files:
|
||||||
Creating a scriptable application in a few minutes
|
STScriptingSupport.h
|
||||||
Scripts locations
|
STScriptingSupport.m
|
||||||
|
from ApplicationScripting/Support directory to your project and add
|
||||||
|
following line to your makefile:
|
||||||
|
|
||||||
|
MyApp_OBJC_FILES += STScriptingSupport.m
|
||||||
|
|
||||||
You may find AppTalk sources at the same place as StepTalk
|
4 Make scripting available to the user
|
||||||
|
|
||||||
http://steptalk.host.sk
|
#import "STScriptingSupport.h"
|
||||||
|
|
||||||
|
|
||||||
|
...
|
||||||
|
if([NSApp isScriptingSupported])
|
||||||
|
{
|
||||||
|
[menu addItemWithTitle: @"Scripting"
|
||||||
|
action: NULL
|
||||||
|
keyEquivalent: @""];
|
||||||
|
|
||||||
|
[menu setSubmenu: [NSApp scriptingMenu]
|
||||||
|
forItem: [menu itemWithTitle:@"Scripting"]];
|
||||||
|
}
|
||||||
|
...
|
||||||
|
|
||||||
|
Scripts
|
||||||
|
-------
|
||||||
|
|
||||||
|
Application is looking for scripts in:
|
||||||
|
|
||||||
|
- applications resource directory
|
||||||
|
ApplicationName.app/Resources/Scripts
|
||||||
|
|
||||||
|
- application specific scripts in all GNUstep Library directories
|
||||||
|
*/Library/StepTalk/Scripts/ApplicationName
|
||||||
|
|
||||||
|
- shared scriptins in all GNUstep Library directories
|
||||||
|
*/Library/StepTalk/Scripts/Shared
|
||||||
|
|
||||||
|
- resource directories of all bundles loaded by the application
|
||||||
|
BundleName.bundle/Resources/Scripts
|
||||||
|
|
||||||
|
(*) can be any of GNUstep System, Local, Network or user path
|
||||||
|
|
||||||
|
|
||||||
|
Script metafile
|
||||||
|
---------------
|
||||||
|
|
||||||
|
Each script may have accopmpaining file containing information about script.
|
||||||
|
This information file is optional, has extension .stinfo and its name is script
|
||||||
|
name with that extension. For example if script name is insertDate.st then
|
||||||
|
information file is insertDate.st.stinfo. File may contain:
|
||||||
|
|
||||||
|
- script name that will be shown to the user (localizable)
|
||||||
|
- script description (localizable)
|
||||||
|
- scripting language used for script -- overrides language guess based on
|
||||||
|
file extension
|
||||||
|
|
||||||
|
The file is dictionary property list. Kes are:
|
||||||
|
|
||||||
|
Name - Name of a script that is shown to the user.
|
||||||
|
It can be localized.
|
||||||
|
Description - Description of a script. It can be localized.
|
||||||
|
Language - Scripting language name used in script. This value overrides
|
||||||
|
language guess based on script file extension.
|
||||||
|
|
||||||
|
|
||||||
|
Localizable keys have values that are dictionaries:
|
||||||
|
{
|
||||||
|
Default = {
|
||||||
|
Name = "Some name";
|
||||||
|
Description = "Some description";
|
||||||
|
};
|
||||||
|
English = {
|
||||||
|
Name = "Some name in english";
|
||||||
|
Description = "Some description in english";
|
||||||
|
};
|
||||||
|
French = {
|
||||||
|
Name = "Some name in french";
|
||||||
|
Description = "Some description in french";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue