Defining Variables from values seperated by commas

Post Reply
Denex
Posts: 5
Joined: Thu Oct 07, 2010 12:58 am

Defining Variables from values seperated by commas

Post by Denex »

I'll cut straight to the prime question.

How the hell do I save a string pattern based off manual input of a value separated by commas?


More specifically - Im making a bastardized version of a citizens tracker. I'd love to have 6 variables, each highlighted according to city affiliation.

It'd be great to be able to paste, say,
Code: [show] | [select all] lua
Talisman, Alynna, Kaevan, Jarrel, Element, Vasser, Meleagant, Azor, Stratos, Ranzou, Malaclypse, Tont, Coran, Zelon, Glyrinn, Das, Whitedragon, Mint, Feebas, Skullossus, Verituus, Gouki, Tiamat, Ainly, Gaibreal, Xenomorph, Arelas, Revy, Maleva, Laplace, Bromik, Taraza, Dumah, Raesheon, Kelandra, Eth, Kassel, Tynian, Kyuu, Riley, Dubothe, Ithron, Acherontia, Haeri, Qwuan, Rozan, Devi, Arcrisius, Kinilan, Tekla, Jibrille, Firey, Brigitte, Tael, Rodriguez, Moagedan, Androctasia, Mycen, Chasity, Escape, Isendre, Carmain, Asche, Chidori, Rythnin, Batista, Papexi, Semcath, Gaul, Orophin, Cereberus, Eneya, Vasool, Vadimuses, Midge, Kupo, Gildenlow, Thanos, Elenya, Alzahn, Myrridhin, Jiano, Chayce, Samhael, Deckher, Lucra, Aaritrea, Hyra, Harmonia, Tagg, Kilo, Desian, Nehemiah, Kesai, Kurenai, Sabiru, Reesho, Caitiff, Yagame, Serin, Entaro, Herenicus, Tanious, Zamora, Vyce, Rasputtin, Pericaliya, Dja, Melidere, Mystie, Nizaris, Beyral, Torrn, Taraus, Amedinias
into a variable or some kind of setting so I can manually populate each citizens list.

Any ideas how this is done? I cant figure it out shy of literally typing out 308 names individually for string attachments, and then code just to highlight that name.

Parnakra
Posts: 35
Joined: Tue Apr 21, 2009 10:48 am

Re: Defining Variables from values seperated by commas

Post by Parnakra »

If I recall correctly (it's been a while since I've downloaded/used it), the original highlightscript has a function that takes a string of comma-separated values and parses them into a table,which you can then use to do whatever you want.

/edit: apparently, it came from here.

Post Reply