« [edgemac] URL list tab index | トップページ | [NSPasteboard]ペーストボード内が画像ならファイルに保存する »

[edgemac] bookmark

【スクリプトエディタで開く】

#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
#
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.8"
use framework "Foundation"
use scripting additions


###起動
tell application id "com.microsoft.edgemac" to launch




###アプリケーションの起動待ち最大10秒
repeat 10 times
  tell application id "com.microsoft.edgemac"
    activate
    set boolFrontMost to frontmost as boolean
  end tell
  if boolFrontMost is true then
    log "起動OK"
    exit repeat
  else
    delay 1
  end if
end repeat


####開くURL
set strURL to "edge://favorites/" as text
###ウィンドウの有無
tell application id "com.microsoft.edgemac"
  set numCntWindow to (count of window) as integer
end tell
####URLを開く
if numCntWindow = 0 then
  ###ウィンドウが無い場合は新規ウィンドウでURLをロード
  tell application id "com.microsoft.edgemac"
    make new window
    tell front window
      tell active tab
        set URL to strURL
      end tell
    end tell
  end tell
else
  ###ウィンドウがある場合は新規タブでURLをロード
  tell application id "com.microsoft.edgemac"
    tell front window
      make new tab with properties {URL:strURL}
    end tell
  end tell
end if



###URl読み込み確認最大10秒
repeat 10 times
  tell application id "com.microsoft.edgemac"
    tell front window
      tell active tab
        set boolLoading to loading as boolean
      end tell
    end tell
  end tell
  if boolLoading is false then
    log "URL読み込み完了"
    exit repeat
  else
    delay 1
  end if
end repeat



tell application id "com.microsoft.edgemac"
  properties
  set listBookMarkFolder to every bookmark folder
end tell


repeat with itemBookMarkFolder in listBookMarkFolder
  tell application id "com.microsoft.edgemac"
    tell itemBookMarkFolder
      log title as text
      set listBookMarkItem to every bookmark item as list
      repeat with itemBookMarkItem in listBookMarkItem
        tell itemBookMarkItem
          log title as text
          log URL as text
        end tell
      end repeat
    end tell
  end tell
end repeat



|

« [edgemac] URL list tab index | トップページ | [NSPasteboard]ペーストボード内が画像ならファイルに保存する »

Microsoft Edge」カテゴリの記事