อ่ะลองไปประยุกต์เอาครับ เขียนกากๆแบบมุดน้ำให้เลย 555
เซฟ เป็น .js นะครับ
var nL = "\n";
var start = 1;
var maxLoop = 3;
var dataPath = "I:\\xampp\\htdocs\\app_imacro\\data.csv"; //ที่อยู่ไฟล์
var fbpage = "https://www.facebook.com/pages/xxxxxx"; //Facebook Fanpage
var macro = "CODE:" + nL;
macro += "VERSION BUILD=8881205 RECORDER=FX" + nL;
macro += "SET !EXTRACT_TEST_POPUP NO" + nL;
macro += "SET !ERRORIGNORE YES" + nL;
macro += "SET !ERRORCONTINUE YES" + nL;
macro += "CMDLINE !DATASOURCE {{file}}" + nL;
macro += "SET !DATASOURCE_COLUMNS 4" + nL;
macro += "SET !LOOP 1" + nL;
macro += "SET !DATASOURCE_LINE {{i}}" + nL;
macro += "TAB T=1" + nL;
macro += "URL GOTO={{fanpage}}" + nL;
macro += "TAG POS=1 TYPE=TEXTAREA FORM=rel:* ATTR=ID:* CONTENT={{!COL1}}" + nL;
macro += "EVENT TYPE=CLICK SELECTOR=HTML>BODY>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV:nth-of-type(3)>DIV>DIV>DIV>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV:nth-of-type(2)>FORM>DIV>DIV:nth-of-type(7)>DIV>UL>LI:nth-of-type(2)>DIV>DIV:nth-of-type(2)>DIV>A BUTTON=0" + nL;
macro += "WAIT SECONDS=1" + nL;
macro += "TAG POS=2 TYPE=A ATTR=ROLE:menuitem" + nL;
macro += "TAG POS=1 TYPE=I ATTR=data-reactid:*.1.1.0.0.0" + nL;
macro += "TAG POS=1 TYPE=SPAN ATTR=data-reactid:*SE<SP>Asia<SP>Standard<SP>Time).0&&TXT:{{!COL2}}" + nL;
macro += "WAIT SECONDS=5" + nL;
var loop = start;
do {
iimSet("i", loop);
iimSet("file", dataPath);
iimSet("fanpage", fbpage);
iimPlay(macro);
var post = "CODE:";
post += "TAG POS=1 TYPE=BUTTON ATTR=CLASS:layerConfirm*" + nL;
post += "WAIT SECONDS=5" + nL;
iimPlay(post);
loop++;
} while (loop <= maxLoop);
ปล. ข้อมูล csv
"ข้อความที่จะโพส","วันที่"
"awwwwwwfffagsdafdsadvc","10"
"dsfsdgfdfsgfdsgfsdhg","11"
"dsfsdgfdfsgfdsgfsssssdhg","12"