Author Topic: TrailMyx's List Handling Subs  (Read 73128 times)

0 Members and 5 Guests are viewing this topic.

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #30 on: March 01, 2010, 01:03:11 AM »
+1
That's exactly what I do. :)  I only have the name/id in the menu for debugging.  Soon as I finish, I'll take out the id, and maybe shrink the window panes for ease of use, and to conserve window/desktop space.  Lengthen the windows a bit to fix more names... find a way to add NUMBERS to the list... then who knows.  You got an easy way up your sleeve to add hard coded numbers to each list item? :)  That would ROCKKKK.  Makes calling a target SO easy if you have people not using the server option.  You just say TARGET 5 DAMNIT! :)  The only problem I have with that is everyone will have to be using the same LISTS.  But the way I'm doing this, if 2 guys are fighting in 2 different areas... and you have a guy on your list that he DOES NOT HAVE, you can STILL send him your target info... and vice versa if you switch to the server... :)  This should be as universal as you can make something like this...

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #31 on: March 01, 2010, 01:08:47 AM »
+1
I'm not gettin that example tho. :)  It's early...

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #32 on: March 01, 2010, 01:16:53 AM »
+1
I'm not gettin that example tho. :)  It's early...

Probably the split string is throwing you.  I'm just using that function to split a string up into sub-strings that are separated with the "$".  So that'll let you iterate through all the property lines in a property and that's how I'm displaying each line by displaying lines:

gosub TM_SplitString #PROPERTY $
gosub TM_GetIndex 0 ; get line 1
gosub TM_GetIndex 1 ; get line 2
gosub TM_GetIndex 2 ; get line 3
gosub TM_GetIndex 3 ; get line 4
etc.
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #33 on: March 01, 2010, 08:44:40 AM »
+1
Ok, so I added spaces back into the lists and it looks great. :)  Thank you.  So now where do I find the !tag variable when you're reloading a saved list?  I want to ignoreitem all the loaded !tag vars on reloading so the script doesn't search for them again and add them twice to the lists...  I looked and looked.  Seemed like it might be in TM_ReadVariables where it's reading the variables from the files loaded.  I added an event exmsg !var there to see and it looks as if that's loading all the variables with one sub... ns_name and tag and all of it...  so how can I seperate out the !tag variable while it's loading and ignoreitem on it?  There's got to be an easy way there...  I just can't figure it out.

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #34 on: March 01, 2010, 08:50:12 AM »
+1
Gah, forget that, I'll just iterate through the list before it goes back to the scan sub and for loop through the tags and ignore them one by one.  Sound right? :)

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #35 on: March 01, 2010, 09:19:47 AM »
+1
Yup that's right.  Remember these are just list handling subs.  However you want to implement your stuffs is up to you.  So just let the TM_ subs do their thing and then go back and write a set of subs that uses the data enclosed.
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #36 on: March 01, 2010, 10:24:28 AM »
+1
Yup that's right.  Remember these are just list handling subs.  However you want to implement your stuffs is up to you.  So just let the TM_ subs do their thing and then go back and write a set of subs that uses the data enclosed.

I just thought maybe I could catch the data in one of your subs and save a step. :)  A simple ignoreitem %var or something in the right spot to do it for me. heh  Oh well.  These are so nice.  Thanks again for writing this TM. :)

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #37 on: March 01, 2010, 10:36:04 AM »
+1
...These are so nice.  Thanks again for writing this TM. :)

You're welcome.  I love writing tools like this. 
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #38 on: March 01, 2010, 12:31:40 PM »
+1
Any idea why this doesn't work? It's nice going right to the source... You'd be shocked how long I've spend trying to figure this out.  Ugh.

Code: [Select]
sub button_MoveAll
  set #menubutton n/a
  menu get comboMoveTo
  set %comboMoveTo #menures
  if %comboMoveTo = 1
    set %moveToList Newlist1
  if %comboMoveTo = 2
    set %moveToList Newlist2
  if %comboMoveTo = 3
    set %moveToList Newlist3
  if %comboMoveTo = 4
    set %moveToList Newlist3
  menu get comboMoveFrom
  set %comboMoveFrom #menures
  if %comboMoveFrom = 1
    set %moveFromList Newlist1
  if %comboMoveFrom = 2
    set %moveFromList Newlist2
  if %comboMoveFrom = 3
    set %moveFromList Newlist3
  if %comboMoveFrom = 4
    set %moveFromList Newlist4
  event exmsg #charid 3 0 %moveFromList , #spc , %moveToList
  gosub TM_CopyAllItemsInList %comboMoveFrom %moveToList #TRUE #TRUE
  gosub TM_DeleteItemsInList %comboMoveFrom #TRUE #TRUE
return
« Last Edit: March 01, 2010, 12:33:57 PM by Scripty »

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #39 on: March 01, 2010, 12:44:01 PM »
+1
What does it do exactly?
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #40 on: March 01, 2010, 01:05:21 PM »
+1
What does it do exactly?

I just have 4 lists.  And this will select the list to move all items to by a dropdown menu.  I want it to copy ALL items and ns_name and tag to one menu from another.  Say from Enemy List, to the Target List...  or Friends List to the Target List or vice versa.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #41 on: March 01, 2010, 01:14:57 PM »
+1
Ok, we'll I'll have a chance this evening to look at it.  I'm at work right now.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #42 on: March 01, 2010, 05:59:35 PM »
+1
Ok, so my question stands.  What's it doing?  I mean you probably should put some safeguards in to be sure you have two menus selected.  Because a #MENURES of 0 will pass through and cause unknown strangeness.  I'll run my sample code in a bit; I haven't used the copy commands for a while and I don't have anything that presently uses those.

Also, are you wanting to append to the list or clear out the destination?
« Last Edit: March 01, 2010, 06:03:34 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: TrailMyx's List Handling Subs
« Reply #43 on: March 01, 2010, 06:14:50 PM »
+1
Ok, so my question stands.  What's it doing?  I mean you probably should put some safeguards in to be sure you have two menus selected.  Because a #MENURES of 0 will pass through and cause unknown strangeness.  I'll run my sample code in a bit; I haven't used the copy commands for a while and I don't have anything that presently uses those.

Also, are you wanting to append to the list or clear out the destination?

There can only BE 2 menus selected because I preselect a menu for each one in the menu sub... :)  What I think will be the most common.  I'm trying to move items from one list to another while appending them on to what's already there.  It would be AMAZING to be able to move things up and down a list too... for greater organization. :)  heh  The list names are just like your naming in the subs.  Newlist1...2...3...4,  and I want to be able to freely move the name and tag between all the menus by 2 dropdown boxes and a button to move the selected item...  Do I need to get selected tag/item, set them to variables, then delete the item and additem to the other menu? 

The snippet tho is just to copy all items from one menu to another by dropdowns and button.  I have a move all, and move selected button that both work with the dropdowns.

Offline TrailMyxTopic starter

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: TrailMyx's List Handling Subs
« Reply #44 on: March 01, 2010, 06:22:02 PM »
+1
Ok, so is it copying?  appending?  barfing blood?  What?
From what it looks like, your sample code should work.
Please read the ScriptUO site RULES
Come play RIFT with me!