mIRC Home    About    Download    Register    News    Help

Print Thread
#149635 21/05/06 10:38 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
I have an EventsLog monitor script.
It echoes all kinds of events to an @-window.

Now I'm looking for a way to log the URL's that I click.
The only identifier I could find would return the url, currently active in my webbrowser, but I would like to catch it when I click it.

Would this be possible using regex or gettok perhaps?
Some more info on this would be greatly appreciated.

Example of one of the events I currently log:
Code:
on *:KICK:*:{
  if ($knick == $me) {
    echo @EventsLog $timestamp 5KICK detected:
    echo @EventsLog $timestamp $nick kicked you from $chan
    echo @EventsLog -
  }
  elseif ($nick == $me) {
    echo @EventsLog $timestamp 5KICK detected:
    echo @EventsLog $timestamp You kicked $knick from $chan
    echo @EventsLog -
  }
  else {
    echo @EventsLog $timestamp 5KICK detected:
    echo @EventsLog $timestamp $nick kicked $knick from $chan
    echo @EventsLog -
  }
}

#149636 22/05/06 02:29 AM
Joined: May 2006
Posts: 9
B
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
B
Joined: May 2006
Posts: 9
Afraid to say I don't personally know of any event that triggers when a URL is clicked. Perhaps this shoul dbe a feature request?

#149637 22/05/06 04:53 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I think you, well have to use ON HOTLINK and replace the defaut weblink handleer with your own, and then you can easlly write the data to a file/window/lamppost or where ever.

#149638 22/05/06 04:57 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Hmmm, yeah I might be able to get that to work.
Let me play a bit with it.

Thx for now, both of ya grin

#149639 22/05/06 07:58 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Hmmmm, alright, so I got this to work.
It now recognises the fact that I click a URL, and it stores that in the EventsLog window.

But.... Now it doesnt open the URL anymore confused
Does anyone know a command to add, so that it also opens the URL in the Internet browser?

Code:
on ^1:HOTLINK:*http*:#:{
  if (http* iswm $1) return
  halt
}

on ^1:HOTLINK:*www*:#:{
  if (www* iswm $1) return
  halt
}

on 1:HOTLINK:*:*:{
  echo @EventsLog $timestamp You just clicked the following URL: 12 $+ $1- $+ 
  echo @EventsLog -
}

#149640 22/05/06 08:04 PM
Joined: Apr 2006
Posts: 464
O
Fjord artisan
OP Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
Code:
on 1:HOTLINK:*:*:{
  url -an $1
  echo @EventsLog $timestamp 5URL detected:
  echo @EventsLog $timestamp You just clicked: 12 $+ $1- $+ 
  echo @EventsLog -
}


Think I got it!!!
Thx for getting me going guys smile

Last edited by OrionsBelt; 22/05/06 08:07 PM.

Link Copied to Clipboard