Applescript - " AXMain"意思?

时间:2017-05-28 10:29:34

标签: applescript

在此脚本中:

    global frontApp, frontAppName, windowTitle

    set windowTitle to ""
    tell application "System Events"
        set frontApp to first application process whose frontmost is true
        set frontAppName to name of frontApp
        tell process frontAppName
            tell (1st window whose value of attribute "AXMain" is true)
                set windowTitle to value of attribute "AXTitle"
            end tell
        end tell
    end tell

    return {frontAppName, windowTitle}

" AXMain"意思?我无法在任何地方找到有关此问题的文档或其他问题!

1 个答案:

答案 0 :(得分:1)

import { Component } from '@angular/core'; import { NavController } from 'ionic-angular'; import { SpeechRecognition } from '@ionic-native/speech-recognition'; @Component({ selector: 'page-home', templateUrl: 'home.html' }) export class HomePage { speechList: Array<string> = []; constructor(private speach: SpeechRecognition, public navCtrl: NavController) { } async getPermission():Promise<void> { console.log('abc1'); try{ const permission = await this.speach.requestPermission(); console.log(permission); return permission; } catch (e){ console.log(e); } } listenForSpeech():void { this.speach.startListening().subscribe(data => this.speechList = data, error => console.log(error) ) } } 是一个类前缀,代表 Accessible

窗口的

global packages: @ionic/cli-utils : 1.2.0 Cordova CLI : 7.0.0 Ionic CLI : 3.2.0 local packages: @ionic/app-scripts : 1.3.7 @ionic/cli-plugin-cordova : 1.2.1 @ionic/cli-plugin-ionic-angular : 1.2.0 Cordova Platforms : ios 4.4.0 Ionic Framework : ionic-angular 3.3.0 System: Node : v7.10.0 OS : OS X El Capitan Xcode : Xcode 7.3.1 Build version 7D1014 ios-deploy : 1.9.1 ios-sim : 5.0.8 表示此窗口是否为应用程序的主窗口