Page 1 of 1

how to make changeable sentence.....with SET !DATASOURCE_LINE

Posted: Mon Apr 01, 2019 5:37 pm
by a2515125
PM28.4/windows 10/imacros 8.9.7

Hey I would like to make a sentence a title with the combination of different words in the same text-box in every loop

example:

hey I am "John" I am "17" from "New York City"

I would like to change only "name" & "age" &"city" in a sentence

I would like to use {{!COL1}}{{!COL2}}{{!COL3}} with SET !DATASOURCE_LINE (different and randomly)

but the script can only allow same SET !DATASOURCE_LINE if I put {{!COL1}}{{!COL2}}{{!COL3}} together...

how can I achieve different sentence by using {{!COL1}}{{!COL2}}{{!COL3}} with respectively different DATASOURCE_LINE

I want make the combination of 5 names / 1-32 ages / 15 cities

I want {{!COL1}} with random !DATASOURCE_LINE {{!VAR1}}
I want {{!COL2}} with random !DATASOURCE_LINE {{!VAR2}}
I want {{!COL3}} with random !DATASOURCE_LINE {{!VAR3}}

but {{!COL1}}{{!COL2}}{{!COL3}} in the same CONTENT


any idea?


here is my code

Code: Select all

SET !VAR1 EVAL ("var min = 1; var max = 5;var randomNumber = Math. floor (Math. random () * (max - min + 1))+ min; randomNumber; ")
SET !VAR2 EVAL ("var min = 1; var max = 32;var randomNumber = Math. floor (Math. random () * (max - min + 1))+ min; randomNumber; ")
SET !VAR3 EVAL ("var min = 1; var max = 15;var randomNumber = Math. floor (Math. random () * (max - min + 1))+ min; randomNumber; ")

'標題
SET !DATASOURCE_LINE {{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=* CONTENT={{!COL1}}{{!COL2}}{{!COL3}}



Re: how to make changeable sentence.....with SET !DATASOURCE_LINE

Posted: Mon Apr 01, 2019 5:45 pm
by chivracq
a2515125 wrote:
Mon Apr 01, 2019 5:37 pm
Hey I would like to make a sentence a title with the combination of different words in the same text-box in every loop

example:

hey I am "John" I am "17" from "New York City"

I would like to change only "name" & "age" &"city" in a sentence

I would like to use {{!COL1}}{{!COL2}}{{!COL3}} with SET !DATASOURCE_LINE (different and randomly)

but the script can only allow same SET !DATASOURCE_LINE if I put {{!COL1}}{{!COL2}}{{!COL3}} together...

how can I achieve different sentence by using {{!COL1}}{{!COL2}}{{!COL3}} with respectively different DATASOURCE_LINE

I want make the combination of 5 names / 1-32 ages / 15 cities

I want {{!COL1}} with random !DATASOURCE_LINE {{!VAR1}}
I want {{!COL2}} with random !DATASOURCE_LINE {{!VAR2}}
I want {{!COL3}} with random !DATASOURCE_LINE {{!VAR3}}

but {{!COL1}}{{!COL2}}{{!COL3}} in the same CONTENT


any idea?


here is my code

Code: Select all

SET !VAR1 EVAL ("var min = 1; var max = 5;var randomNumber = Math. floor (Math. random () * (max - min + 1))+ min; randomNumber; ")
SET !VAR2 EVAL ("var min = 1; var max = 32;var randomNumber = Math. floor (Math. random () * (max - min + 1))+ min; randomNumber; ")
SET !VAR3 EVAL ("var min = 1; var max = 15;var randomNumber = Math. floor (Math. random () * (max - min + 1))+ min; randomNumber; ")

'標題
SET !DATASOURCE_LINE {{!VAR1}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=* CONTENT={{!COL1}}{{!COL2}}{{!COL3}}
Yep, you are close... :o
A little bit more "Thinking" and you should find the/a Solution by yourself... :wink:

Re: how to make changeable sentence.....with SET !DATASOURCE_LINE

Posted: Tue Apr 02, 2019 3:16 am
by a2515125
I failed that is why I post it............. :?:
please give me some clues or tip to achieve it ^^"

Re: how to make changeable sentence.....with SET !DATASOURCE_LINE

Posted: Tue Apr 02, 2019 3:51 am
by chivracq
a2515125 wrote:
Tue Apr 02, 2019 3:16 am
I failed that is why I post it............. :?:
please give me some clues or tip to achieve it ^^"
Beh..., nope..., I won't help you anymore..., as I asked you to put a Descriptive Title to your previous Thread, which you apparently found a bit "funny", OK why not..., but you didn't comply..., and wanted to delete your Thread instead of sharing your Solution (which you still "vaguely" did luckily). :shock:
I only help Users using the Forum "a bit correctly", and Descriptive Thread Title + FCI mentioned + Sharing their Solution are 3 of my "Criteria"... :wink:

+ Question Mark missing in the Thread Title for this current Thread (you are not sharing a 'How-To'...), OK, no "big deal", could be easily solved, (and the Thread Title is at least perfectly Descriptive "this time", good...!), FCI not mentioned (again!, while I've already asked you maybe 20 times..., so I'm a bit tired of asking...).
And I don't help anyway for the "Functionality" that you want in this current Thread as it is typically used by Spammers or for Social Media with "fake" Comments, which I definitely don't support, oops...! :shock:

Re: how to make changeable sentence.....with SET !DATASOURCE_LINE

Posted: Tue Apr 02, 2019 4:38 am
by a2515125
Descriptive Thread Title + FCI mentioned + Sharing their Solution

already change the title of previous thread!!

add FCI already

I am willing to share our solution or relative link on my posts....of coursea

I ask for delete my post is because I think it can avoid you to answer me again

if you prefer I leave the post I will follow the rule.

BTW I use this code to post my products not to scam...

Re: how to make changeable sentence.....with SET !DATASOURCE_LINE

Posted: Tue Apr 02, 2019 5:08 am
by a2515125
I may to do it in one row of csv file with

Code: Select all

TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=* CONTENT={{!COL{{!VAR1}}}}{{!COL{{!VAR2}}}}{{!COL{{!VAR3}}}}
but that is not what I want.... my data is vertical in .csv

Name1 Age1 City1
Name2 Age2 City2
Name3 Age3 City3

Re: how to make changeable sentence.....with SET !DATASOURCE_LINE

Posted: Tue Apr 02, 2019 6:07 am
by a2515125
I do not know how to use TAG mode to achieve my combination ....if anyone know how to achieve with TAG MODE PLEASE LET ME KNOW BIG THANKS...

BUT EVENT MODE works...here is the solution

Code: Select all


SET !DATASOURCE_LINE {{!VAR1}}
EVENTS TYPE=KEYPRESS SELECTOR="#root>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>SECTION>FIELDSET>DIV>DIV>DIV>FORM>SPAN>INPUT" CHARS={{!COL1}}

SET !DATASOURCE_LINE {{!VAR2}}
EVENTS TYPE=KEYPRESS SELECTOR="#root>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>SECTION>FIELDSET>DIV>DIV>DIV>FORM>SPAN>INPUT" CHARS={{!COL2}}

SET !DATASOURCE_LINE {{!VAR3}}
EVENTS TYPE=KEYPRESS SELECTOR="#root>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>DIV>DIV>SECTION>FIELDSET>DIV>DIV>DIV>FORM>SPAN>INPUT" CHARS={{!COL3}}