diff --git a/AE_app_native_Electron_2026-04-20.tar.gz b/AE_app_native_Electron_2026-04-20.tar.gz new file mode 100644 index 0000000..855122d Binary files /dev/null and b/AE_app_native_Electron_2026-04-20.tar.gz differ diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22.zip b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22.zip new file mode 100644 index 0000000..960a967 Binary files /dev/null and b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22.zip differ diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/.gitignore b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/README.md b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/README.md new file mode 100644 index 0000000..e69de29 diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.pbxproj b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.pbxproj new file mode 100644 index 0000000..74279c3 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.pbxproj @@ -0,0 +1,567 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 3C278DA7225CF5C6004FFC53 /* masterkey.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3C41339F2227E09B0041136E /* masterkey.app */; }; + 3C39A72F2267ABA90061367B /* WordMacAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C39A72E2267ABA90061367B /* WordMacAssistant.swift */; }; + 3C39A7312267ACCF0061367B /* AcrobatWindowsAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C39A7302267ACCF0061367B /* AcrobatWindowsAssistant.swift */; }; + 3C39A7332267ACF60061367B /* Windows Application Names in Resources */ = {isa = PBXBuildFile; fileRef = 3C39A7322267ACF60061367B /* Windows Application Names */; }; + 3C39A7352267AF040061367B /* WindowsVideoAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C39A7342267AF040061367B /* WindowsVideoAssistant.swift */; }; + 3C39A739226A347A0061367B /* ExcelAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C39A738226A347A0061367B /* ExcelAssistant.swift */; }; + 3C4133A32227E09B0041136E /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4133A22227E09B0041136E /* AppDelegate.swift */; }; + 3C4133A52227E09F0041136E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 3C4133A42227E09F0041136E /* Assets.xcassets */; }; + 3C4133A82227E09F0041136E /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3C4133A62227E09F0041136E /* MainMenu.xib */; }; + 3C4133B42227E09F0041136E /* masterkeyTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4133B32227E09F0041136E /* masterkeyTests.swift */; }; + 3C4133C02227E1B70041136E /* PowerPointMacAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4133BF2227E1B70041136E /* PowerPointMacAssistant.swift */; }; + 3C4133C22227E1C90041136E /* PowerPointWindowsAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4133C12227E1C90041136E /* PowerPointWindowsAssistant.swift */; }; + 3C4133C42227E1D60041136E /* KeynoteAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4133C32227E1D60041136E /* KeynoteAssistant.swift */; }; + 3C4133C62227E1E50041136E /* LegacyKeynoteAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4133C52227E1E40041136E /* LegacyKeynoteAssistant.swift */; }; + 3C4133C82227E2010041136E /* AcrobatAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4133C72227E2010041136E /* AcrobatAssistant.swift */; }; + 3C4133CA2227E2960041136E /* ApplicationAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C4133C92227E2960041136E /* ApplicationAssistant.swift */; }; + 3C88C06A225DADDD0048E01A /* VideoAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3C88C069225DADDD0048E01A /* VideoAssistant.swift */; }; + 3CE21AD62259B3EE00F666B9 /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE21AD52259B3EE00F666B9 /* Utilities.swift */; }; + 3CE21AD92259B4A000F666B9 /* LegacyUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CE21AD82259B4A000F666B9 /* LegacyUtilities.m */; }; + 3CE21ADC225A674800F666B9 /* LibreOfficeAssistant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE21ADB225A674800F666B9 /* LibreOfficeAssistant.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 3C4133B02227E09F0041136E /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 3C4133972227E09B0041136E /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3C41339E2227E09B0041136E; + remoteInfo = masterkey; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 3CE0D699224155AE00E7FC1C /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = /Users/Ian/Desktop; + dstSubfolderSpec = 0; + files = ( + 3C278DA7225CF5C6004FFC53 /* masterkey.app in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 3C39A72E2267ABA90061367B /* WordMacAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordMacAssistant.swift; sourceTree = ""; }; + 3C39A7302267ACCF0061367B /* AcrobatWindowsAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcrobatWindowsAssistant.swift; sourceTree = ""; }; + 3C39A7322267ACF60061367B /* Windows Application Names */ = {isa = PBXFileReference; lastKnownFileType = text; path = "Windows Application Names"; sourceTree = ""; }; + 3C39A7342267AF040061367B /* WindowsVideoAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WindowsVideoAssistant.swift; sourceTree = ""; }; + 3C39A738226A347A0061367B /* ExcelAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExcelAssistant.swift; sourceTree = ""; }; + 3C41339F2227E09B0041136E /* masterkey.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = masterkey.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 3C4133A22227E09B0041136E /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 3C4133A42227E09F0041136E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 3C4133A72227E09F0041136E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 3C4133A92227E09F0041136E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3C4133AA2227E09F0041136E /* masterkey.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = masterkey.entitlements; sourceTree = ""; }; + 3C4133AF2227E09F0041136E /* masterkeyTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = masterkeyTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3C4133B32227E09F0041136E /* masterkeyTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = masterkeyTests.swift; sourceTree = ""; }; + 3C4133B52227E09F0041136E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 3C4133BF2227E1B70041136E /* PowerPointMacAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PowerPointMacAssistant.swift; sourceTree = ""; }; + 3C4133C12227E1C90041136E /* PowerPointWindowsAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PowerPointWindowsAssistant.swift; sourceTree = ""; }; + 3C4133C32227E1D60041136E /* KeynoteAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeynoteAssistant.swift; sourceTree = ""; }; + 3C4133C52227E1E40041136E /* LegacyKeynoteAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LegacyKeynoteAssistant.swift; sourceTree = ""; }; + 3C4133C72227E2010041136E /* AcrobatAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcrobatAssistant.swift; sourceTree = ""; }; + 3C4133C92227E2960041136E /* ApplicationAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationAssistant.swift; sourceTree = ""; }; + 3C88C069225DADDD0048E01A /* VideoAssistant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VideoAssistant.swift; sourceTree = ""; }; + 3CE21AD52259B3EE00F666B9 /* Utilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = ""; }; + 3CE21AD72259B4A000F666B9 /* masterkey-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "masterkey-Bridging-Header.h"; sourceTree = ""; }; + 3CE21AD82259B4A000F666B9 /* LegacyUtilities.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LegacyUtilities.m; sourceTree = ""; }; + 3CE21ADA2259B5B900F666B9 /* LegacyUtilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LegacyUtilities.h; sourceTree = ""; }; + 3CE21ADB225A674800F666B9 /* LibreOfficeAssistant.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibreOfficeAssistant.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 3C41339C2227E09B0041136E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3C4133AC2227E09F0041136E /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 3C4133962227E09B0041136E = { + isa = PBXGroup; + children = ( + 3C4133A12227E09B0041136E /* masterkey */, + 3C4133B22227E09F0041136E /* masterkeyTests */, + 3C4133A02227E09B0041136E /* Products */, + ); + sourceTree = ""; + }; + 3C4133A02227E09B0041136E /* Products */ = { + isa = PBXGroup; + children = ( + 3C41339F2227E09B0041136E /* masterkey.app */, + 3C4133AF2227E09F0041136E /* masterkeyTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 3C4133A12227E09B0041136E /* masterkey */ = { + isa = PBXGroup; + children = ( + 3C4133BE2227E0B90041136E /* ApplicationAssistants */, + 3C4133C92227E2960041136E /* ApplicationAssistant.swift */, + 3C4133A22227E09B0041136E /* AppDelegate.swift */, + 3C4133A42227E09F0041136E /* Assets.xcassets */, + 3C4133A62227E09F0041136E /* MainMenu.xib */, + 3C4133A92227E09F0041136E /* Info.plist */, + 3C4133AA2227E09F0041136E /* masterkey.entitlements */, + 3CE21AD52259B3EE00F666B9 /* Utilities.swift */, + 3CE21ADA2259B5B900F666B9 /* LegacyUtilities.h */, + 3CE21AD82259B4A000F666B9 /* LegacyUtilities.m */, + 3CE21AD72259B4A000F666B9 /* masterkey-Bridging-Header.h */, + 3C39A7322267ACF60061367B /* Windows Application Names */, + ); + path = masterkey; + sourceTree = ""; + }; + 3C4133B22227E09F0041136E /* masterkeyTests */ = { + isa = PBXGroup; + children = ( + 3C4133B32227E09F0041136E /* masterkeyTests.swift */, + 3C4133B52227E09F0041136E /* Info.plist */, + ); + path = masterkeyTests; + sourceTree = ""; + }; + 3C4133BE2227E0B90041136E /* ApplicationAssistants */ = { + isa = PBXGroup; + children = ( + 3C4133BF2227E1B70041136E /* PowerPointMacAssistant.swift */, + 3C4133C12227E1C90041136E /* PowerPointWindowsAssistant.swift */, + 3C39A72E2267ABA90061367B /* WordMacAssistant.swift */, + 3C4133C32227E1D60041136E /* KeynoteAssistant.swift */, + 3C4133C52227E1E40041136E /* LegacyKeynoteAssistant.swift */, + 3C4133C72227E2010041136E /* AcrobatAssistant.swift */, + 3C39A7302267ACCF0061367B /* AcrobatWindowsAssistant.swift */, + 3CE21ADB225A674800F666B9 /* LibreOfficeAssistant.swift */, + 3C88C069225DADDD0048E01A /* VideoAssistant.swift */, + 3C39A7342267AF040061367B /* WindowsVideoAssistant.swift */, + 3C39A738226A347A0061367B /* ExcelAssistant.swift */, + ); + path = ApplicationAssistants; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 3C41339E2227E09B0041136E /* masterkey */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3C4133B82227E09F0041136E /* Build configuration list for PBXNativeTarget "masterkey" */; + buildPhases = ( + 3C41339B2227E09B0041136E /* Sources */, + 3C41339C2227E09B0041136E /* Frameworks */, + 3C41339D2227E09B0041136E /* Resources */, + 3CE0D699224155AE00E7FC1C /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = masterkey; + productName = masterkey; + productReference = 3C41339F2227E09B0041136E /* masterkey.app */; + productType = "com.apple.product-type.application"; + }; + 3C4133AE2227E09F0041136E /* masterkeyTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 3C4133BB2227E09F0041136E /* Build configuration list for PBXNativeTarget "masterkeyTests" */; + buildPhases = ( + 3C4133AB2227E09F0041136E /* Sources */, + 3C4133AC2227E09F0041136E /* Frameworks */, + 3C4133AD2227E09F0041136E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 3C4133B12227E09F0041136E /* PBXTargetDependency */, + ); + name = masterkeyTests; + productName = masterkeyTests; + productReference = 3C4133AF2227E09F0041136E /* masterkeyTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 3C4133972227E09B0041136E /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1010; + LastUpgradeCheck = 1010; + ORGANIZATIONNAME = "One Sky IT"; + TargetAttributes = { + 3C41339E2227E09B0041136E = { + CreatedOnToolsVersion = 10.1; + LastSwiftMigration = 1020; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 0; + }; + }; + }; + 3C4133AE2227E09F0041136E = { + CreatedOnToolsVersion = 10.1; + TestTargetID = 3C41339E2227E09B0041136E; + }; + }; + }; + buildConfigurationList = 3C41339A2227E09B0041136E /* Build configuration list for PBXProject "masterkey" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 3C4133962227E09B0041136E; + productRefGroup = 3C4133A02227E09B0041136E /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 3C41339E2227E09B0041136E /* masterkey */, + 3C4133AE2227E09F0041136E /* masterkeyTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 3C41339D2227E09B0041136E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3C4133A52227E09F0041136E /* Assets.xcassets in Resources */, + 3C4133A82227E09F0041136E /* MainMenu.xib in Resources */, + 3C39A7332267ACF60061367B /* Windows Application Names in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3C4133AD2227E09F0041136E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 3C41339B2227E09B0041136E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3C4133CA2227E2960041136E /* ApplicationAssistant.swift in Sources */, + 3C4133C22227E1C90041136E /* PowerPointWindowsAssistant.swift in Sources */, + 3C4133A32227E09B0041136E /* AppDelegate.swift in Sources */, + 3C4133C42227E1D60041136E /* KeynoteAssistant.swift in Sources */, + 3C39A739226A347A0061367B /* ExcelAssistant.swift in Sources */, + 3C39A72F2267ABA90061367B /* WordMacAssistant.swift in Sources */, + 3C4133C02227E1B70041136E /* PowerPointMacAssistant.swift in Sources */, + 3CE21AD92259B4A000F666B9 /* LegacyUtilities.m in Sources */, + 3C4133C62227E1E50041136E /* LegacyKeynoteAssistant.swift in Sources */, + 3C39A7312267ACCF0061367B /* AcrobatWindowsAssistant.swift in Sources */, + 3CE21AD62259B3EE00F666B9 /* Utilities.swift in Sources */, + 3C39A7352267AF040061367B /* WindowsVideoAssistant.swift in Sources */, + 3C4133C82227E2010041136E /* AcrobatAssistant.swift in Sources */, + 3C88C06A225DADDD0048E01A /* VideoAssistant.swift in Sources */, + 3CE21ADC225A674800F666B9 /* LibreOfficeAssistant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 3C4133AB2227E09F0041136E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3C4133B42227E09F0041136E /* masterkeyTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 3C4133B12227E09F0041136E /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 3C41339E2227E09B0041136E /* masterkey */; + targetProxy = 3C4133B02227E09F0041136E /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 3C4133A62227E09F0041136E /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 3C4133A72227E09F0041136E /* Base */, + ); + name = MainMenu.xib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 3C4133B62227E09F0041136E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 3C4133B72227E09F0041136E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_INJECT_BASE_ENTITLEMENTS = NO; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.12; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 3C4133B92227E09F0041136E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = masterkey/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = com.oneskyit.masterkey; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OBJC_BRIDGING_HEADER = "masterkey/masterkey-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; + }; + name = Debug; + }; + 3C4133BA2227E09F0041136E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = "-"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = masterkey/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + MACOSX_DEPLOYMENT_TARGET = 10.12; + PRODUCT_BUNDLE_IDENTIFIER = com.oneskyit.masterkey; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OBJC_BRIDGING_HEADER = "masterkey/masterkey-Bridging-Header.h"; + SWIFT_VERSION = 4.2; + }; + name = Release; + }; + 3C4133BC2227E09F0041136E /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = masterkeyTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.oneskyit.masterkeyTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.2; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/masterkey.app/Contents/MacOS/masterkey"; + }; + name = Debug; + }; + 3C4133BD2227E09F0041136E /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Manual; + COMBINE_HIDPI_IMAGES = YES; + DEVELOPMENT_TEAM = ""; + INFOPLIST_FILE = masterkeyTests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + "@loader_path/../Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.oneskyit.masterkeyTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 4.2; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/masterkey.app/Contents/MacOS/masterkey"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 3C41339A2227E09B0041136E /* Build configuration list for PBXProject "masterkey" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3C4133B62227E09F0041136E /* Debug */, + 3C4133B72227E09F0041136E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3C4133B82227E09F0041136E /* Build configuration list for PBXNativeTarget "masterkey" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3C4133B92227E09F0041136E /* Debug */, + 3C4133BA2227E09F0041136E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 3C4133BB2227E09F0041136E /* Build configuration list for PBXNativeTarget "masterkeyTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 3C4133BC2227E09F0041136E /* Debug */, + 3C4133BD2227E09F0041136E /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 3C4133972227E09B0041136E /* Project object */; +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..2066c89 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/xcuserdata/Ian.xcuserdatad/xcschemes/xcschememanagement.plist b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/xcuserdata/Ian.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..8e175cf --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey.xcodeproj/xcuserdata/Ian.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + masterkey.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/AppDelegate.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/AppDelegate.swift new file mode 100644 index 0000000..b30a4c0 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/AppDelegate.swift @@ -0,0 +1,275 @@ +// +// AppDelegate.swift +// masterkey +// +// Created by Ian Kohl on 2/28/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +//Open/Close +//quicktime - MP4 +//Text +//Doc + +import Cocoa +import OSAKit + +enum ApplicationNameConstants: String { + case PowerPointMac = "Microsoft PowerPoint" + case PowerPointWin = "Microsoft Office PowerPoint" + case Keynote = "Keynote" + case LibreOffice = "LibreOffice" + case AdobeAcrobat = "Adobe Acrobat Reader DC" + case GoogleChrome = "Google Chrome" + case VLC = "VLC" +} + +extension ApplicationNameConstants: CaseIterable {} + +extension String { + func fileName() -> String { + return NSURL(fileURLWithPath: self).deletingPathExtension?.lastPathComponent ?? "" + } + + func fileExtension() -> String { + return NSURL(fileURLWithPath: self).pathExtension ?? "" + } +} + +@NSApplicationMain +class AppDelegate: NSObject, NSApplicationDelegate { + var assistant:ApplicationAssistant! + + var openingFile = false + + //No window + //@IBOutlet weak var window: NSWindow! + + func applicationDidFinishLaunching(_ aNotification: Notification) { + if !openingFile { + NSLog("Not opening a file. Displaying setup dialog...") + if setupDialog() { + NSLog("Proceeding to trigger all security warnings...") + if triggerSecurity() { + NSLog("Presentation applications have been opened..") + } + } + } + + NSLog("Terminating applicaiton...") + terminateApplication() + } + + func terminateApplication() { + NSLog("Terminating...") + NSApplication.shared.terminate(self) + } + + func applicationWillTerminate(_ aNotification: Notification) { + + } + + func application(_ sender: NSApplication, openFile filename: String) -> Bool { + NSLog("Version 2.0") + + openingFile = true + + //Used to open a group of files + //let first_filename = filenames[0]; + + //open a single file + let filename_extension = String(filename.fileExtension().lowercased()); + + NSLog("Filename Extension: \(filename_extension)") + + var assistantFlag = false + + //Args to pass to application - not currently used + //var args = "" + + //once we are ready with a single presentation file (lowercase, valid ext) get into the switch + switch filename_extension { + case "pptx", + "ppt", + "pptmac", + "pptxmac": + NSLog("Mac PPT File..."); + assistant = PowerPointMacAssistant(); + case "pptxwin", + "pptwin": + NSLog("Windows PPT File...") + assistant = PowerPointWindowsAssistant(); + case "pdf", + "pdfmac": + NSLog("PDF File...") + //args = "pagemode=FullScreen" + assistant = AcrobatAssistant(); + case "pdfwin": + NSLog("PDF Windows File...") + assistant = AcrobatWindowsAssistant(); + case "key": + NSLog("Keynote File...") + assistant = KeynoteAssistant(); + case "odp": + NSLog("LibreOffice File...") + assistant = LibreOfficeAssistant(); + case "mp4", + "mkv", + "mov", + "mpeg", + "avi", + "flv", + "ogg", + "mp3", + "ogv": + NSLog("Video (VLC) File...") + assistant = VideoAssistant(); + case "wmv": + NSLog("Windows Video (VLC) File...") + assistant = WindowsVideoAssistant(); + case "doc", + "docx": + NSLog("Microsoft Word Document...") + assistant = WordMacAssistant(); + default: + NSLog("Generic File...") + assistantFlag = true + } + + let legacyUtilities: LegacyUtilities = LegacyUtilities() + + if assistantFlag { + NSLog("Is assistant...") + legacyUtilities.undoMirror() + //TODO: Window to mirror + NSWorkspace.shared.openFile(filename) + } else { + if assistant.shouldUnmirror { + legacyUtilities.undoMirror() + } + + NSLog("Opening file...") + NSWorkspace.shared.openFile(filename, withApplication: assistant.applicationName) + NSLog("Sleeping...") + sleep(assistant!.delay) + NSLog("Activating application...") + let apps = NSRunningApplication.runningApplications(withBundleIdentifier: assistant.bundleID) + for app in apps as [NSRunningApplication] { + if app.bundleIdentifier == assistant.bundleID { + app.activate(options: .activateIgnoringOtherApps) + } + } + + NSLog("Running Automation...") + if self.runAutomation() { + NSLog("Mirror check...") + if assistant.mirrored { + NSLog("Mirroring...") + legacyUtilities.setupMirror() + } + } + } + + //Start recording code + var screens = 2 + + //TODO: get actual number of screens as mirroring/unmirroring should be done at this point + if assistant.mirrored { + screens = 1 + } + + let utils = Utilities() + let rec_result = utils.startRecording(filename: filename,num_screens: screens) + NSLog("Recording result...") + NSLog(rec_result) + //End recording code + + // Return true for successfully opening the file. + return true + } + + //TODO: Merge this and security as it is the same code + func runAutomation() -> Bool { + NSLog("Run automation...") + NSLog(assistant.scriptString) + let script = OSAScript.init(source: assistant.scriptString, language: OSALanguage.init(forName: "JavaScript")); + var compileError : NSDictionary? + script.compileAndReturnError(&compileError) + if let compileError = compileError { + NSLog("Compile Error...") + print(compileError); + return false; + } + var scriptError : NSDictionary? + let result = script.executeAndReturnError(&scriptError) + if let scriptError = scriptError { + NSLog("Print error...") + NSLog(scriptError.description) + } + else if let result = result?.stringValue { + NSLog("Result...") + print(result) + } + + return true + } + + func triggerSecurity() -> Bool { + NSLog("Trigger Security...") + + ApplicationNameConstants.allCases.forEach { + let application_name = $0.rawValue + let application_security_script = """ + var app = Application('\(application_name)') + delay(1) + app.activate() + """ + executeSecurityScript(script: application_security_script) + } + + let final_security_script = """ + var finder = Application('Finder') + finder.activate() + delay(1) + var se = Application('System Events') + se.keyCode(50) + """ + NSLog(final_security_script) + executeSecurityScript(script: final_security_script) + + return true + } + + func executeSecurityScript(script: String) { + let script = OSAScript.init(source: script, language: OSALanguage.init(forName: "JavaScript")); + var compileError : NSDictionary? + script.compileAndReturnError(&compileError) + if let compileError = compileError { + NSLog("Security Script Compile Error...") + print(compileError); + } + var scriptError : NSDictionary? + let result = script.executeAndReturnError(&scriptError) + if let scriptError = scriptError { + NSLog("Print security script error...") + NSLog(scriptError.description) + } + else if let result = result?.stringValue { + NSLog("Trigger Security Result...") + print(result) + } + + } + + func setupDialog() -> Bool { + let alert = NSAlert() + alert.messageText = "Are you setting up a new version of Master Key?" + alert.informativeText = "If you answer Yes, each applicaiton (PowerPoint, Keynote, etc.) will open so that security permissions can be granted for automation for each application. If you answer no, no action will be taken and the application will exit immediately." + alert.alertStyle = .warning + alert.addButton(withTitle: "Yes") + alert.addButton(withTitle: "No") + return alert.runModal() == .alertFirstButtonReturn + } +} + + diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistant.swift new file mode 100644 index 0000000..8c82df0 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistant.swift @@ -0,0 +1,36 @@ +// +// ApplicationAssistant.swift +// masterkey +// +// Created by Ian Kohl on 2/28/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class ApplicationAssistant { + var mirrored: Bool + + var shouldUnmirror: Bool + + var delay: UInt32 + + var applicationName: String + + var applicationPath: String + + var scriptString: String + + var bundleID: String + + init() { + mirrored = false + shouldUnmirror = true + delay = 0 + applicationName = "" + applicationPath = "" + scriptString = """ + """ + bundleID = "xxxxxxxxxxxx" + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/AcrobatAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/AcrobatAssistant.swift new file mode 100644 index 0000000..1e0eb19 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/AcrobatAssistant.swift @@ -0,0 +1,80 @@ +// +// 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' }) + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/AcrobatWindowsAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/AcrobatWindowsAssistant.swift new file mode 100644 index 0000000..ebf194b --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/AcrobatWindowsAssistant.swift @@ -0,0 +1,32 @@ +// +// AcrobatWindowsAssistant.swift +// masterkey +// +// Created by Ian Kohl on 4/17/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class AcrobatWindowsAssistant: ApplicationAssistant { + override init() { + super.init() + + mirrored = true + + shouldUnmirror = false + + delay = 2 + + applicationName = "Acrobat Reader Windows" + + applicationPath = "/Applications/Acrobat Reader Windows.app" + + //ctrl + l + scriptString = """ + delay(1) + var se = Application('System Events') + se.keyCode(108, { using: 'control down' }) + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/ExcelAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/ExcelAssistant.swift new file mode 100644 index 0000000..507c76a --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/ExcelAssistant.swift @@ -0,0 +1,9 @@ +// +// ExcelAssistant.swift +// masterkey +// +// Created by Ian Kohl on 4/19/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/KeynoteAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/KeynoteAssistant.swift new file mode 100644 index 0000000..07ac58f --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/KeynoteAssistant.swift @@ -0,0 +1,42 @@ +// +// PowerPointMacAssistant.swift +// masterkey +// +// Created by Ian Kohl on 2/28/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class KeynoteAssistant: ApplicationAssistant { + override init() { + super.init() + + mirrored = false + shouldUnmirror = true + + delay = 2 + + applicationName = "Keynote" + + applicationPath = "/Applications/Keynote.app" + + bundleID = "com.apple.iWork.Keynote" + + scriptString = """ + delay(1) + var keynote = Application('Keynote') + + var app = Application.currentApplication() + app.includeStandardAdditions = true + + keynote.activate() + delay(1) + keynote.activate() + + var doc = keynote.documents[0] + var slide = doc.slides[0] + doc.start() + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/LegacyKeynoteAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/LegacyKeynoteAssistant.swift new file mode 100644 index 0000000..015bf53 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/LegacyKeynoteAssistant.swift @@ -0,0 +1,60 @@ +// +// PowerPointMacAssistant.swift +// masterkey +// +// Created by Ian Kohl on 2/28/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class LegacyKeynoteAssistant: ApplicationAssistant { + override init() { + super.init() + + mirrored = false + + shouldUnmirror = true + + delay = 2 + + applicationName = "Keynote" + + applicationPath = "/Applications/iWork '09/Keynote.app" + + bundleID = "com.apple.iWork.Keynote" + + + +// delay(1) +// var keynote = Application('Keynote') +// +// var app = Application.currentApplication() +// app.includeStandardAdditions = true +// +// keynote.activate() +// delay(1) +// keynote.activate() +// +// var doc = keynote.documents[0] +// var slide = doc.slides[0] +// doc.start() + + //cmd + esc + scriptString = """ + delay(1) + var keynote = Application('Keynote') + + var app = Application.currentApplication() + app.includeStandardAdditions = true + + keynote.activate() + delay(1) + keynote.activate() + + var doc = keynote.documents[0] + var slide = doc.slides[0] + doc.start() + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/LibreOfficeAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/LibreOfficeAssistant.swift new file mode 100644 index 0000000..861be84 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/LibreOfficeAssistant.swift @@ -0,0 +1,43 @@ +// +// 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) + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/PowerPointMacAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/PowerPointMacAssistant.swift new file mode 100644 index 0000000..4f516da --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/PowerPointMacAssistant.swift @@ -0,0 +1,33 @@ +// +// PowerPointMacAssistant.swift +// masterkey +// +// Created by Ian Kohl on 2/28/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class PowerPointMacAssistant: ApplicationAssistant { + override init() { + super.init() + + mirrored = false + + shouldUnmirror = true + + delay = 3 + + applicationName = "Microsoft PowerPoint" + + applicationPath = "/Applications/Microsoft PowerPoint.app" + + bundleID = "com.microsoft.Powerpoint" + + scriptString = """ + delay(1) + var se = Application('System Events') + se.keyCode(36, { using: 'command down' }) + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/PowerPointWindowsAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/PowerPointWindowsAssistant.swift new file mode 100644 index 0000000..fea1cd4 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/PowerPointWindowsAssistant.swift @@ -0,0 +1,42 @@ +// +// PowerPointMacAssistant.swift +// masterkey +// +// Created by Ian Kohl on 2/28/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + + class PowerPointWindowsAssistant: ApplicationAssistant { + override init() { + super.init() + + mirrored = false + + shouldUnmirror = true + + delay = 3 + + applicationName = "Microsoft Office PowerPoint" + + applicationPath = "/Applications/Microsoft Office PowerPoint.app" + + //Not overriding bundleID and keeping the superclass xxxxxxxxxxxx bundleID. Automation code handles making sure Windows PPTs are active. + + scriptString = """ + var powerpoint = Application('Microsoft Office PowerPoint') + + var app = Application.currentApplication() + app.includeStandardAdditions = true + + delay(1) + powerpoint.activate() + + var se = Application('System Events') + se.keyCode(96) + delay (2) + powerpoint.activate() + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/VideoAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/VideoAssistant.swift new file mode 100644 index 0000000..73a54a8 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/VideoAssistant.swift @@ -0,0 +1,48 @@ +// +// PowerPointMacAssistant.swift +// masterkey +// +// Created by Ian Kohl on 2/28/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class VideoAssistant: ApplicationAssistant { + override init() { + super.init() + + mirrored = true + shouldUnmirror = false + + delay = 2 + + applicationName = "VLC" + + applicationPath = "/Applications/VLC.app" + + bundleID = "org.videolan.vlc" + +// 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(3, { using: 'command down' }) + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/WindowsVideoAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/WindowsVideoAssistant.swift new file mode 100644 index 0000000..cd4766c --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/WindowsVideoAssistant.swift @@ -0,0 +1,32 @@ +// +// WindowsVideoAssistant.swift +// masterkey +// +// Created by Ian Kohl on 4/17/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class WindowsVideoAssistant: ApplicationAssistant { + override init() { + super.init() + + mirrored = true + + shouldUnmirror = false + + delay = 2 + + applicationName = "VLC Windows" + + applicationPath = "/Applications/VLC Windows.app" + + //alt + enter + scriptString = """ + delay(1) + var se = Application('System Events') + se.keyCode(36, { using: 'option down' }) + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/WordMacAssistant.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/WordMacAssistant.swift new file mode 100644 index 0000000..6e64223 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/ApplicationAssistants/WordMacAssistant.swift @@ -0,0 +1,42 @@ +// +// WordMacAssistant.swift +// masterkey +// +// Created by Ian Kohl on 4/17/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class WordMacAssistant: ApplicationAssistant { + override init() { + super.init() + + mirrored = true + + shouldUnmirror = false + + delay = 3 + + applicationName = "Microsoft Word" + + applicationPath = "/Applications/Microsoft Word.app" + + bundleID = "com.microsoft.Word" + + scriptString = """ + var word = Application('Microsoft Word') + + var app = Application.currentApplication() + app.includeStandardAdditions = true + + delay(1) + word.activate() + + var se = Application('System Events') + se.keyCode(53, { using: 'command down' }) + delay (2) + word.activate() + """ + } +} diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Assets.xcassets/AppIcon.appiconset/Contents.json b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..2db2b1c --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,58 @@ +{ + "images" : [ + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "16x16", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "32x32", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "128x128", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "256x256", + "scale" : "2x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "1x" + }, + { + "idiom" : "mac", + "size" : "512x512", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Assets.xcassets/Contents.json b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Base.lproj/MainMenu.xib b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..226fd03 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Base.lproj/MainMenu.xib @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Info.plist b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Info.plist new file mode 100644 index 0000000..8751feb --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Info.plist @@ -0,0 +1,87 @@ + + + + + NSAppleEventsUsageDescription + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDocumentTypes + + + CFBundleTypeName + Any File + CFBundleTypeRole + Editor + LSItemContentTypes + + public.content + + + + CFBundleTypeExtensions + + pptxmac + + CFBundleTypeName + OSIT PPTX Mac + CFBundleTypeRole + Editor + + + CFBundleTypeExtensions + + pptxwin + + CFBundleTypeName + OSIT PPTX Win + CFBundleTypeRole + Editor + + + CFBundleTypeExtensions + + pptmac + + CFBundleTypeName + OSIT PPT Mac + CFBundleTypeRole + Editor + + + CFBundleTypeExtensions + + pptwin + + CFBundleTypeName + OSIT PPT Win + CFBundleTypeRole + Editor + + + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.6 + CFBundleVersion + 1 + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + Copyright © 2019 One Sky IT. All rights reserved. + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/LegacyUtilities.h b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/LegacyUtilities.h new file mode 100644 index 0000000..946d3a7 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/LegacyUtilities.h @@ -0,0 +1,24 @@ +// +// LegacyUtilities.h +// masterkey +// +// Created by Ian Kohl on 4/6/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +#import + +#ifndef LegacyUtilities_h +#define LegacyUtilities_h + +@interface LegacyUtilities: NSObject + +-(void) setupMirror; +-(void) doMirror; + +-(void) undoMirror; +-(void) executeMirrorAction; + +@end + +#endif /* LegacyUtilities_h */ diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/LegacyUtilities.m b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/LegacyUtilities.m new file mode 100644 index 0000000..003ee22 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/LegacyUtilities.m @@ -0,0 +1,135 @@ +// +// LegacyUtilities.m +// masterkey +// +// Created by Ian Kohl on 4/6/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +#import +#include + +#import "LegacyUtilities.h" + +@implementation LegacyUtilities : NSObject + +-(void) setupMirror { + CGDisplayCount numberOfActiveDspys; + CGDisplayCount numberOfOnlineDspys; + + CGDisplayCount numberOfTotalDspys = 2; // The number of total displays + + CGDirectDisplayID activeDspys[] = {0,0}; + CGDirectDisplayID onlineDspys[] = {0,0}; + CGDirectDisplayID secondaryDspy; + + CGDisplayErr activeError = CGGetActiveDisplayList (numberOfTotalDspys,activeDspys,&numberOfActiveDspys); + + if (activeError!=0) NSLog(@"Error in obtaining active diplay list: %d\n",activeError); + + CGDisplayErr onlineError = CGGetOnlineDisplayList (numberOfTotalDspys,onlineDspys,&numberOfOnlineDspys); + + if (onlineError!=0) NSLog(@"Error in obtaining online diplay list: %d\n",onlineError); + + CGDisplayConfigRef configRef; + CGError err = CGBeginDisplayConfiguration (&configRef); + if (err != 0) NSLog(@"Error with CGBeginDisplayConfiguration: %d\n",err); + + if (numberOfOnlineDspys==2) { + + if (onlineDspys[0]==CGMainDisplayID()){ + secondaryDspy = onlineDspys[1]; + } else { + secondaryDspy = onlineDspys[0]; + } + + CGDisplayConfigRef configRef; + CGError err = CGBeginDisplayConfiguration (&configRef); + if (err != 0) NSLog(@"Error with CGBeginDisplayConfiguration: %d\n",err); + + if (numberOfActiveDspys==2) { // Displays are unmirrored -> mirror them + err = CGConfigureDisplayMirrorOfDisplay (configRef,secondaryDspy,CGMainDisplayID()); + NSLog(@"ConfigureMirror Error: %d",err); + } + err = CGCompleteDisplayConfiguration (configRef,kCGConfigurePermanently); + NSLog(@"Mirror CompleteConfig Error: %d",err); + + } else { + if (numberOfOnlineDspys>2) { + printf("Cannot handle more than 2 displays at this time. %d displays detected.\n",numberOfOnlineDspys); + } else { + printf("No secondary display detected.\n"); + } + } +} + +-(void) doMirror { + NSEvent *thisEvent = [NSEvent otherEventWithType:NSEventTypeSystemDefined location:CGPointMake(0,0) modifierFlags:0xa00 timestamp:0 windowNumber:0 context:0 subtype:8 data1:(NX_KEYTYPE_VIDMIRROR<<16|(0xa <<8)) data2:-1]; + CGEventRef cThisEvent = [thisEvent CGEvent]; + CGEventPost(0, (cThisEvent)); + + NSEvent *thatEvent = [NSEvent otherEventWithType:NSEventTypeSystemDefined location:NSMakePoint(0,0) modifierFlags:0xb00 timestamp:0 windowNumber:0 context:[NSGraphicsContext currentContext] subtype:8 data1:(NX_KEYTYPE_VIDMIRROR<<16|(0xb <<8)) data2:-1]; + CGEventRef cThatEvent = [thatEvent CGEvent]; + CGEventPost(0, (cThatEvent)); +} + +-(void) undoMirror { + enum MirrorMode { + off, + } mode; + + mode = off; + + CGDisplayCount numberOfActiveDspys; + CGDisplayCount numberOfOnlineDspys; + + CGDisplayCount numberOfTotalDspys = 2; + + CGDirectDisplayID activeDspys[] = {0,0}; + CGDirectDisplayID onlineDspys[] = {0,0}; + CGDirectDisplayID secondaryDspy; + + CGDisplayErr activeError = CGGetActiveDisplayList (numberOfTotalDspys,activeDspys,&numberOfActiveDspys); + + if (activeError!=0) NSLog(@"Error in obtaining active diplay list: %d\n",activeError); + + CGDisplayErr onlineError = CGGetOnlineDisplayList (numberOfTotalDspys,onlineDspys,&numberOfOnlineDspys); + + if (onlineError!=0) NSLog(@"Error in obtaining online diplay list: %d\n",onlineError); + + if (numberOfOnlineDspys==2) { // Online displays = physical displays regardless of mirror status + + if (onlineDspys[0]==CGMainDisplayID()){ + secondaryDspy = onlineDspys[1]; + } else { + secondaryDspy = onlineDspys[0]; + } + + switch (mode) { + case off: + if (numberOfActiveDspys!=2) // Active displays = software displays (mirror = 1) + [self executeMirrorAction]; + break; + default: + break; + } + } else { + if (numberOfOnlineDspys>2) { + printf("Cannot handle more than 2 displays at this time. %d displays detected.\n",numberOfOnlineDspys); + } else { + printf("No secondary display detected.\n"); + } + } +} + +-(void) executeMirrorAction { + NSEvent *thisEvent = [NSEvent otherEventWithType:NSEventTypeSystemDefined location:CGPointMake(0,0) modifierFlags:0xa00 timestamp:0 windowNumber:0 context:0 subtype:8 data1:(NX_KEYTYPE_VIDMIRROR<<16|(0xa <<8)) data2:-1]; + CGEventRef cThisEvent = [thisEvent CGEvent]; + CGEventPost(0, (cThisEvent)); + + NSEvent *thatEvent = [NSEvent otherEventWithType:NSEventTypeSystemDefined location:NSMakePoint(0,0) modifierFlags:0xb00 timestamp:0 windowNumber:0 context:[NSGraphicsContext currentContext] subtype:8 data1:(NX_KEYTYPE_VIDMIRROR<<16|(0xb <<8)) data2:-1]; + CGEventRef cThatEvent = [thatEvent CGEvent]; + CGEventPost(0, (cThatEvent)); +} + +@end diff --git a/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Utilities.swift b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Utilities.swift new file mode 100644 index 0000000..1e16814 --- /dev/null +++ b/documentation/old_custom_OSIT_Master_Key_app/oneskyit-master-key-da2e467baf22/masterkey/Utilities.swift @@ -0,0 +1,41 @@ +// +// Utilities.swift +// masterkey +// +// Created by Ian Kohl on 4/6/19. +// Copyright © 2019 One Sky IT. All rights reserved. +// + +import Foundation + +class Utilities { + func startRecording(filename: String, num_screens: Int) -> String + { + //Create output filename + let timestamp = String(NSDate().timeIntervalSince1970) + let home = NSHomeDirectory() + let recording_filename = timestamp + filename + ".mkv" + let recording_path = "\(home)/recordings/\(recording_filename)" + + let device_string = "\"\(num_screens):0\"" + + //Get Devices + //ffmpeg -f avfoundation -list_devices true -i "" + + //Start recording + //ffmpeg -f avfoundation -i "2: