1
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

posted at

iMacroでさくっとスクリーンショットを取る

とあるサイトのスクリーンショットを取る必要があったのでFireFoxのiMacroというアドオンで対処することのした。

他でも活用する機会もあるかと思うのでメモしておく。
iMacroのDownloadフォルダにスクリーンショットが保存される。
デフォルトだとC:\Users\<username>\Documents\iMacros\Downloads

var pages  = ["page01", "page02", "page03"];
var site = "http://test.website.com/";

pages.forEach(function(e){
    var url = site + e;
    var png = e + ".png";

    var macro = `CODE:
    VERSION BUILD=8970419 RECORDER=FX
    SET !ERRORIGNORE YES
    TAB T=1
    URL GOTO=${url}
    SAVEAS TYPE=PNG FOLDER=* FILE="${png}"
    `;
    iimPlay(macro);

    return ;

});

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Sign upLogin
1
Help us understand the problem. What are the problem?