mIRC Home    About    Download    Register    News    Help

Print Thread
#121368 26/05/05 06:27 PM
Joined: May 2005
Posts: 3
Z
Zero6 Offline OP
Self-satisified door
OP Offline
Self-satisified door
Z
Joined: May 2005
Posts: 3
Need some sort of code for example event to come so it will show time left in weeks, days, hours, minutes, seconds...i used to have one, but since my both hd's broke obviously dont have one anymore

back then i placed it to alias if i remember correctly and
/trigger to display some event time left etc... really good for upcoming tv shows listing etc...

if u guys can help me out, it would be nice smile

#121369 26/05/05 07:14 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
$duration($calc($ctime(25/12/05) - $ctime)) - Weeks etc till christmas.

#121370 26/05/05 07:23 PM
Joined: Mar 2005
Posts: 74
D
Babel fish
Offline
Babel fish
D
Joined: Mar 2005
Posts: 74
You can find the next in mIRC help though (/help $ctime)

" $duration( $calc($ctime(26/5/2005 21:20:00) - $ctime)) "

for example;
Code:
alias time_till {
  if !$2 { 
    echo -a Use: /time_till dd/mm/yyyy HH:nn:ss
    echo -a Example: /time_till 30/05/2005 23:59:59
    return
  }
  else {
    echo -a Time till: $1- = $duration( $calc($ctime($1 $2) - $ctime))
    return
  }
}


Put this in your remote script, and type in mIRC: /time_till


(To make this code work, copy all code, open wordpad paste & copy again, open mIRC remote script, and paste)

#121371 27/05/05 06:11 AM
Joined: May 2005
Posts: 3
Z
Zero6 Offline OP
Self-satisified door
OP Offline
Self-satisified door
Z
Joined: May 2005
Posts: 3
thanks for help guys o/

#121372 27/05/05 11:46 AM
Joined: Feb 2005
Posts: 74
S
Babel fish
Offline
Babel fish
S
Joined: Feb 2005
Posts: 74
It works! It shows me: Time till: 17/06/2005 10:00 = 2wks 6days 19hrs 20mins 47secs ,but how i make to show 2 nedelas 6dienas ... ??? "nedelas and dienas" is in latvian Please help me! wink


[color:red]m[color:blue]IRC[color:green] for EvEr

#121373 27/05/05 11:59 AM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
$replace($duration($calc($ctime($1 $2) - $ctime)),wk,nedela,day,diena)

-Andy

#121374 27/05/05 12:08 PM
Joined: Feb 2005
Posts: 74
S
Babel fish
Offline
Babel fish
S
Joined: Feb 2005
Posts: 74
OuU tnx! wink) you're the best programmer! wink)


[color:red]m[color:blue]IRC[color:green] for EvEr

#121375 27/05/05 12:17 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I'm not a programmer, I don't think I have the time and patience to be one, but alot of people here started with mIRC and did become a programmer, because mIRC has a scripting language in it's own. But mIRC is alot easier than any other programming language, you'll find it's probably alot easier to create a dialog in mIRC than it is in C++, unless you're an experienced programmer then you could probably argue for and against. I do know a bit about mIRC scripting but not enough yet to be labelled a skilled scripter.

-Andy


Link Copied to Clipboard