using System; using System.Drawing; using Arp.Prova.PlayLib; // Internet Explorerをタスクバーにピン留めする // CodeClass public class CodeClass { public static int CodeStart() { // IEの実行ファイルがあるフォルダをexplorerで開く PlayLib.ProcessStart("explorer", @"C:\Program Files\Internet Explorer"); // フォルダが開くのを待つ if (PlayLib.WaitWindow("Internet Explorer", true)) { // IEの実行ファイルを選択状態にする PlayLib.Window("Internet Explorer").Input("iexplorer"); PlayLib.Sleep(1500); // Alt入力 PlayLib.Window("Internet Explorer").Input("{Alt}"); PlayLib.Sleep(1500); // ファイルメニューの[管理]タブを選択 PlayLib.Window("Internet Explorer").Input("JA"); PlayLib.Sleep(2000); // [タスクバーにピン留め]を選択 PlayLib.Window("Internet Explorer").Input("B"); PlayLib.Sleep(1500); // explorerのウインドウを閉じる PlayLib.Window("Internet Explorer").Close(); } return 0; } }