Repository navigation
Expand file tree
/
Copy pathSearch.sdef
More file actions
74 lines (74 loc) · 4.6 KB
/
Copy pathSearch.sdef
File metadata and controls
74 lines (74 loc) · 4.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
<dictionary title="Search Terminology">
<!-- Read-only, in Safari's words and codes: a script can ask for the address
and title of the tabs, and the names of a window's space and profile,
and nothing else. Private tabs are not listed.
count is here because "repeat with t in tabs" asks for it.
The one thing a script can set is the current profile (idea 465):
what File › Profile does. -->
<suite name="Search Suite" code="Srch" description="Windows and their tabs, to read.">
<command name="count" code="corecnte" description="Return the number of elements of a particular class within an object.">
<cocoa class="NSCountCommand"/>
<direct-parameter type="specifier" description="The objects to be counted."/>
<parameter name="each" code="kocl" type="type" optional="yes" hidden="yes" description="The class of objects to be counted.">
<cocoa key="ObjectClass"/>
</parameter>
<result type="integer" description="The count."/>
</command>
<class name="application" code="capp" description="Search.">
<cocoa class="NSApplication"/>
<element type="window" access="r">
<cocoa key="orderedWindows"/>
</element>
<element type="profile" access="r">
<cocoa key="scriptProfiles"/>
</element>
<property name="current profile" code="cPrf" access="rw" description="The profile of the window in front; missing value when its tab in front is private. Set it to a profile, or to a profile's name or id, to do what File › Profile does.">
<type type="profile"/>
<type type="text"/>
<cocoa key="scriptCurrentProfile"/>
</property>
</class>
<class name="window" code="cwin" description="A browser window, or a small window for a link.">
<cocoa class="NSWindow"/>
<!-- A tab is known as "tab N of window id …": without the id, a
tab a script kept hold of couldn't be found again. -->
<property name="id" code="ID " type="integer" access="r" description="The unique identifier of the window.">
<cocoa key="uniqueID"/>
</property>
<element type="tab" access="r">
<cocoa key="scriptTabs"/>
</element>
<property name="current tab" code="cTab" type="tab" access="r" description="The tab showing in the window; missing value when it is a private tab.">
<cocoa key="scriptCurrentTab"/>
</property>
<!-- Safari has no word for these, so the codes are Search's own:
Apple keeps the all-lowercase ones. -->
<property name="space" code="wSpc" type="text" access="r" description="The name of the space the window shows, or the space a small window's page loaded with; missing value when its tab in front is private, or that space has been deleted.">
<cocoa key="scriptSpace"/>
</property>
<property name="profile" code="wPrf" type="text" access="r" description="The name of the profile the window is in, or its space's for a small window; missing value when its tab in front is private, or a small window's space has been deleted.">
<cocoa key="scriptProfile"/>
</property>
</class>
<class name="tab" plural="tabs" code="bTab" description="A tab. Private tabs are never listed.">
<cocoa class="ScriptTab"/>
<property name="URL" code="pURL" type="text" access="r" description="The address of the page on screen in the tab.">
<cocoa key="url"/>
</property>
<property name="name" code="pnam" type="text" access="r" description="The title of the tab's page.">
<cocoa key="name"/>
</property>
</class>
<class name="profile" plural="profiles" code="Prof" description="A profile: spaces with their own sign-ins, history and bookmarks.">
<cocoa class="ScriptProfile"/>
<property name="id" code="ID " type="text" access="r" description="The profile's identifier, which stays the same when it is renamed.">
<cocoa key="uniqueID"/>
</property>
<property name="name" code="pnam" type="text" access="r" description="The profile's name.">
<cocoa key="name"/>
</property>
</class>
</suite>
</dictionary>