2012-11-30 3 views
2

나는 AdobeFlashPlayer를 프로그래밍 방식으로 설치하려고하는데, 그 전에 chk해야하는지 여부는 이미 설치되어 있는지 여부, 그렇다면 버전을 가져와야합니다. 플래시 플레이어가 플러그인으로 추가 될 것이므로 Safari 및 Firefox 브라우저에서 동일한 플러그인을 사용해야합니다. Pls는 Applescripts (SWFObject를 사용하지 않고 가능한 경우)를 사용하여 동일한 방법을 얻는 방법을 제안합니다.Adobe Flash Player 확인 방법 AppleScript 또는 Java로 Mac에 Mac 용 Adobe Flash Player가 설치되어 있습니까?

+0

당신은 사파리 브라우저에 설치된 flashplayer 플러그인을 찾으시겠습니까? –

+0

예 .. 나는 여전히 플래시 플레이어 플러그인이 브라우저 또는 시스템에 설치 될지 여부를 모르겠다는 것을 아직도 혼란 스럽습니다. ?? –

답변

2

Mac의 경우 브라우저 플러그인은 "Internet Plug-Ins"라는 폴더에 설치됩니다. 사용자의 Libray 폴더 또는 기본 라이브러리 폴더에서이 폴더를 가질 수 있습니다. 그래서 우리는 그 폴더를 확인할 수 있습니다 applescript를 사용하여 ...

set pluginName to "Flash Player.plugin" 
set pluginsMainFolder to (path to library folder from local domain as text) & "Internet Plug-Ins:" 
set pluginsUserFolder to (path to library folder from user domain as text) & "Internet Plug-Ins:" 

-- check the folders and get the version if found 
set theVersion to missing value 
tell application "System Events" 
    try 
     set f to first file of folder pluginsMainFolder whose name is pluginName 
     set theVersion to short version of f 
    end try 
    if theVersion is missing value then 
     try 
      set f to first file of folder pluginsUserFolder whose name is pluginName 
      set theVersion to short version of f 
     end try 
    end if 
end tell 

if theVersion is missing value then 
    display dialog pluginName & " is not installed!" 
else 
    display dialog pluginName & " is installed!" & return & "Version: " & theVersion 
end if 
+0

감사합니다.이 내 문제를 해결했습니다. –

0

충격파 플래시 플러그인이 브라우저에 설치된 플러그인의 목록을 찾을 코드의 아래 부분을 실행하는 브라우저에 설치됩니다

플래시 플레이어가 당신이 확인할 수 있습니다뿐만 아니라 시스템에 설치됩니다 어도비
for(var i = 0; navigator.plugins[ i ]; ++i) { 
     if(navigator.plugins[ i ].name.toLowerCase().indexOf(name) > -1) 
     console.log(navigator.plugins[ i ].name); 
    } 

당신의 시스템에 설치된 프로그램

+0

고맙습니다.이 덕분에 –

관련 문제