Method

# GetStringComparisonObjectDescriptor

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

## Description

Returns the `AppleEventObjectSpecifier</api/macos/appleeventobjectspecifier>` that matches the string comparison passed.

## Usage

``` xojo
result = GetStringComparisonObjectDescriptor(comparisonKey, comparisonForm, field, value)
```

| Part           | Type                                                              | Description                                                                                                                  |
|----------------|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
| result         | `AppleEventObjectSpecifier</api/macos/appleeventobjectspecifier>` | The object that was found.                                                                                                   |
| comparisonKey  | `String</api/data_types/string>`                                  | The type of comparison to be performed. This string must be four characters in length.                                       |
| comparisonForm | `String</api/data_types/string>`                                  | The form of the comparison. For example, "prop" indicates that the comparison will be checking a property.                   |
| field          | `String</api/data_types/string>`                                  | The field the comparison will be performed on. The ComparisonForm parameter controls how the field parameter is interpreted. |
| value          | `String</api/data_types/string>`                                  | The value that the comparison will be performed against.                                                                     |

## Notes

Valid comparison keys are:

| Comparison Key | Description              |
|----------------|--------------------------|
| =              | Equals                   |
| \>             | Greater than             |
| \>=            | Greater than or equal to |
| \<             | Less than                |
| \<=            | Less than or equal to    |

Comparison keys must be four characters. You must include spaces after the characters in the comparison key so that the string passed is four characters in length.

## Compatibility

|                       |         |
|-----------------------|---------|
| **Project Types**     | Desktop |
| **Operating Systems** | macOS   |

<div class="seealso">

`AppleEvent</api/macos/appleevent>` class, `GetIndexedObjectDescriptor</api/macos/getindexedobjectdescriptor>`, `GetNamedObjectDescriptor</api/macos/getnamedobjectdescriptor>`, `GetOrdinalObjectDescriptor</api/macos/getordinalobjectdescriptor>`, `GetPropertyObjectDescriptor</api/macos/getpropertyobjectdescriptor>`, `GetRangeObjectDescriptor</api/macos/getrangeobjectdescriptor>`, `GetTestObjectDescriptor</api/macos/gettestobjectdescriptor>` functions.

</div>
