mIRC Home    About    Download    Register    News    Help

Print Thread
#87100 16/06/04 08:26 PM
Joined: Apr 2004
Posts: 218
P
Fjord artisan
OP Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
$insong($inmp3,$inwave) more options
I would think most people would like to see this happen, ecspecilly me.
$insong.pause - if the song is paused, then return $true. etc,etc.
-
$inmp3.pause, $inwave.pause, etc.
I figured this would be already made if you're able to pause the mp3, would't you like to know if the mp3 was paused?
-
Very general idea. .-.

Possibable DCC -Get- Max. receive?
-
If possibable to add this, a way for dial-up user to stop using so much bandwidth on how fast you're downloading.
-Possibable?

Last edited by PhantasyX; 16/06/04 08:32 PM.

Live to Dream & Dream for Life
#87101 17/06/04 08:01 PM
Joined: May 2004
Posts: 12
P
Pikka bird
Offline
Pikka bird
P
Joined: May 2004
Posts: 12
Great idea smile

#87102 17/06/04 10:00 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Good idea, for now you could use something like:

Code:
alias songstatus { 
  if !$insong { return stopped }
  var %i = 1, %pos = $insong.pos
  while %i <= 100 { inc %i }
  return $iif(%pos == $insong.pos,paused,playing)
}


Usage: $songstatus


New username: hixxy
#87103 24/06/04 03:55 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
I don't understand the while statement. Why hang up the parser, is it to give time to mIRC to fill $insong.pos? If so, couldn't you use "while (!$insong.pos) { }" instead?


* cold edits his posts 24/7
#87104 24/06/04 03:02 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
The while loop is to wait a tiny amount of time before checking if $insong.pos is the same as %pos, if it's the same, the song is paused, otherwise it's playing, without the while loop, it will just return "pause" regardless of whether the song is paused or not.

Edit:

Try both of the following:

alias songstatus {
if !$insong { return stopped }
var %i = 1, %pos = $insong.pos
;while %i <= 100 { inc %i }
return $iif(%pos == $insong.pos,paused,playing)
}

The above returns "paused" when a song is playing.

alias songstatus {
if !$insong { return stopped }
var %i = 1, %pos = $insong.pos
while %i <= 100 { inc %i }
return $iif(%pos == $insong.pos,paused,playing)
}

The above returns "playing" when a song is playing.

Last edited by tidy_trax; 24/06/04 03:09 PM.

New username: hixxy
#87105 24/06/04 05:46 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Edit: oops. I understand it now. smile

Last edited by cold; 24/06/04 05:54 PM.

* cold edits his posts 24/7
#87106 24/06/04 05:50 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Your method doesn't always work:

alias songstatus2 {
if !$insong { return stopped }
var %i = 1, %pos = $insong.pos
while !$insong.pos { .echo -q waiting }
return $iif(%pos == $insong.pos,paused,playing)
}

Five times (song playing each time):

paused
playing
paused
paused
playing


New username: hixxy
#87107 24/06/04 05:55 PM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
Yeah, I overlooked the post. Sorry.


* cold edits his posts 24/7

Link Copied to Clipboard