Skip to content Skip to sidebar Skip to footer

Regular IMacros Transform Into JavaScript But Still Not Work

I do not understand iMacros, and beginners. Actually there are regular iMacro script is working properly, but I want to make into JavaScript as needed can be looping up to 17 pages

Solution 1:

If you "do not understand iMacros", I wouldn't advise to apply the JavaScript Scripting Interface so far. Below is the code that imitates nested loops to some extent. It must be played in usual (not loop) mode. I've noticed the possibility to adjust this pattern to you working iim-code. Try to do that.

SET numPages 17
SET numPosts 10

SET startLoop 1
SET maxLoop EVAL({{numPages}}*{{numPosts}})
SET !LOOP EVAL(1-{{maxLoop}}+{{startLoop}})
SET normLoop EVAL({{!LOOP}}+{{maxLoop}}-1)

SET curPage EVAL(~~(({{normLoop}}-1)/{{numPosts}})+1)
SET curPost EVAL({{normLoop}}%{{numPosts}}==0?{{numPosts}}:{{normLoop}}%{{numPosts}})

' do something according to the {{curPage}} and {{curPost}} values '

Solution 2:


Post a Comment for "Regular IMacros Transform Into JavaScript But Still Not Work"