mIRC Home    About    Download    Register    News    Help

Print Thread
Creating a hotlink #209607 19/02/09 07:14 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I hope I have the correct term used in my subject line.
Simply, I have a line in a script that contains my e-mail address, and what I would like, is to be able to have the person that's using my script to be able to click on my e-mail address, and have an e-mail message created with my e-mail address and subject line already entered.

I have done this several times using dialogs, but this time I would like to be able to omit the dialog (if possible).

The line I'm currently referring to has this format:
Quote:
4,0Script Name 14,0by Russel Bairstow 12,0Release Date1,0 E-mail: my_e-mail@provider.com

The specific details, if I can get this working, will change dependent on the script, as I will start using this format in scripts that don't have a dialog or as an extra option for scripts that do use a dialog.

I hope I've made my request sufficiently clear, and look forward to a timely response.

Re: Creating a hotlink [Re: RusselB] #209608 19/02/09 11:04 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on *:HOTLINK:*:*:run mailto: $+ $regml(1) $+ ?Subject=Put Subject Line Here
on ^*:HOTLINK:*@*:*:if ($regex($1,/^([\w\.!#\$%\-+.]+@[A-Za-z0-9\-]+(\.[A-Za-z0-9\-]+)+)/g)) return | halt

All you need to do is replace "Put Subject Line Here" with your chosen subject line. It shall fill in your email address and subject automatically upon double click.

Re: Creating a hotlink [Re: Tomao] #209613 19/02/09 03:47 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Thanks for the reply, but it's not working.
No error message, but pointing at the e-mail address (in the display) doesn't change the mouse pointer, and double clicking (if the display is in a channel) gives me channel central.

Re: Creating a hotlink [Re: RusselB] #209614 19/02/09 04:18 PM
Joined: Jul 2006
Posts: 3,558
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,558
I'm not sure but, are looking for this ? :
Code:
on ^*:HOTLINK:your_email:*:noop 
on *:HOTLINK:your_email:*:echo -a double click on email


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Creating a hotlink [Re: RusselB] #209616 19/02/09 05:08 PM
Joined: Jan 2005
Posts: 187
Brax Offline
Vogon poet
Offline
Vogon poet
Joined: Jan 2005
Posts: 187
Code:
on ^1:HOTLINK:my_e-mail@provider.com:*: noop
on 1:HOTLINK:my_e-mail@provider.com:*:url mailto:my_e-mail@provider.com?Subject=I just doubleclicked your email!!!



This works at least for me smile


echo -a $signature
Re: Creating a hotlink [Re: RusselB] #209619 19/02/09 06:48 PM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
It works for me via web-based email using firefox and IE browser under windows Vista. I have my default email client set to Use Yahoo! Mail. Once an email address is double clicked in mirc, it opens a browser window directing to my chosen email provider. I'm not sure which email client you use though.
You can put this into your run command window and see what you get:
Php Code:
mailto:my_email@provider.com?Subject=My Subject Line 

Last edited by Tomao; 19/02/09 07:01 PM.
Re: Creating a hotlink [Re: Tomao] #209638 20/02/09 12:22 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
@Tomao: Using /run mailto:my_email@provider.com?Subject=My Subject Line works exactly as expected.

Noting as how none of the ON HOTLINK events are being executed, I susupect that the e-mail address in the line isn't being recognized as a hotlinked item.

Re: Creating a hotlink [Re: RusselB] #209639 20/02/09 12:27 AM
Joined: Jul 2006
Posts: 3,558
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,558
Do you have other on hotlink event ?


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Creating a hotlink [Re: Wims] #209640 20/02/09 12:36 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
At the moment, the only active hotlink events on the version of mIRC that I'm testing this with, are the ones suggested by Brax.

The other hotlink events that have been suggested, have been remarked by using the ; at the start of the line(s)

Re: Creating a hotlink [Re: RusselB] #209644 20/02/09 01:26 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
on *:HOTLINK:*:*:run mailto: $+ $1 $+ ?Subject=Put Subject Line Here
on ^*:HOTLINK:*:*:if (my_e-mail@provider.com == $1) return | halt

Last edited by Tomao; 20/02/09 01:30 AM.
Re: Creating a hotlink [Re: Tomao] #209650 20/02/09 02:41 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Well, that works, sort of.. the problem, however, is not a scripting one.
For some reason, and I haven't a clue as to why, this copy of mIRC is only recognizing the hotlink when the shift key is pressed, inspite of me having that option unchecked in the Options dialog.

Re: Creating a hotlink [Re: RusselB] #209652 20/02/09 05:20 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Well, does this return 1 when you left-click my_email@provider.com with your mouse:
Code:
on ^*:hotlink:my_email@provider.com:*:if ($mouse.key & 1) echo -a $v1

Re: Creating a hotlink [Re: RusselB] #209653 20/02/09 05:23 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Options > Other > Keys > Shift key enables hotlinks

-genius_at_work

Re: Creating a hotlink [Re: genius_at_work] #209654 20/02/09 05:36 AM
Joined: Jul 2007
Posts: 1,129
T
Tomao Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
I have that unchecked so I don't have to hold down the shift key when responding to a "hotlink situation."

Re: Creating a hotlink [Re: genius_at_work] #209656 20/02/09 05:55 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I thank you for confirming the location of that option, however, it makes no difference as to whether it is checked or not.

In either case, I still have to hold the shift key for the hotlink to be recognized.

I suspect that this is why I was having such a hard time getting a code to work, as I thought that the hotlink should activate without me having to press the shift key (especially when that was unchecked.)

I have tried the script(s) with that checked and un-checked (restarting mIRC after each change to ensure that the change did take).

I get the same results, whether the check box is checked or not.

Re: Creating a hotlink [Re: Tomao] #209657 20/02/09 06:05 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
No, there is no displayed response to a single left click on the e-mail address.
A double click, without the shift key, brings up channel central (testing in a channel)
A double click with the shift key, brings up my e-mail program.

Re: Creating a hotlink [Re: RusselB] #209668 20/02/09 09:56 AM
Joined: Jul 2006
Posts: 3,558
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,558
The on hotlink event can't be used on a single click.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: Creating a hotlink [Re: Wims] #209681 20/02/09 10:57 PM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline OP
Hoopy frood
OP Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I didn't think it could, but it didn't hurt to check for the results of all possible click scenarios