Kirby commented on a Page, Twitter Search Script  -  Mar 18, 2009

Looks nice.
Except the screenshot is a little blurry; makes it a little hard to see. =/

I'm a little obsessed with using as few variables as possible, even though they are priceless at times, but you can certainly do so in this script.

  set %twitter.inuse 1
  set %twitter.nick $me
  set %twitter.chan ECHO
  sockclose twitter
  set %twitterurl /search?q= $+ $replace($1-,$chr(32),+)
  set %twittersite search.twitter.com
  set %twitter.max 5

Although yes, you can **/unset %twitter* at the end, but you can also use /sockmark and then /tokenize later on.
If you are not familiar with them,
/help /tokenize and /help /sockmark**.

Basically, you can store multiple items into the socket mark (up to 512 bytes, or half a kilobyte) and then tokenize them to make identifiers ($1,$2,$3,.., so on).
If done correctly, you can possibly use one (at most) variable in the whole script.

What I would also encourage is to change your menu layout slightly (the way you used groups was nice).

menu channel {
  .Twitter
  .Trigger On:enable #TwitterTrigger
  .Trigger Off:disable #TwitterTrigger
}
menu * {
  $iif($group(#TwitterTrigger) == On,$style(1)) Twitter
  .$iif($group(#TwitterTrigger) == On,$style(2)) On: .enable #TwitterTrigger
  .$iif($group(#TwitterTrigger) == Off,$style(2)) Off: .disable #TwitterTrigger
}

What I personally like about this layout is that it displays the status (if the group is enabled or disabled). If the group were to be disabled, then the 'Off' part would be grayed out, and only the 'On' part could be selected--vice-versa with if groups were to be enabled.
It also makes a 'check' mark if the group is enabled.

Otherwise, nice work.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.