|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
alias paused { var %mp3.pos $inmp3.pos .timer 1 1 $iif(%mp3.pos == $inmp3.pos,return $true,return $false) } read the title
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Umm I'm not seeing what thatis supposed to do...
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
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).
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
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.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
it doesnt return anything.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
Which is exactly what I just said.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
i read that and the rest and got confused
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
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.
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
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.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
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".
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
.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> 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.
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 2,809
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,809 |
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!
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
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.
new username: tidy_trax
|
|
|
|
Joined: May 2003
Posts: 215
Fjord artisan
|
Fjord artisan
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:
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.
- Jason
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
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  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.
new username: tidy_trax
|
|
|
|
Joined: May 2003
Posts: 215
Fjord artisan
|
Fjord artisan
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.
- Jason
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 1,922
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,922 |
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
OP
Hoopy frood
Joined: May 2003
Posts: 2,265 |
thanx(and nimue  )
new username: tidy_trax
|
|
|
|
Joined: Jul 2003
Posts: 655
Fjord artisan
|
Fjord artisan
Joined: Jul 2003
Posts: 655 |
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.
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
|
|
|
|
|