Code looks like this:
Code: Select all
on MouseUp
   local tLineNumber
   put 1 into tLineNumber
   put 1 into NewListNumber
   
   repeat for each line tLine in field "PlayerList"
   put line tLineNumber of field "PlayerList" into playerlistline
   get matchText(playerlistline,"name player=\"(.*.)\" ",sc1) 
   if matchText is true then
   put sc1 into line NewListNumber of field "TestField"
   add 1 to tLineNumber
   add 1 to NewListNumber
   end if
   end repeat
end MouseUpI am trying to have sc1 put into a line of TestField ONLY IF matchText is true. Right now if I remove the if/then statement it creates a blank line in TestField when there is no match.
Really I just need to know how to tell if the matchText return value is TRUE or FALSE. Feeling pretty dumb right now, just spent an hour on this and I'm sure it can't be that hard.
 
 Thanks for any help or suggestions,
TJ.


