รบกวนถามอีกรอบครับคุณ ball6847
คือผมลองนำโค๊ดไปใส่ใน imacro และบันทึกเป็น นามสกุล .iim
จากโค๊ดนี้
(function(){
var saveto = imns.Pref.getFilePref('defdatapath');
saveto.append('data.csv');
var style01 = window.content.document.getElementsByClassName('style01');
for (var i=0; i<style01.length; i++) {
var a = style01[i].getElementsByTagName('a');
if (a.length) {
var url = a[0].outerHTML.match(/window\.open\(['"](.*?)['"]\)/);
if (url){
imns.FIO.appendTextFile(saveto, url[1]+'\n');
}
}
}
})();
ผมได้จับใส่ imacro ได้ ตามนี้
URL GOTO=javascript:function<SP>copyurljs{var<SP>saveto<SP>=<SP>imns.Pref.getFilePref("D:/");saveto.append("data.csv");var<SP>style01<SP>=<SP>window.content.document.getElementsByClassName("style01");for<SP>(var<SP>i=0;<SP>i<style01.length;<SP>i++)<SP>{var<SP>a<SP>=<SP>style01.getElementsByTagName("a");if<SP>(a.length)<SP>{var<SP>url<SP>=<SP>a[0].outerHTML.match(/window\.open\([""](.*?)[""]\)/);if<SP>(url){imns.FIO.appendTextFile(saveto,<SP>url[1]+"\n");}}}}void(0);
URL GOTO=javascript:copyurljs();void(0);
แต่พอรัน แล้วไม่ขึ้นอะไรเลย csv ใน ไดร์ d มันไม่สร้างให้ และก็ไม่มี error อะไรขึ้นเลยครับ ไม่ทราบว่าต้องแก้ตรงใหน หรือว่าต้องเรียกใช้ฟังค์ชั่นยังไงครับ รบกวนด้วยครับ
