mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
P
pheonix
pheonix
P
alias paused {
var %mp3.pos $inmp3.pos
.timer 1 1 $iif(%mp3.pos == $inmp3.pos,return $true,return $false)
}
read the title

C
codemastr
codemastr
C
Umm I'm not seeing what thatis supposed to do...

P
pheonix
pheonix
P
it checks to see if a song is paused,because the $inmp3.pos doesnt change when a song is paused,it sets a variable to the current $inmp3.pos and then checks if its the same 1 second later,if it is the same the song is paused(it returns $true),if it isnt the same the song isnt paused(it returns $false).

C
codemastr
codemastr
C
Well thats not at all what it is going to do. Timer doesn't wait the 1 second, it returns immediately, using /return within a /timer does nothing.

P
pheonix
pheonix
P
it doesnt return anything.

C
codemastr
codemastr
C
Which is exactly what I just said.

P
pheonix
pheonix
P
Quote:
it returns immediately

i read that and the rest and got confused grin

C
codemastr
codemastr
C
Timer doesn't wait. Do
/timer 1 86400 .echo -a blah

Does mIRC freeze up for a whole day? Of course not, that says "execute the echo command one day from now" not "wait one day, don't do anything at all, then execute the echo command". Timers are used to schedule an event, not to wait until an event occurs. If you can't understand that then the simple answer is, you can't do this.

P
pheonix
pheonix
P
do i look like a complete dumbass?, i have 1 script that runs 8 timers, obviously i know mirc doesnt freeze until the timer is executed,i also said nothing like this so your just talking about a load of **** as usual which has no relevance.

C
codemastr
codemastr
C
Yes, you do look like a dumbass, which is exactly why I phrased it in such a way that even a dumbass could grasp it. This is EXACTLY what you asked mIRC to do, if you don't see that then you're right you aren't a "complete dumbass" you are a "complete and total dumbass that is regarded as an insult to all other dumbasses because you are the sole reason dumbasses have such a bad name".

P
pheonix
pheonix
P
.timer 1 1 $iif(%mp3.pos == $inmp3.pos,return $true,return $false)

logically most people would think that will make a command execute in 1 second, checks the value to determine what to return and then return it.

<sarcasm>
sorry hardman codemastr with the incredibly upsetting insults
</sarcasm>

Quote:
do i look like a complete dumbass?

if anyones a dumbass its you(codemastr) for even answering that question considering you cant actually see me.

Last edited by pheonix; 22/07/03 10:23 PM.
C
codemastr
codemastr
C
Lmao you are a dumbass! "You can't say I look like a dumbass because you can't see me!" Are you 3 years old? Because I've never heard someone older than 3 say something as childish as that. Don't worry about me responding anymore, I'll just ignore all your posts (like most people on these forums already do) rather than try and help you. Bye!

P
pheonix
pheonix
P
its not like you ever attempted to help anyway,you just cause stupid unnecesary arguments, e.g this 1.

Last edited by pheonix; 22/07/03 10:48 PM.
Joined: May 2003
Posts: 215
L
Fjord artisan
Offline
Fjord artisan
L
Joined: May 2003
Posts: 215
Rather then trying to do it that way, consider this.

Set a variable such as %paused when using the /splay pause command. Then just have your alias just return $true if the variable exists.

Example:
Code:
alias pause.mp3 {
  if ($paused == $false) { set %pause 1 | splay pause }
  else { unset %pause | splay resume }
}
alias paused {
  return $iif(%pause == 1,$true,$false)
}


It's what I've been using for years and has never failed.

P
pheonix
pheonix
P
that would work but, what if i decide to stop the mp3 while its paused? then play a new 1,the script will still think it is paused.
thanx anyway smile
you gave me an idea tho:

alias paused {
var %mp3.pos $inmp3.pos
.timer 1 1 $iif(%mp3.pos == $inmp3.pos,set %pause 1,set %pause 2)
}

Last edited by pheonix; 22/07/03 11:18 PM.
Joined: May 2003
Posts: 215
L
Fjord artisan
Offline
Fjord artisan
L
Joined: May 2003
Posts: 215
What I've done for my player is I've set all the main controls (play, stop, pause, previous, next) to check if the %pause variable exists and react accordingly. Therefore, you can select a different song and play it, just have the script unset the variable.

P
pheonix
pheonix
P
ok

Joined: Dec 2002
Posts: 1,893
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,893
See this post by Nimue.

P
pheonix
pheonix
P
thanx(and nimue grin )

O
Om3n
Om3n
O
Firstly i have not read the whole thread since it turned into an argument from the start, so forgive if this has been said.

Instead of shoving the code into the timer like that, have the timer call an alias. Obviously with the var as $1 for the alias. Then put the iif into the alias, that way you can actually do something with the results (ie the $true / $false) ect ect ect. Using return inside of a timer is never practical in the least.

Page 1 of 2 1 2

Link Copied to Clipboard