//
//  PowerPointMacAssistant.swift
//  masterkey
//
//  Created by Ian Kohl on 2/28/19.
//  Copyright © 2019 One Sky IT. All rights reserved.
//

import Foundation

class AcrobatAssistant: ApplicationAssistant {
//    let mirrored = false
//    let delay = 3.0
//    let automationType = "JavaScript" //JSX or AppleScript, osascript might not care therefore remove this
//    
//    let applicationName = "Microsoft PowerPoint"
//    
//    let applicationPath = "/Applications/Microsoft PowerPoint.app"
//    
//    let scriptString =
//    """
//        delay .5\nactivate application \"Adobe Reader\"\ntell application \"System Events\"\ntell process \"Adobe Reader\"\nclick menu item \"Cascade\" of menu 1 of menu bar item \"Window\" of menu bar 1\ndelay 1\nclick menu item \"Full Screen Mode\" of menu 1 of menu bar item \"View\" of menu bar 1\nend tell\nend tell\n
//
//        se.processes['Finder'].windows[0].toolbars[0].actions['AXShowMenu'].perform()
//
//
//        var se = Application('System Events')
//
//        seApp.keystroke('c', { using: 'command down' }) // Press ⌘C
//        delay(0.2)  // adjust the delay as needed
//
//        var app = Application.currentApplication()
//        app.includeStandardAdditions = true
//
//        var powerpoint = Application('Microsoft PowerPoint')
//        powerpoint.activate()
//        delay(1)
//        powerpoint.activate()
//        """
    
//    osascript -l JavaScript -e 'Application("iTunes").currentTrack.name()'
    
    override init() {
        super.init()
        
        mirrored = true
        
        shouldUnmirror = false
        
        delay = 2

        applicationName = "Adobe Acrobat Reader DC"
        
        applicationPath = "/Applications/Adobe Acrobat Reader DC.app"
        
        bundleID = "com.adobe.Reader"
        
//        tell application "Adobe Acrobat Reader DC"
//        open input -- args "pagemode=FullScreen"
//        activate
//        end tell

//        var acrobat = Application('Adobe Acrobat Reader DC')
//        
//        acrobat.activate()
//        
//        var app = Application.currentApplication()
//        app.includeStandardAdditions = true
//        
//        acrobat.activate()
//        delay(1)
//        acrobat.activate()

        scriptString = """
        delay(1)
        var se = Application('System Events')
        se.keyCode(37, { using: 'command down' })
        """
    }
}
