| 1 | n/a | """Suite Terminal Suite: Terms and Events for controlling the Terminal application |
|---|
| 2 | n/a | Level 1, version 1 |
|---|
| 3 | n/a | |
|---|
| 4 | n/a | Generated from /Applications/Utilities/Terminal.app |
|---|
| 5 | n/a | AETE/AEUT resource version 1/0, language 0, script 0 |
|---|
| 6 | n/a | """ |
|---|
| 7 | n/a | |
|---|
| 8 | n/a | import aetools |
|---|
| 9 | n/a | import MacOS |
|---|
| 10 | n/a | |
|---|
| 11 | n/a | _code = 'trmx' |
|---|
| 12 | n/a | |
|---|
| 13 | n/a | class Terminal_Suite_Events: |
|---|
| 14 | n/a | |
|---|
| 15 | n/a | def GetURL(self, _object, _attributes={}, **_arguments): |
|---|
| 16 | n/a | """GetURL: Opens a telnet: URL |
|---|
| 17 | n/a | Required argument: the object for the command |
|---|
| 18 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 19 | n/a | """ |
|---|
| 20 | n/a | _code = 'GURL' |
|---|
| 21 | n/a | _subcode = 'GURL' |
|---|
| 22 | n/a | |
|---|
| 23 | n/a | if _arguments: raise TypeError, 'No optional args expected' |
|---|
| 24 | n/a | _arguments['----'] = _object |
|---|
| 25 | n/a | |
|---|
| 26 | n/a | |
|---|
| 27 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 28 | n/a | _arguments, _attributes) |
|---|
| 29 | n/a | if _arguments.get('errn', 0): |
|---|
| 30 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 31 | n/a | # XXXX Optionally decode result |
|---|
| 32 | n/a | if _arguments.has_key('----'): |
|---|
| 33 | n/a | return _arguments['----'] |
|---|
| 34 | n/a | |
|---|
| 35 | n/a | _argmap_do_script = { |
|---|
| 36 | n/a | 'in_' : 'kfil', |
|---|
| 37 | n/a | 'with_command' : 'cmnd', |
|---|
| 38 | n/a | } |
|---|
| 39 | n/a | |
|---|
| 40 | n/a | def do_script(self, _object, _attributes={}, **_arguments): |
|---|
| 41 | n/a | """do script: Run a UNIX shell script or command |
|---|
| 42 | n/a | Required argument: the object for the command |
|---|
| 43 | n/a | Keyword argument in_: the window in which to execute the command |
|---|
| 44 | n/a | Keyword argument with_command: data to be passed to the Terminal application as the command line, deprecated, use direct parameter |
|---|
| 45 | n/a | Keyword argument _attributes: AppleEvent attribute dictionary |
|---|
| 46 | n/a | Returns: the reply for the command |
|---|
| 47 | n/a | """ |
|---|
| 48 | n/a | _code = 'core' |
|---|
| 49 | n/a | _subcode = 'dosc' |
|---|
| 50 | n/a | |
|---|
| 51 | n/a | aetools.keysubst(_arguments, self._argmap_do_script) |
|---|
| 52 | n/a | _arguments['----'] = _object |
|---|
| 53 | n/a | |
|---|
| 54 | n/a | |
|---|
| 55 | n/a | _reply, _arguments, _attributes = self.send(_code, _subcode, |
|---|
| 56 | n/a | _arguments, _attributes) |
|---|
| 57 | n/a | if _arguments.get('errn', 0): |
|---|
| 58 | n/a | raise aetools.Error, aetools.decodeerror(_arguments) |
|---|
| 59 | n/a | # XXXX Optionally decode result |
|---|
| 60 | n/a | if _arguments.has_key('----'): |
|---|
| 61 | n/a | return _arguments['----'] |
|---|
| 62 | n/a | |
|---|
| 63 | n/a | |
|---|
| 64 | n/a | class application(aetools.ComponentItem): |
|---|
| 65 | n/a | """application - The Terminal program """ |
|---|
| 66 | n/a | want = 'capp' |
|---|
| 67 | n/a | class _Prop__3c_Inheritance_3e_(aetools.NProperty): |
|---|
| 68 | n/a | """<Inheritance> - All of the properties of the superclass. """ |
|---|
| 69 | n/a | which = 'c@#^' |
|---|
| 70 | n/a | want = 'capp' |
|---|
| 71 | n/a | _3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_() |
|---|
| 72 | n/a | class _Prop_properties(aetools.NProperty): |
|---|
| 73 | n/a | """properties - every property of the Terminal program """ |
|---|
| 74 | n/a | which = 'pALL' |
|---|
| 75 | n/a | want = '****' |
|---|
| 76 | n/a | properties = _Prop_properties() |
|---|
| 77 | n/a | # element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID '] |
|---|
| 78 | n/a | # element 'docu' as ['name', 'indx', 'rele', 'rang', 'test'] |
|---|
| 79 | n/a | |
|---|
| 80 | n/a | applications = application |
|---|
| 81 | n/a | |
|---|
| 82 | n/a | class window(aetools.ComponentItem): |
|---|
| 83 | n/a | """window - A Terminal window """ |
|---|
| 84 | n/a | want = 'cwin' |
|---|
| 85 | n/a | class _Prop_background_color(aetools.NProperty): |
|---|
| 86 | n/a | """background color - the background color for the window """ |
|---|
| 87 | n/a | which = 'pbcl' |
|---|
| 88 | n/a | want = '****' |
|---|
| 89 | n/a | class _Prop_bold_text_color(aetools.NProperty): |
|---|
| 90 | n/a | """bold text color - the bold text color for the window """ |
|---|
| 91 | n/a | which = 'pbtc' |
|---|
| 92 | n/a | want = '****' |
|---|
| 93 | n/a | class _Prop_bounds(aetools.NProperty): |
|---|
| 94 | n/a | """bounds - the boundary rectangle for the window, relative to the upper left corner of the screen """ |
|---|
| 95 | n/a | which = 'pbnd' |
|---|
| 96 | n/a | want = '****' |
|---|
| 97 | n/a | class _Prop_busy(aetools.NProperty): |
|---|
| 98 | n/a | """busy - Is the window busy running a process? """ |
|---|
| 99 | n/a | which = 'busy' |
|---|
| 100 | n/a | want = 'bool' |
|---|
| 101 | n/a | class _Prop_contents(aetools.NProperty): |
|---|
| 102 | n/a | """contents - the currently visible contents of the window """ |
|---|
| 103 | n/a | which = 'pcnt' |
|---|
| 104 | n/a | want = 'utxt' |
|---|
| 105 | n/a | class _Prop_cursor_color(aetools.NProperty): |
|---|
| 106 | n/a | """cursor color - the cursor color for the window """ |
|---|
| 107 | n/a | which = 'pcuc' |
|---|
| 108 | n/a | want = '****' |
|---|
| 109 | n/a | class _Prop_custom_title(aetools.NProperty): |
|---|
| 110 | n/a | """custom title - the custom title for the window """ |
|---|
| 111 | n/a | which = 'titl' |
|---|
| 112 | n/a | want = 'utxt' |
|---|
| 113 | n/a | class _Prop_frame(aetools.NProperty): |
|---|
| 114 | n/a | """frame - the origin and size of the window """ |
|---|
| 115 | n/a | which = 'pfra' |
|---|
| 116 | n/a | want = '****' |
|---|
| 117 | n/a | class _Prop_frontmost(aetools.NProperty): |
|---|
| 118 | n/a | """frontmost - Is the window in front of the other Terminal windows? """ |
|---|
| 119 | n/a | which = 'pisf' |
|---|
| 120 | n/a | want = 'bool' |
|---|
| 121 | n/a | class _Prop_history(aetools.NProperty): |
|---|
| 122 | n/a | """history - the contents of the entire scrolling buffer of the window """ |
|---|
| 123 | n/a | which = 'hist' |
|---|
| 124 | n/a | want = 'utxt' |
|---|
| 125 | n/a | class _Prop_normal_text_color(aetools.NProperty): |
|---|
| 126 | n/a | """normal text color - the normal text color for the window """ |
|---|
| 127 | n/a | which = 'ptxc' |
|---|
| 128 | n/a | want = '****' |
|---|
| 129 | n/a | class _Prop_number_of_columns(aetools.NProperty): |
|---|
| 130 | n/a | """number of columns - the number of columns in the window """ |
|---|
| 131 | n/a | which = 'ccol' |
|---|
| 132 | n/a | want = 'long' |
|---|
| 133 | n/a | class _Prop_number_of_rows(aetools.NProperty): |
|---|
| 134 | n/a | """number of rows - the number of rows in the window """ |
|---|
| 135 | n/a | which = 'crow' |
|---|
| 136 | n/a | want = 'long' |
|---|
| 137 | n/a | class _Prop_origin(aetools.NProperty): |
|---|
| 138 | n/a | """origin - the lower left coordinates of the window, relative to the lower left corner of the screen """ |
|---|
| 139 | n/a | which = 'pori' |
|---|
| 140 | n/a | want = '****' |
|---|
| 141 | n/a | class _Prop_position(aetools.NProperty): |
|---|
| 142 | n/a | """position - the upper left coordinates of the window, relative to the upper left corner of the screen """ |
|---|
| 143 | n/a | which = 'ppos' |
|---|
| 144 | n/a | want = '****' |
|---|
| 145 | n/a | class _Prop_processes(aetools.NProperty): |
|---|
| 146 | n/a | """processes - a list of the currently running processes """ |
|---|
| 147 | n/a | which = 'prcs' |
|---|
| 148 | n/a | want = 'utxt' |
|---|
| 149 | n/a | class _Prop_size(aetools.NProperty): |
|---|
| 150 | n/a | """size - the width and height of the window """ |
|---|
| 151 | n/a | which = 'psiz' |
|---|
| 152 | n/a | want = '****' |
|---|
| 153 | n/a | class _Prop_title_displays_custom_title(aetools.NProperty): |
|---|
| 154 | n/a | """title displays custom title - Does the title for the window contain a custom title? """ |
|---|
| 155 | n/a | which = 'tdct' |
|---|
| 156 | n/a | want = 'bool' |
|---|
| 157 | n/a | class _Prop_title_displays_device_name(aetools.NProperty): |
|---|
| 158 | n/a | """title displays device name - Does the title for the window contain the device name? """ |
|---|
| 159 | n/a | which = 'tddn' |
|---|
| 160 | n/a | want = 'bool' |
|---|
| 161 | n/a | class _Prop_title_displays_file_name(aetools.NProperty): |
|---|
| 162 | n/a | """title displays file name - Does the title for the window contain the file name? """ |
|---|
| 163 | n/a | which = 'tdfn' |
|---|
| 164 | n/a | want = 'bool' |
|---|
| 165 | n/a | class _Prop_title_displays_shell_path(aetools.NProperty): |
|---|
| 166 | n/a | """title displays shell path - Does the title for the window contain the shell path? """ |
|---|
| 167 | n/a | which = 'tdsp' |
|---|
| 168 | n/a | want = 'bool' |
|---|
| 169 | n/a | class _Prop_title_displays_window_size(aetools.NProperty): |
|---|
| 170 | n/a | """title displays window size - Does the title for the window contain the window size? """ |
|---|
| 171 | n/a | which = 'tdws' |
|---|
| 172 | n/a | want = 'bool' |
|---|
| 173 | n/a | |
|---|
| 174 | n/a | windows = window |
|---|
| 175 | n/a | application._superclassnames = [] |
|---|
| 176 | n/a | import Standard_Suite |
|---|
| 177 | n/a | application._privpropdict = { |
|---|
| 178 | n/a | '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, |
|---|
| 179 | n/a | 'properties' : _Prop_properties, |
|---|
| 180 | n/a | } |
|---|
| 181 | n/a | application._privelemdict = { |
|---|
| 182 | n/a | 'document' : Standard_Suite.document, |
|---|
| 183 | n/a | 'window' : window, |
|---|
| 184 | n/a | } |
|---|
| 185 | n/a | window._superclassnames = [] |
|---|
| 186 | n/a | window._privpropdict = { |
|---|
| 187 | n/a | '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_, |
|---|
| 188 | n/a | 'background_color' : _Prop_background_color, |
|---|
| 189 | n/a | 'bold_text_color' : _Prop_bold_text_color, |
|---|
| 190 | n/a | 'bounds' : _Prop_bounds, |
|---|
| 191 | n/a | 'busy' : _Prop_busy, |
|---|
| 192 | n/a | 'contents' : _Prop_contents, |
|---|
| 193 | n/a | 'cursor_color' : _Prop_cursor_color, |
|---|
| 194 | n/a | 'custom_title' : _Prop_custom_title, |
|---|
| 195 | n/a | 'frame' : _Prop_frame, |
|---|
| 196 | n/a | 'frontmost' : _Prop_frontmost, |
|---|
| 197 | n/a | 'history' : _Prop_history, |
|---|
| 198 | n/a | 'normal_text_color' : _Prop_normal_text_color, |
|---|
| 199 | n/a | 'number_of_columns' : _Prop_number_of_columns, |
|---|
| 200 | n/a | 'number_of_rows' : _Prop_number_of_rows, |
|---|
| 201 | n/a | 'origin' : _Prop_origin, |
|---|
| 202 | n/a | 'position' : _Prop_position, |
|---|
| 203 | n/a | 'processes' : _Prop_processes, |
|---|
| 204 | n/a | 'properties' : _Prop_properties, |
|---|
| 205 | n/a | 'size' : _Prop_size, |
|---|
| 206 | n/a | 'title_displays_custom_title' : _Prop_title_displays_custom_title, |
|---|
| 207 | n/a | 'title_displays_device_name' : _Prop_title_displays_device_name, |
|---|
| 208 | n/a | 'title_displays_file_name' : _Prop_title_displays_file_name, |
|---|
| 209 | n/a | 'title_displays_shell_path' : _Prop_title_displays_shell_path, |
|---|
| 210 | n/a | 'title_displays_window_size' : _Prop_title_displays_window_size, |
|---|
| 211 | n/a | } |
|---|
| 212 | n/a | window._privelemdict = { |
|---|
| 213 | n/a | } |
|---|
| 214 | n/a | |
|---|
| 215 | n/a | # |
|---|
| 216 | n/a | # Indices of types declared in this module |
|---|
| 217 | n/a | # |
|---|
| 218 | n/a | _classdeclarations = { |
|---|
| 219 | n/a | 'capp' : application, |
|---|
| 220 | n/a | 'cwin' : window, |
|---|
| 221 | n/a | } |
|---|
| 222 | n/a | |
|---|
| 223 | n/a | _propdeclarations = { |
|---|
| 224 | n/a | 'busy' : _Prop_busy, |
|---|
| 225 | n/a | 'c@#^' : _Prop__3c_Inheritance_3e_, |
|---|
| 226 | n/a | 'ccol' : _Prop_number_of_columns, |
|---|
| 227 | n/a | 'crow' : _Prop_number_of_rows, |
|---|
| 228 | n/a | 'hist' : _Prop_history, |
|---|
| 229 | n/a | 'pALL' : _Prop_properties, |
|---|
| 230 | n/a | 'pbcl' : _Prop_background_color, |
|---|
| 231 | n/a | 'pbnd' : _Prop_bounds, |
|---|
| 232 | n/a | 'pbtc' : _Prop_bold_text_color, |
|---|
| 233 | n/a | 'pcnt' : _Prop_contents, |
|---|
| 234 | n/a | 'pcuc' : _Prop_cursor_color, |
|---|
| 235 | n/a | 'pfra' : _Prop_frame, |
|---|
| 236 | n/a | 'pisf' : _Prop_frontmost, |
|---|
| 237 | n/a | 'pori' : _Prop_origin, |
|---|
| 238 | n/a | 'ppos' : _Prop_position, |
|---|
| 239 | n/a | 'prcs' : _Prop_processes, |
|---|
| 240 | n/a | 'psiz' : _Prop_size, |
|---|
| 241 | n/a | 'ptxc' : _Prop_normal_text_color, |
|---|
| 242 | n/a | 'tdct' : _Prop_title_displays_custom_title, |
|---|
| 243 | n/a | 'tddn' : _Prop_title_displays_device_name, |
|---|
| 244 | n/a | 'tdfn' : _Prop_title_displays_file_name, |
|---|
| 245 | n/a | 'tdsp' : _Prop_title_displays_shell_path, |
|---|
| 246 | n/a | 'tdws' : _Prop_title_displays_window_size, |
|---|
| 247 | n/a | 'titl' : _Prop_custom_title, |
|---|
| 248 | n/a | } |
|---|
| 249 | n/a | |
|---|
| 250 | n/a | _compdeclarations = { |
|---|
| 251 | n/a | } |
|---|
| 252 | n/a | |
|---|
| 253 | n/a | _enumdeclarations = { |
|---|
| 254 | n/a | } |
|---|