Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.6l

Application v 6.6b

  

 

Chapter Fifteen — Windows/OS Functions (continued)

ClipboardGetApplication Function

Overview

The ClipboardGetApplication function retrieves the source application name, if available, for the application that last posted information to the clipboard.

Syntax/Parameters

Syntax

string = ClipboardGetApplication ( [handle hClipboard] );

Parameters

hClipboard

An optional handle specifying an open Clipboard Object. If not specified, or specified as NULL_HANDLE, if a Clipboard Object is open, it is automatically selected, and, if no object is open, a new object is opened and then closed upon completion of the function.

Return Value

Returns a string that contains a descriptive name of the source application or an empty string on error. An application code is also placed in the last error buffer. Use the GetLastError function to retrieve the application code or a formatted error code.

Remarks

The application name is an arbitrary string that is created by the host application after it examines the formats posted on the clipboard. This is used as a pattern signature to resolve certain common applications. If the application name cannot be determined, the executable name is added to the ‘Unknown Source (program.exe)’ string.

The application codes are defined in the SDK file LegatoDefault.h and are as follows:

  Definition   Bitwise   Comment/Description  
  Format        
    CBA_UNKNOWN_APPLICATION   0x00000000   Unknown Application Flag  
    CBA_KNOWN_APPLICATION   0x10000000   Known Application Flag  
    CBA_SPREADSHEET   0x00008000   Application is a Spreadsheet  
  Masks        
    CBA_VENDOR_MASK   0x00FF0000   Vendor Mask  
    CBA_PRODUCT_MASK   0x00007F00   Product Mask  
    CBA_VERSION_MASK   0x000000FF   Version Mask (Major/Minor) 00-unk  
  Combination Masks        
    CBA_TYPE_MASK   0x10FF0000   Type (Known and Vendor Mask)  
    CBA_APPLICATION_MASK   0x10FF7F00   Application (Known, Vendor, App Mask)  
  Local Application        
    CBA_TYPE_APPLICATION   0x10000000   Local Application  
    CBA_GOFILER       + 0x0100   GoFiler Family  
    CBA_LEGATO_IDE       + 0x0200   Legato IDE  
    CBA_PAGEPRIME       + 0x0300   PagePrime  
    CBA_PRIMEPAD       + 0x0400   PrimePad  
  Adobe        
    CBA_TYPE_ADOBE   0x10010000   Adobe  
    CBA_ACROBAT       + 0x0100   Acrobat  
    CBA_FIREWORKS       + 0x0200   Fireworks  
    CBA_PAGEMAKER       + 0x0300   PageMaker  
    CBA_INDESIGN       + 0x0400   InDesign  
  Delta Graph        
    CBA_TYPE_DELTAGRAPH   0x10020000   Delta Graph  
    CBA_DELTAGRAPH       + 0x0100   Delta Graph  
  Google        
    CBA_TYPE_GOOGLE   0x10030000   Google  
    CBA_CHROME       + 0x0100   Firefox  
  Microsoft        
    CBA_TYPE_MICROSOFT   0x10040000   Microsoft Applications w/ Window  
  Windows Low Level          
    CBA_EXPLORER       + 0x0100   Explorer  
    CBA_METRO_APP       + 0x0200   Windows Metro App (Generic Fallback)  
    CBA_NOTEPAD       + 0x0300   Notepad  
    CBA_RDP_SESSION       + 0x0400   Remote Desktop Session  
  General Applications          
    CBA_EDGE       + 0x1200   Edge Browser  
    CBA_INTERNET_EXPLORER       + 0x1400   Internet Explorer  
    CBA_ONE_NOTE       + 0x1600   One Note  
    CBA_OUTLOOK       + 0x1800   Outlook  
    CBA_PAINT       + 0x1A00   Paint  
    CBA_PHOTOEDITOR       + 0x1C00   Photo Editor  
    CBA_VISUAL_STUDIO       + 0x1E00   Visual Studio  
    CBA_WEB_VIEW       + 0x2000   MS Web View (Blink/Edge)  
    CBA_WORDPAD       + 0x2200   WordPad  
    CBA_WORKS_SPREADSHEET       + 0x2400   Works SpreadSheet  
    CBA_WORKS_WORD_PROCESSOR       + 0x2600   Works Word Processor  
  Office          
    CBA_EXCEL       + 0x3200   Excel  
    CBA_POWERPOINT       + 0x3400   Power Point  
    CBA_VISIO       + 0x3600   Visio  
    CBA_WORD       + 0x3800   Word  
  Mozilla        
    CBA_TYPE_MOZILLA   0x10050000   Mozilla  
    CBA_FIREFOX       + 0x0100   Firefox  
    CBA_THUNDERBIRD       + 0x0500   Thunderbird  
  Opera        
    CBA_TYPE_OPERA   0x10060000   Opera Group  
    CBA_OPERA       + 0x0100   Opera Browser  
  Quark        
    CBA_TYPE_QUARK   0x10070000   QuarkXpress  
    CBA_QUARKXPRESS       + 0x0100   QuarkXpress  
  AI          
    CBA_TYPE_AI   0x10080000   AI Platforms  
    CBA_COPILOT       + 0x0100   Copilot  
    CBA_CLAUDE       + 0x0180   Claude  
  Other          
    CBA_TYPE_OTHER   0x100F0000   Other Applications  
  Browsers          
    CBA_BRAVE       + 0x0200   Brave  

 

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic

Page revised 2026-11-16