mIRC Home    About    Download    Register    News    Help

Print Thread
#153171 12/07/06 02:28 PM
Joined: Feb 2006
Posts: 164
V
vexed Offline OP
Vogon poet
OP Offline
Vogon poet
V
Joined: Feb 2006
Posts: 164
Code:
on ^1:HOTLINK:*:?:{
  if ($1 == [whois]) || ($1 == [chat])  || ($1 == [close]) || ($1 == [send]) return
  halt
}

on *:HOTLINK:[whois]:?:{ whois $nick }
on *:HOTLINK:[chat]:?:{ dcc chat $nick }
on *:HOTLINK:[close]:?:{  _sendkeys $+($chr(37),Z) }
on *:HOTLINK:[send]:?:{  _sendkeys $+($chr(37),S) $nick }  


How come $nick returns my nickname in those events? and how to i rectify it so i can do those things?

Also, it's pretty crappy the way i did that, so i was wondering if it can ben made cleaner or shorter?
Thanks for any help, i've only just started using this event.

#153172 13/07/06 12:25 AM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
on ^*:HOTLINK:[whois]:?:{ return }
on ^*:HOTLINK:[chat]:?:{ return }
on ^*:HOTLINK:[close]:?:{ return }
on ^*:HOTLINK:[send]:?:{ return }
;
on *:HOTLINK:[whois]:?:{ whois $active }
on *:HOTLINK:[chat]:?:{ dcc chat $active }
on *:HOTLINK:[close]:?:{ _sendkeys $+($chr(37),Z) }
on *:HOTLINK:[send]:?:{ _sendkeys $+($chr(37),S) $active }

^ how about that (untested)
Cleaner & shorter are not always the same thing, i beleive that very clean and easy to read, its not the shortest, but i doubt it runs much slower.

Becuase you are the $nick triggering the event, its your mouse thats over something! Try using $active, sicne it triggers on the $active window.

I was wondering, is there a reason your using sendkey rather than just closing the window? or just using /dcc send $active (was $nick)?
I can see some, just dont know if u needed to use that.

#153173 13/07/06 01:08 AM
Joined: Feb 2006
Posts: 164
V
vexed Offline OP
Vogon poet
OP Offline
Vogon poet
V
Joined: Feb 2006
Posts: 164
Thanks DaveC, that solved it. laugh
Reason i'm using a sendkey alias, is because i made my own treeview switchbar, and using a key combo like alt + z, it refreshes it once, and not using 2 commands (1 to close the window and 1 to refresh the switchbar)


Link Copied to Clipboard