Ich möchte in iMacros etwas scripten, aber ich kann nicht herausfinden, wie ihre Schleifenstruktur funktioniert. Normalerweise haben Sie in einer Schleife eine Art von Bewertung, vielleicht eine Art von Zählung und klare Start- und Stoppindikatoren im Code. Ich weiß nicht, wie Loops in iMacros funktionieren. Ich habe noch nie zuvor in iMacros gearbeitet, und obwohl sie viele Sachen online veröffentlicht haben, ist es schwierig, vollständige, aktuelle und relevante Informationen zu finden. Ich habe ein paar relevante Links gefunden, aber keinen Anfängerleitfaden, der ihre Syntax erklärt. Zum Beispiel ist eines ihrer Tutorial-Videos vor 6 Versionen und hat ein anderes Branding.Wie funktionieren Schleifen in iMacros?
Ich habe die example for loops gefunden, und es hilft mir nicht zu verstehen, wie sie funktionieren. Wenn ich die iMacros-Syntax schon verstanden hätte, würde es wahrscheinlich helfen, aber das ist ein Haken 22.
Ich habe ein paar So-Beiträge gesehen, die eine Art "Play Loop" -Schaltfläche erwähnen, die ich in der Auswertung nicht habe Ausführung. Ist das noch eine Sache?
-Code von Beispielseite:
VERSION BUILD=10.4.28.1074
'Uses a Windows script to submit several datasets to a website, e. g. for filling an online database
TAB T=1
TAB CLOSEALLOTHERS
' Specify input file (if !COL variables are used, IIM automatically assume a CSV format of the input file
'CSV = Comma Separated Values in each line of the file
SET !DATASOURCE Address.csv
'Start at line 2 to skip the header in the file
SET !LOOP 2
'Increase the current position in the file with each loop
SET !DATASOURCE_LINE {{!LOOP}}
' Fill web form
URL GOTO=http://demo.imacros.net/Automate/AutoDataEntry
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:fname CONTENT={{!COL1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:lname CONTENT={{!COL2}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:address CONTENT={{!COL3}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:city CONTENT={{!COL4}}
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:zip CONTENT={{!COL5}}
'
'Note * is used to ignore leading and trailing blanks that could be in the input data
'
'The precent (%) symbol is used to select the stateid by VALUE as defined in the website select statement and not by its index.
TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:state CONTENT=$*{{!COL6}}*
'
'The string ($) symbol is used to select the country by TEXT, not by its index.
'Index would be the position of an entry in the combo box list, e. g. 161 for United States
TAG POS=1 TYPE=SELECT FORM=ID:demo ATTR=NAME:country CONTENT=$*{{!COL7}}*
'
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:demo ATTR=NAME:email CONTENT={{!COL8}}
TAG POS=1 TYPE=BUTTON:submit FORM=ID:demo ATTR=TXT:Submit
TAG POS=1 TYPE=A ATTR=TXT:*Back*