Skip to content

Is this possible ? inserting values randomly selected from a list

ComputerEngineerComputerEngineer
edited February 2013 in Need Help
Alright let me try to explain

Here my article

Line 1
Line 2
Bla bla bla

this_will_be_replaced_with



Ok here my list saved in notepad and lets say file name is myLines.txt
notepad_Line_1
notepad_Line_2
notepad_Line_3
notepad_Line_4
notepad_Line_5

Now the software will read this saved list all lines randomly and replace it with this_will_be_replaced_with

so my new article will become

Line 1
Line 2
Bla bla bla

notepad_Line_2
notepad_Line_3
notepad_Line_1
notepad_Line_5
notepad_Line_4


If possible how can i do that ? thank you very much :)

Also can we say pick x number of ?


Comments

  • please take a look into the macro guide which will help you out i guess.

    click the 'Help' button in SER -> view macro guide
  • ComputerEngineerComputerEngineer
    @Ozz if you know can you post here :)
  • ComputerEngineerComputerEngineer
    edited February 2013
    ok this one works but no way to add them as lines :(

    #file_links[c:/images.txt,33,S]
  • SvenSven www.GSA-Online.de
    edited February 2013
    Exchange ,S] with ,L] and they should be lines. Now read the guide ;P
  • ComputerEngineerComputerEngineer
    I saw L but is L also random :)
  • ComputerEngineerComputerEngineer
    also i can not make max lines work

    here

    #file_links[c:/links_list.txt,max lines,L]
  • ComputerEngineerComputerEngineer
    wow i just noticed it is selecting same line again and again
    it is supposed to mix lines and select all of them :(
  • SvenSven www.GSA-Online.de
    Works fine for me. Are you sure that file is correctly encoded and has really a \n\r ?
  • ComputerEngineerComputerEngineer
    edited February 2013
    Sven yes it does have. I am also giving the number of lines that the file has. It is selecting same line multiple times :(

    i counted \r\n count with notepad++ and it is correct

    encoding is utf8
  • ComputerEngineerComputerEngineer
    also my lines are not flat

    they have shuffle feature such as

    line 1 {great line|awesome line}
    line 2 {super line|extreme line}
  • SvenSven www.GSA-Online.de
    Send me the project backup + file and I have a closer look.
  • SvenSven www.GSA-Online.de

    loaded the project, copied the file to c:\ and hit TEST...

    Article:

    * line 3
    * 5 line
    * line 8
    * 5 line
    * 6 line
    * line 5
    * 7 line
    * line 7

    * 8 line

    So all working as it should.

  • ComputerEngineerComputerEngineer
    edited February 2013
    wow it is not working as supposed. it is supposed to not write line 5 multiple times

    it is supposed to mix lines then write all of them so their position will be changed but still there will be 1 time only from each one of them
  • SvenSven www.GSA-Online.de
    I didn't see that in the XR manual
  • ComputerEngineerComputerEngineer
    @Sven then it should be added as an option
  • SvenSven www.GSA-Online.de
    No, XR doesn't do it so I will also not do it. Usually people have such a high number of lines in that file that it is very unlikely that two the same lines are picked.
  • ComputerEngineerComputerEngineer
    wow who cares about XR
    you can very easily implement it as an option


  • ComputerEngineerComputerEngineer
    this is a very important feature and i am still waiting

    randomize list first then select number of line randomly

    so no duplicate line selected
  • ComputerEngineerComputerEngineer
    please add this feature as it is required
    currently it duplicates same message which is a bad thing
  • SvenSven www.GSA-Online.de
    STOP THIS! I WILL ADD IT OR NOT WHEN I WANT. ALL THIS BAGGING MAKES ME NOT WANT TO TOUCH THIS FOR A LONG TIME!
Sign In or Register to comment.