5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

macでlineアプリの起動とログイン

Last updated at Posted at 2017-03-23

概要

Macでlineアプリを起動させるときに,毎回パスワード入力がめんどくさいのとよく間違うので
一発でできるようにしました.

記載したスクリプトをline.jsっていうファイルに保存して

osascript -l JavaScript line.js

ってやれば動きます.

あと,セキュリティとプライバシーの設定で,lineのアプリにコンピュータ制御を許可しておく必要があります.

var app = Application('LINE');
app.activate();

delay(1);

var ui = Application("System Events").processes[app.name()];

var mail     = ui.uiElements()[0].uiElements()[0];
var password = ui.uiElements()[0].uiElements()[1];

mail.value = "*******" // mail adress
password.value = "*****"; // password

delay(1);

Application('System Events').keyCode(36);

課題

ログインボタンをクリックっていうのをしたかったんだけど,uiElementsとかで見つけられなかったので,最後の方で改行コードでログインするようにしてます.

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?