 |
zogalogran Beginner
Joined: 23 Jun 2006 Posts: 20
|
Posted: Sat Mar 03, 2012 6:58 pm
trigger text capture and class membership |
I am currently capturing text as follows:
#TR line1 {&{name} can be referred to as '&{tags}'} {} idtemp
No problems there, I would just like @name and @tags to be members of the idtemp class. Is there a way to do this?
Thanks! |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Mar 03, 2012 7:20 pm |
Not via the &varname reference (by the way, you don't need the {} around variable name). You can do what you want very easily via a=b variable syntax, though:
//module or window name/class/path/to/idtemp/varname = value |
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
zogalogran Beginner
Joined: 23 Jun 2006 Posts: 20
|
Posted: Sat Mar 03, 2012 7:51 pm |
Gotcha - thank you.
|
|
|
 |
zogalogran Beginner
Joined: 23 Jun 2006 Posts: 20
|
Posted: Sun Mar 04, 2012 4:38 pm |
An addendum to this post - I used your recommended syntax to create the variables in the desired class, and they are subsequently stored in that class. Now when I use #DELC to remove the class (which contains triggers, and the variables created using the above method), the triggers are deleted properly but all of the variables get dumped up to the parent level. Is there a good way to remove those variables without #UNVARing every last one of them?
|
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Mar 04, 2012 6:56 pm |
If you delete a class and stuff in that class is for sure not getting removed along with that class, then either what you think is not getting removed properly wasn't in that class to begin with (ie, script tried saving data after the variables were deleted) or there's no way around this other than to write scripts that disable/enable rather than create/delete (creation/deletion is much slower than enable/disable, fyi).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
|
|