Problem to fill a form with same IDs and dynamic CONTENT
Forum rules
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
iMacros EOL - Attention!
The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.
Thank you again for your business and support.
Sincerely,
The Progress Team
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Problem to fill a form with same IDs and dynamic CONTENT
Browser: Mozilla Firefox 55.0.3 (64 bit)
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
________________________________________________________________________________________________-
I've this HTML
<<form id="container" action="/index.php?r=friz/answer&language=it" method="post"><input value="XXXXXXXXXXXXXXXXXXXxx==" name="_csrf" id="_csrf" type="hidden"><fieldset>
<header>
<h1><span class="containerid">19. </span>COME MI CHIAMO?</h1>
</header>
<div class="answerinput error required">
<input class="focusme" name="answer[]" autocomplete="off" type="text"> </div>
<div class="center hidden" id="correctAnswer">
<p class="correct"><span class="successcheck"></span></p>
</div>
<div class="center">
<input value="next question >" type="submit">
</div>
</fieldset></form>
I want obtain that: if this code contains the word "CHIAMO", then input the word "OK" (in the form) and press submit, else do nothing.
I tried with imacros, but I'm not good with javascript, anyone can help me? Thanks.
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
________________________________________________________________________________________________-
I've this HTML
<<form id="container" action="/index.php?r=friz/answer&language=it" method="post"><input value="XXXXXXXXXXXXXXXXXXXxx==" name="_csrf" id="_csrf" type="hidden"><fieldset>
<header>
<h1><span class="containerid">19. </span>COME MI CHIAMO?</h1>
</header>
<div class="answerinput error required">
<input class="focusme" name="answer[]" autocomplete="off" type="text"> </div>
<div class="center hidden" id="correctAnswer">
<p class="correct"><span class="successcheck"></span></p>
</div>
<div class="center">
<input value="next question >" type="submit">
</div>
</fieldset></form>
I want obtain that: if this code contains the word "CHIAMO", then input the word "OK" (in the form) and press submit, else do nothing.
I tried with imacros, but I'm not good with javascript, anyone can help me? Thanks.
Last edited by percios on Fri Sep 22, 2017 2:00 pm, edited 2 times in total.
Browser: Mozilla Firefox 55.0.3 (64 bit)
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Re: javascript on imacros help
Oh!, good, FCI mentioned in this Thread, even if OS is missing, you should mention it as well in your 1st Thread, then I might reply...percios wrote:________________________________________________________________________________________________-Code: Select all
Browser: Mozilla Firefox 55.0.3 (64 bit) Imacros version:VERSION BUILD=9030808
I've this HTML
I want obtain that: if this code contains the word "CHIAMO", then input the word "OK" (in the form) and press submit, else do nothing.Code: Select all
<<form id="container" action="/index.php?r=friz/answer&language=it" method="post"><input value="XXXXXXXXXXXXXXXXXXXxx==" name="_csrf" id="_csrf" type="hidden"><fieldset> <header> <h1><span class="containerid">19. </span>COME MI CHIAMO?</h1> </header> <div class="answerinput error required"> <input class="focusme" name="answer[]" autocomplete="off" type="text"> </div> <div class="center hidden" id="correctAnswer"> <p class="correct"><span class="successcheck"></span></p> </div> <div class="center"> <input value="next question >" type="submit"> </div> </fieldset></form>
I tried with imacros, but I'm not good with javascript, anyone can help me? Thanks.
For your Qt, you don't need any JavaScript, simply use Relative Positioning...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: javascript on imacros help
Oh, sorry! I use Microsoft Windows 10 Pro 64 bit
Browser: Mozilla Firefox 55.0.3 (64 bit)
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Re: javascript on imacros help
OK, good, quick Learner..!percios wrote:Oh, sorry! I use Microsoft Windows 10 Pro 64 bit
=> FCI:
Code: Select all
iMacros for FF v9.0.3, FF v55.0.3, Win10-Pro_x64.
(Second time I'm asking, I normally only help Users using the Forum "a bit correctly", I only reacted to this 2nd Thread of yours because the "Quality" already improved a lot, compared to the 1st one...), and that means for all their Threads:
FCI mentioned + correct Follow-up + trying their best and really getting stuck..., ah-ah...!
Hum, and "Descriptive Thread Title" (in the correct Sub-Forum of course), I realize only now that your Thread Title is a bit "useless", as maybe 70% of all Threads in the FF Sub-Forum are about "JavaScript" (which is the only Descriptive Term, as of course 100% of all Threads on the Forum are about 'iMacros" + "Help", tja...!), hum, not very helpful to search the Forum then I would think...!?
>>>
But OK, anyway, did you understand the "Path"/Solution I meant with "Relative Positioning"...?
=> Post your final Script then, to make this Thread a bit useful for other Users as well, even if the Thread Title is not very "appealing" (because way too vague) for other Users to check its Content, ah-ah...!
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: javascript on imacros help
Code: Select all
SET !ERRORIGNORE NO
SET !TIMEOUT_PAGE 1
TAG POS=1 TYPE=H1 ATTR=TXT:*CHIAMO*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=OK
SET !TIMEOUT_PAGE 20
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
Available for custom iim, javascript iMacros scripts
Re: javascript on imacros help
Exact, the code is ok, but the problem is that there are different forms like this and each time (it is a questionnaire), even if the answers to be compiled are the same, the order of question is always different, this code don't work because change the order of the questions and therefore of the answers.techimac wrote:if you have more things to do in same script then this logic won't workCode: Select all
SET !ERRORIGNORE NO SET !TIMEOUT_PAGE 1 TAG POS=1 TYPE=H1 ATTR=TXT:*CHIAMO* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=OK SET !TIMEOUT_PAGE 20 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
Example: if i reg the macro I get this:
[...]
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Blue
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Red
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Green
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Yellow
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
[...]
If I retry, the next time iI'll get this:
[...]
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Red
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Yellow
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Blue
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Green
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
[...]
How do I distinguish between questions and answers?
Sorry for my english but it's not my native language.
Browser: Mozilla Firefox 55.0.3 (64 bit)
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Re: javascript on imacros help
chivracq wrote:OK, good, quick Learner..!percios wrote:Oh, sorry! I use Microsoft Windows 10 Pro 64 bit
=> FCI:OK, perfect, but hum, still missing in your previous Thread..., grrr...Code: Select all
iMacros for FF v9.0.3, FF v55.0.3, Win10-Pro_x64.
(Second time I'm asking, I normally only help Users using the Forum "a bit correctly", I only reacted to this 2nd Thread of yours because the "Quality" already improved a lot, compared to the 1st one...), and that means for all their Threads:
FCI mentioned + correct Follow-up + trying their best and really getting stuck..., ah-ah...!
Hum, and "Descriptive Thread Title" (in the correct Sub-Forum of course), I realize only now that your Thread Title is a bit "useless", as maybe 70% of all Threads in the FF Sub-Forum are about "JavaScript" (which is the only Descriptive Term, as of course 100% of all Threads on the Forum are about 'iMacros" + "Help", tja...!), hum, not very helpful to search the Forum then I would think...!?
>>>
But OK, anyway, did you understand the "Path"/Solution I meant with "Relative Positioning"...?
=> Post your final Script then, to make this Thread a bit useful for other Users as well, even if the Thread Title is not very "appealing" (because way too vague) for other Users to check its Content, ah-ah...!
Ok, sorry for all, I don't speak well english and I use google translate to help me
I deleted the previous post because i'm using this.
I don't understand the "Path" solution
I'll try to change in better the title.
Browser: Mozilla Firefox 55.0.3 (64 bit)
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Re: Problem to fill a form with same IDs and dynamic CONTENT
send form url
Available for custom iim, javascript iMacros scripts
Re: javascript on imacros help
Yep, normal, that's why I mentioned using Relative Positioning for the "Conditional Logic"... as this is probably the simplest way to go...percios wrote:Exact, the code is ok, but the problem is that there are different forms like this and each time (it is a questionnaire), even if the answers to be compiled are the same, the order of question is always different, this code don't work because change the order of the questions and therefore of the answers.techimac wrote:if you have more things to do in same script then this logic won't workCode: Select all
SET !ERRORIGNORE NO SET !TIMEOUT_PAGE 1 TAG POS=1 TYPE=H1 ATTR=TXT:*CHIAMO* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=OK SET !TIMEOUT_PAGE 20 TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
Example: if i reg the macro I get this:If I retry, the next time iI'll get this:Code: Select all
[...] TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Blue TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Red TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Green TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Yellow TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=* [...]
How do I distinguish between questions and answers?Code: Select all
[...] TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Red TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Yellow TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Blue TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=* TAG POS=1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=Green TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=* [...]
Sorry for my english but it's not my native language.
Yeah you don't need Google Translate to understand to mention your FCI...percios wrote:Ok, sorry for all, I don't speak well english and I use google translate to help me
I deleted the previous post because i'm using this.
I don't understand the "Path" solution
I'll try to change in better the title.
And hum, deleting a Thread is not exactly "using the Forum correctly", but OK never mind, I see now how the 2 Threads are indeed related...
You don't understand the "Path"/Solution, well, then simply check the Documentation or search the Forum for Examples about "Relative Positioning"... But OK, you found Advanced User @techimac ready to write your Script and to help you, then I guess you are in "good hands", ah-ah...!
(I don't write Scripts for other Users, I let you find the Solution by yourself, which is more "Educative" I think, but other (Advanced) Users prefer to write your Script directly, OK, fair enough, but then I'm out... Good luck...)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Problem to fill a form with same IDs and dynamic CONTENT
Click question and then use relative positioning TAG command like this
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=<ANSWER>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=R1
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=<ANSWER>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=R1
Available for custom iim, javascript iMacros scripts
Re: Problem to fill a form with same IDs and dynamic CONTENT
Sure! https://www.onlinequizcreator.com/index ... anguage=ittechimac wrote:send form url
This is my macro:
Code: Select all
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=https://www.onlinequizcreator.com/index.php?r=quiz/quiz&language=it
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Green
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Violet
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Yellow
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Red
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
P.S.
Q&A
Fanfoni=Blue
Nansoni=Red
Tandani=Green
Pataroti=Yellow
Preteresi=Violet
Browser: Mozilla Firefox 55.0.3 (64 bit)
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Re: Problem to fill a form with same IDs and dynamic CONTENT
I registering new macro, clicked on the title of question , changing TAG POS=R1 only in the rows like this (TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=<ANSWER>) but does not work, not respect the casua order.techimac wrote:Click question and then use relative positioning TAG command like this
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=<ANSWER>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=R1
Code: Select all
VERSION BUILD=9030808 RECORDER=FX
SET !ERRORIGNORE YES
SET !REPLAYSPEED FAST
SET !TIMEOUT_STEP 4
TAG POS=1 TYPE=H1 ATTR=TXT:1.<SP>Come<SP>si<SP>chiamano<SP>i<SP>Fanfoni
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:2.<SP>Come<SP>si<SP>chiamano<SP>i<SP>Patarioti?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Yellow
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:3.<SP>Come<SP>si<SP>chiamano<SP>i<SP>Nansoni?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Red
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:4.<SP>Come<SP>si<SP>chiamano<SP>i<SP>Tandani?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Green
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:5.<SP>Come<SP>si<SP>chiamano<SP>i<SP>Preteresi?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Violet
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
Browser: Mozilla Firefox 55.0.3 (64 bit)
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Re: Problem to fill a form with same IDs and dynamic CONTENT
Manually open URL and wait for question to appear
then run this script in loop of 5
then run this script in loop of 5
Code: Select all
SET !TIMEOUT_PAGE 1
SET !ERRORIGNORE YES
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Fanfoni
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Patarioti?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Yellow
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Nansoni?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Red
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Tandani?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Green
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Preteresi?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Violet
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
WAIT SECONDS=5
Available for custom iim, javascript iMacros scripts
Re: Problem to fill a form with same IDs and dynamic CONTENT
Oh...!, very good Ladies..!!!, I finally see some Relative Positioning in the Posts, eh-eh, finally...!!!!, ah-ah...!!
(Me solving a Thread = 1 or 2 Replies normally..., if FCI mentioned of course...!)
(But euh if @techimach answering, yep always interesting, usually takes 2 pages, ah-ah...! )
=> I'll just be following the Thread, enjoy yourself, ah-ah...!
(Me solving a Thread = 1 or 2 Replies normally..., if FCI mentioned of course...!)
(But euh if @techimach answering, yep always interesting, usually takes 2 pages, ah-ah...! )
=> I'll just be following the Thread, enjoy yourself, ah-ah...!
techimac wrote:Click question and then use relative positioning TAG command like this
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:container ATTR=NAME:answer[] CONTENT=<ANSWER>
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:container ATTR=*
TAG POS=R1
techimac wrote:Manually open URL and wait for question to appear
then run this script in loop of 5
Code: Select all
SET !TIMEOUT_PAGE 1 SET !ERRORIGNORE YES TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Fanfoni TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Patarioti? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Yellow TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Nansoni? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Red TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Tandani? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Green TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Preteresi? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Violet TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* WAIT SECONDS=5
techimac wrote:Manually open URL and wait for question to appear
then run this script in loop of 5
Code: Select all
SET !TIMEOUT_PAGE 1 SET !ERRORIGNORE YES TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Fanfoni TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Patarioti? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Yellow TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Nansoni? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Red TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Tandani? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Green TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Preteresi? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Violet TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* WAIT SECONDS=5
techimac wrote:Manually open URL and wait for question to appear
then run this script in loop of 5
Code: Select all
SET !TIMEOUT_PAGE 1 SET !ERRORIGNORE YES TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Fanfoni TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Patarioti? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Yellow TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Nansoni? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Red TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Tandani? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Green TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Preteresi? TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Violet TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=* WAIT SECONDS=5
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Re: Problem to fill a form with same IDs and dynamic CONTENT
Your precedent macro it seemed perfect but wasn't work, I was going crazy but at the end I found the error and thanks to your help I solved and learned something about relative positionig.
The error was in the "third tag" of every "questions"
Not correct code:
Correct code (with the second TAG POS=R1)
Without this modify, macro clicked the submit bottom even if the answer was wrong.
Final code
Thank you so much, I'm very happy
The error was in the "third tag" of every "questions"
Not correct code:
Code: Select all
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Fanfoni
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
Code: Select all
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Fanfoni
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
Final code
Code: Select all
SET !TIMEOUT_PAGE 2
SET !ERRORIGNORE YES
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Patarioti?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Yellow
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Fanfoni
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Blue
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Nansoni?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Red
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Tandani?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Green
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
TAG POS=1 TYPE=H1 ATTR=TXT:*Come<SP>si<SP>chiamano<SP>i<SP>Preteresi?
TAG POS=R1 TYPE=INPUT:TEXT FORM=ID:questioncontainer ATTR=NAME:answer[] CONTENT=Violet
TAG POS=R1 TYPE=INPUT:SUBMIT FORM=ID:questioncontainer ATTR=*
Last edited by percios on Sat Sep 23, 2017 9:37 pm, edited 1 time in total.
Browser: Mozilla Firefox 55.0.3 (64 bit)
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808
Microsoft Windows 10 Pro 64 bit
Imacros version:VERSION BUILD=9030808