Specifications:
Firefox 38.0.6, imacros 8.9.7, Windows 10 64-bit OS
What my script does:
My code that I specify here is part that adds a comment on a YouTube video.
Issue:
I'm trying to make it type out the comments as rows, so one column from comment text file will add to each video. I'm encountering an issue where the script only types out the first column, and doesn't type out other columns inside of the comment box on the YouTube videos.
Can someone help me?
var Comment = "";
Comment += "CODE:" + "\n";
Comment += "SET !ERRORIGNORE YES" + "\n";
Comment += "SET !TIMEOUT_PAGE 5" + "\n";
Comment += "SET !TIMEOUT_STEP 0" + "\n";
Comment += "SET !DATASOURCE Comments.txt" + "\n";
Comment += "SET !DATASOURCE_COLUMNS 1" + "\n";
Comment += "SET !ERRORIGNORE YES" + "\n";
Comment += "SET !LOOP 1" + "\n";
Comment += "SET !DATASOURCE_LINE {{!LOOP}}" + "\n";
Comment += "WAIT SECONDS=1" + "\n";
Comment += "EVENT TYPE=CLICK SELECTOR=\"#contenteditable-root\" BUTTON=0" + "\n";
Comment += "EVENTS TYPE=KEYPRESS SELECTOR=\"#contenteditable-root\" CHARS={{!COL1}}" + "\n";
Comment += "WAIT SECONDS=2" + "\n";
Comment += "TAG POS=3 TYPE=TP-YT-PAPER-BUTTON ATTR=ID:button" + "\n";
Comment += "WAIT SECONDS=3" + "\n";
Yep normal, !LOOP can only be =1 in your Script..., even if you have a for Loop, (Part of your Script not posted how you use iimPlay()...), your 'on-the-fly' generated Script gets re-interpreted/re-constructed/re-generated again and again from scratch upon every single Loop...
You need to implement your own Looping Mechanism when using a '.js' Script, (=> also for the !DATASOURCE_LINE Command), you cannot use the Built-in one with `!LOOP' which is meant to be used with "native" (= "not 'on-the-fly' generated") '.iim' Scripts...