|
Drahkuna Beginner
Joined: 15 Apr 2005 Posts: 15 Location: MO
|
Posted: Wed Jul 12, 2006 12:24 am
Question regarding MXP |
#CLASS {Logging}
#ALIAS do_log {
logging = 1
#lo %time
#say %ansi( 15)~[%ansi( 10)Logging Enabled%ansi( 15)~]
}
#ALIAS end_log {
logging = 0
#lo
#say %ansi( 15)~[%ansi( 12)Logging Disabled%ansi( 15)~]
}
#ALIAS clearlog {
log_end_record=""
log_start_record=""
#say ~<b>*Log record cleared*~</b>
}
#ALIAS logdisplay {
#show ~<color darkorange>"==========================="~</color>
#loopdb @log_start_record {#mxp ~<color red>~<b> %key~</b>~</color>}
#show ~<color green>--------********--------********--------~</color>
#loopdb @log_end_record {#show ~<color white>~<b>%key~</b>~</color>}
#show ~<color darkorange>"==========================="~</color>
}
#VAR logging {0} {0}
#VAR log_start {}
#VAR log_start_record {}
#VAR log_end {}
#VAR log_end_record {}
#TRIGGER {Log is on: &log_start$} {#addkey log_start_record @log_start}
#TRIGGER {Log is off$} {
log_end=%time
#addkey log_end_record @log_end
}
#BUTTON 1 {Logging Disabled} {#if (!@logging) {do_log} {end_log}} {Logging Enabled} {#if (@logging) {end_log} {do_log}} {} {1} {} {} {} {} {} {} {} {79} {47} {} {} "" {} {} {log_toggle}
#CLASS 0
What I'd like to be able to do is use <send> to create a link of the displayed log_start dates, and to use that link to access the corresponding log. Is that possible? I've tried various ways of using the #launch command inside of the alias, "logdisplay"'s , mxp trigger, to no avail. The only way I've managed to make it work so far was creating an alias that #url'ed the link once I'd saved it in html format ( something I'm not fond of doing, as I don't have a converter).
Any suggestions would be greatly appreciated.
Thanks in advance. |
|
|
|
Drahkuna Beginner
Joined: 15 Apr 2005 Posts: 15 Location: MO
|
Posted: Wed Jul 12, 2006 1:55 pm |
Was in a bit of a rush before, so I'll rephrase.
#loopdb @log_start_record {#MXP ~<b>~<color red>~<send>%key~</send>~</color>~</b>}
is how I'm displaying my log start dates and times.
What I'll see after executing the logdisplay alias is something like,
Tuesday, January 14th 2006, 7:10am
What I'd like to be able to do is to click on that link and have it open the text file titled "Tuesday, January 14th..."
Is this possible? If so, how would I go about coding for it? |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Jul 12, 2006 10:14 pm |
I ran into a similar issue recently. The short answer is that you need to keep the send tags as the outermost tags.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Drahkuna Beginner
Joined: 15 Apr 2005 Posts: 15 Location: MO
|
Posted: Wed Jul 12, 2006 11:48 pm |
Ah. Thank you, Matt.
|
|
|
|
|
|