Longshot exposes actions that lets pro users and developers of other apps send commands to Longshot. Let’s see details ……
Invoke Longshot Command
- Start Capture: longshot://snip?func=start
- Start area screen record: longshot://record?func=start_area
- Start OCR: longshot://ocr?func=start
- Start screen rule: longshot://rule?func=start
- Shortcuts Settting: longshot://pref?page=shortcuts
Invoke Longshot Command, Longshot Operation Will Return Results to the Invoking App
Screenshot Copy:
longshot://x-callback-url/snip?func=start&channel=clipboard&type=data&x-source=SourceApp&x-success=sourceapp://x-callback-url/acceptSnip?x-source=longshot&x-error=sourceapp://x-callback-url/snipError?x-source=longshot&errorMessage=message
Where:
- SourceApp is the name of the invoking app.
- When Longshot is successfully called, it will invoke
sourceapp://x-callback-url/acceptSnip?x-source=longshot
. - When Longshot fails, it will invoke
sourceapp://x-callback-url/snipError?x-source=longshot&errorMessage=message
.
Area Screen Recording:
longshot://x-callback-url/record?func=startArea&channel=clipboard&type=filepath&x-source=SourceApp&x-success=sourceapp://x-callback-url/acceptRecord?x-source=longshot&x-error=sourceapp://x-callback-url/recordError?x-source=longshot&errorMessage=message
Where:
- SourceApp is the name of the invoking app.
- When Longshot is successfully called, it will invoke
sourceapp://x-callback-url/acceptRecord?x-source=longshot
. - When Longshot fails, it will invoke
sourceapp://x-callback-url/recordError?x-source=longshot&errorMessage=message
.
OCR Text Recognition:
longshot://x-callback-url/ocr?func=start&channel=clipboard&type=string&x-source=SourceApp&x-success=sourceapp://x-callback-url/acceptOcr?x-source=longshot&x-error=sourceapp://x-callback-url/ocrError?x-source-longshot&errorMessage=message
Where:
- SourceApp is the name of the invoking app.
- When Longshot is successfully called, it will invoke
sourceapp://x-callback-url/acceptOcr?x-source=longshot
. - When Longshot fails, it will invoke
sourceapp://x-callback-url/ocrError?x-source-longshot&errorMessage=message
.