//
//  LibreOfficeAssistant.swift
//  masterkey
//
//  Created by Ian Kohl on 4/7/19.
//  Copyright © 2019 One Sky IT. All rights reserved.
//

import Foundation

class LibreOfficeAssistant: ApplicationAssistant {
    override init() {
        super.init()
        
        mirrored = false
        shouldUnmirror = true
        
        delay = 2

        applicationName = "LibreOffice"
        
        applicationPath = "/Applications/LibreOffice.app"
        
        bundleID = "org.libreoffice.script"
        
        scriptString = """
        delay(1)
        var lo = Application('LibreOffice')
        
        lo.activate()
        
        var app = Application.currentApplication()
        app.includeStandardAdditions = true
        
        lo.activate()
        delay(1)
        lo.activate()
        
        var se = Application('System Events')
        se.keyCode(96)
        """
    }
}
