Archive for the 'Vivaldi' Category

2015/03/09 パワーユーザー向けWebブラウザ「Vivaldi」をコントロール

vi1.png

I had several trial to control Vivaldi freeware web browser (Technology Preview version 2) from AppleScript. I found it scriptable and has a Chromium based AppleScript dictionary. Almost of functions work, but some functions does not work (ex. enter presentation mode/exit presentation mode). Yes, this is just a Technical Preview, not a release version.

フリーのWebブラウザ「Vivaldi」(テクノロジープレビュー2版)がAppleScriptに対応していることを見つけたので、いろいろ試してみました。

vi2.png

ChromiumベースのAppleScript用語辞書を備えていますが、まだフルスクリーンモードを呼び出せないとか、機能的に不完全な印象です(Technology Preview版なので当然、、、)。全体的に、動作が軽快な印象を受けます。

AppleScript名:Vivaldiにアクセス実験
tell application “Vivaldi”
  activate
  
set dCount to count every window
  
  
tell window 1
    properties
    
–> {zoomable:true, closeable:true, zoomed:false, active tab index:1, class:window, index:1, visible:true, name:”Vivaldi”, miniaturizable:true, mode:”normal”, active tab:tab id 2 of window id 1, id:1, miniaturized:false, resizable:true, bounds:{38, 25, 940, 1158}, presenting:false}
    
    
– window’s mode :normal / incognito
    
    
tell active tab
      properties
      
–> {URL:”http://piyocast.com/as/”, name:”AS Hole(AppleScriptの穴) By Piyomaru Software”, loading:false, class:tab, id:2}
      
      
view source
      
    end tell
  end tell
  
enter presentation mode
end tell

★Click Here to Open This Script 

AppleScript名:Vivaldiで本文すべてコピー(テキスト)
tell application “Vivaldi”
  tell window 1
    tell active tab
      select all
      
copy selection
    end tell
  end tell
end tell

the clipboard

★Click Here to Open This Script 

AppleScript名:VivaldiでBookmark itemにアクセス
tell application “Vivaldi”
  properties of bookmark folders
  
–> {{name:”その他のブックマーク”, class:bookmark folder, id:2, index:2}, {name:”ブックマーク バー”, class:bookmark folder, id:1, index:1}}
  
set bCount to count every bookmark folder
  
  
repeat with i from 1 to bCount
    tell bookmark folder i
      set bList to every bookmark item
    end tell
  end repeat
end tell

★Click Here to Open This Script