mxj net.local to a umenu

    Feb 28 2010 | 7:33 pm
    Retrieving my ipaddress via mxj net.local but I don't like the way it works in the example help file with the umenus. Once populated, even through the first one looks like it is selected you have to click and release on it to put it into effect.
    I'm only interested in getting en1 so I'm doing this
    loadbang | en1 | mxj net.local
    and that spits out: clear, append, append fe80:0:0:0:217:f2ff:fee7:98f5%6
    how do I tell when the mxj net.local is finished outputting or count the output so I can bang the umenu to actually use the first one ( in the example above)?

    • Feb 28 2010 | 11:13 pm
      Try using [regexp] to pick out the one that looks like an IP address, here's an example.
    • Mar 01 2010 | 4:25 pm
      hi, can you show me a screen shot of what you have done, I'm on 4.6. Not sure why I need to pull out the IP address, surely I need to count whats coming out of mxj net.local?
    • Mar 01 2010 | 5:04 pm
      scratch that, clearly I didn't have my brain with me yesterday when I was coding, it's just a matter of using a trigger in front of the mxj net.local object to time the bang at the end of the output (as below and not a regexp in sight phew!). I will now go and slap myself on the back of the head - thanks for your help.
    • Mar 01 2010 | 5:16 pm
      Oops. It was a [route append] followed by [regexp ((?:\d{1,3}\.){3}\d{1,3})] but your method works just as well.
    • Mar 01 2010 | 5:26 pm
      ah ok, I try to avoid regular expressions if possible, they are useful but a nightmare to write.
      I missed a bang in mine, works better now!