1
3

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.

AutoItで簡単なRPA ~毎日開いているサイトを開く~

Posted at

AutoItでRPA ~毎日開いているサイトを開く~

AutoItというフリーのツールを使う機会があったので、RPAという程大げさなものでもない(日一回の単純な動作程度なので)ですが記事投稿してみます。
私の場合、PCを起動した後毎回同じサイトを開くことが多いので指定したWebサイトを開くだけの簡単作業を、AutoItを使って自動化してみます。

目的

指定したWebサイトを自動で開く

やり方

今回は3つのWebサイトを開きます。その際に一つ目のWebサイトが開けたら、二つ目以降のWebサイトは同じウィンドウで開くこととします。

上記を実現するためのAutoItのコードとしては、IEを操作するライブラリをインポートし、_IECreateで一つ目のURLを開いた後、そのインスタンスで他のURLを開くような形になります。

サンプルコード

# include <IE.au3>
Const $navOpenInNewTab = 0x0800

; 一つ目のURLを開く
Dim $oIE = _IECreate('https://www.google.co.jp/')
; 二つ目以降のURLを開く
__IENavigate($oIE, 'https://qiita.com/trend', 0,$navOpenInNewTab)
__IENavigate($oIE, 'https://mail.google.com/mail', 0, $navOpenInNewTab)

Exit 0

Webサイトを開くだけなら上記コードの10行程度で簡単にできました。

1
3
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
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?