th_wolfgang
New member
Hallo,
ich habe ein JavaScript von einem iMacrocode erstellt. Das funktioniert soweit. Leider wird der file (externe exe) nur einmal Ausgeführt wenn Sich der Vorgang im Loop wiederholt. Beim 1. Loop funktioniert der Aufruf dieser exe, beim 2. / 3. … Loop wird das macro ausgeführt ohne aber meine (exe / file)
Hat hier jemand eine Idee?!
Auszug aus meinem Script: (Bold was nur einmal funktioniert im Loop)
Danke & LG
Wolf
ich habe ein JavaScript von einem iMacrocode erstellt. Das funktioniert soweit. Leider wird der file (externe exe) nur einmal Ausgeführt wenn Sich der Vorgang im Loop wiederholt. Beim 1. Loop funktioniert der Aufruf dieser exe, beim 2. / 3. … Loop wird das macro ausgeführt ohne aber meine (exe / file)
Hat hier jemand eine Idee?!
Auszug aus meinem Script: (Bold was nur einmal funktioniert im Loop)
Code:
var retcode,errtext,macro,file;
var macro = "CODE:";
[B]var file = Components.classes["@mozilla.org/file/local;1"] .createInstance(Components.interfaces.nsILocalFile); file.initWithPath("C:\\MACROS TEST1\\170710-152413.exe"); file.launch();[/B]
macro += "WAIT SECONDS=30" + "\n";
macro += "SET !ERRORIGNORE YES" + "\n";
macro += "SET !TIMEOUT_STEP 1" + "\n";
macro += "SET !DATASOURCE Mappe1.csv" + "\n";
macro += "SET LOCATION 0" + "\n";
macro += "SET !EXTRACT_TEST_POPUP NO" + "\n";
macro += "SET !LOOP 1" + "\n";
// macro += "SET !DATASOURCE_COLUMNS 13
macro += "SET !DATASOURCE_LINE {{!LOOP}}" + "\n";
macro += "" + "\n";
macro += "URL GOTO=https://meine-Seite.de" + "\n";
macro += "" + "\n";
macro += "SET !DATASOURCE_LINE {{!LOOP}}" + "\n";
macro += "SET !VAR1 EVAL(\"var randomNumber=Math.floor(Math.random()*400 + 1); randomNumber;\")" + "\n";
macro += "SET !DATASOURCE_LINE {{!VAR1}} " + "\n";
macro += "SET !CLIPBOARD {{!col7}}" + "\n";
macro += "EVENTS TYPE=KEYPRESS SELECTOR=\"HTML>BODY>DIV>DIV>DIV>DIV>FORM>DIV>DIV>DIV>INPUT\" CHARS=\"v\" MODIFIERS=\"ctrl\"" + "\n";
macro += "" + "\n";
macro += "SET !CLIPBOARD {{!col1}}" + "\n";
macro += "EVENTS TYPE=KEYPRESS SELECTOR=\"HTML>BODY>DIV>DIV>DIV>DIV>FORM>DIV:nth-of-type(2)>DIV>DIV>INPUT\" CHARS=\"v\" MODIFIERS=\"ctrl\"" + "\n";
macro += "" + "\n";
macro += "EVENT TYPE=CLICK SELECTOR=\"HTML>BODY>DIV>DIV>DIV>DIV>FORM>DIV:nth-of-type(3)>DIV>DIV>BUTTON\" BUTTON=0" + "\n";
macro += "" + "\n";
macro += "'POPUP BEENDEN " + "\n";
macro += "'EVENT TYPE=CLICK SELECTOR=\"HTML>BODY>DIV:nth-of-type(2)>DIV>DIV>DIV>A\" BUTTON=0" + "\n";
macro += "'WAIT SECONDS=5" + "\n";
macro += "TAB CLOSE" + "\n";
macro += "REFRESH" + "\n";
macro += "" + "\n";
macro += "EVENTS TYPE=KEYPRESS SELECTOR=\"HTML>BODY>DIV>SECTION>SECTION>SECTION>SECTION>FORM>FIELDSET>DIV:nth-of-type(2)>DIV>TEXTAREA\" KEYS=\"[46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46,46]\"" + "\n";
macro += "" + "\n";
macro += "SET !CLIPBOARD {{!col8}}" + "\n";
macro += "EVENTS TYPE=KEYPRESS SELECTOR=\"HTML>BODY>DIV>SECTION>SECTION>SECTION>SECTION>FORM>FIELDSET>DIV:nth-of-type(2)>DIV>TEXTAREA\" CHARS=\"v\" MODIFIERS=\"ctrl\"" + "\n";
for(i=1;i<= 400 ; i++)
{
iimSet("loop", i);
iimPlay(macro);
}
Danke & LG
Wolf