我的脚本出现了小问题。我花了五个小时,但我不知道如何修复我的代码。
我有标签索引的问题。所以我在javascript循环中打开新选项卡,并为文件中的执行url设置url goto命令。
不幸的是,遗憾的是,出现了关于空白的空白页面。此外,TAB T = n命令停止工作。打开三张卡,TAB T = 3命令不会进入此卡。如何解决?
var closeTabs = "CODE:";
closeTabs += "TAB CLOSEALLOTHERS" + "\n";
iimPlay(closeTabs);
for (id = 1; id <= 1; id++) {
var load = "CODE:";
load += "SET !DATASOURCE C:\\Users\\WWW\\Desktop\\xxx\\accounts.txt" + "\n";
load += "SET !DATASOURCE_COLUMNS 1" + "\n";
load += "SET !DATASOURCE_LINE "+id+"" + "\n";
load += "SET !EXTRACT_TEST_POPUP NO" + "\n";
load += "SET !EXTRACT {{!COL1}}" + "\n";
iimPlay(load);
var account = iimGetLastExtract(0);
var setUrl = "CODE:";
setUrl += "TAB T=1" + "\n";
setUrl += "URL GOTO="+account+"" + "\n";
setUrl += "WAIT SECONDS=2" + "\n";
iimPlay(setUrl);
for(link = 1; link <= 3; link++) {
var ytSource = "CODE:";
ytSource += "SET !DATASOURCE C:\\Users\\WWW\\Desktop\\xxx\\sources.txt" + "\n";
ytSource += "SET !DATASOURCE_COLUMNS 1" + "\n";
ytSource += "SET !DATASOURCE_LINE "+link+"" + "\n";
ytSource += "SET !EXTRACT_TEST_POPUP NO" + "\n";
ytSource += "SET !EXTRACT {{!COL1}}" + "\n";
iimPlay(ytSource);
var source = iimGetLastExtract(0);
var openTab = "CODE:";
openTab += "TAB OPEN" + "\n";
openTab += "TAB T="+link+"" + "\n";
openTab += "URL GOTO="+source+"" + "\n";
openTab += "WAIT SECONDS=1" + "\n";
openTab += "TAG POS=1 TYPE=BUTTON:SUBMIT ATTR=CLASS:ytp-play-button<SP>ytp-button" + "\n";
openTab += "WAIT SECONDS=1" + "\n";
iimPlay(openTab);
}
}