Day 10 – Capturing Selection Expressions

Goal: Capture information contained in the URL that a Kynetx app is run on

ruleset a60x490 {
  meta {
    name "capture-in-select-statement"
    description <<
      capture-in-select-statement
    >>
    author "Mike Grace"
    logging on
  }

  rule get_user_id_on_user_detail_page {
    select when pageview "http://stackoverflow\.com/users/([0-9]*)/" setting (userId)
    {
      notify("User ID found!",userId) with sticky = true;
    }
  }
}

App run on http://stackoverflow.com/users/117068/mike-grace with a bookmarklet

Get the bookmarklet to try it out yourself!

Gratuitous day 10 crazy face

About these ads
This entry was posted in Kynetx and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s