mIRC Homepage
Posted By: pheonix smallest script doesnt work;s - 22/07/03 09:46 PM
alias paused {
var %mp3.pos $inmp3.pos
.timer 1 1 $iif(%mp3.pos == $inmp3.pos,return $true,return $false)
}
read the title
Posted By: codemastr Re: smallest script doesnt work;s - 22/07/03 09:51 PM
Umm I'm not seeing what thatis supposed to do...
Posted By: pheonix Re: smallest script doesnt work;s - 22/07/03 09:53 PM
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).
Posted By: codemastr Re: smallest script doesnt work;s - 22/07/03 10:03 PM
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.
Posted By: pheonix Re: smallest script doesnt work;s - 22/07/03 10:06 PM
it doesnt return anything.
Posted By: codemastr Re: smallest script doesnt work;s - 22/07/03 10:06 PM
Which is exactly what I just said.
Posted By: pheonix Re: smallest script doesnt work;s - 22/07/03 10:08 PM
Quote:
it returns immediately

i read that and the rest and got confused grin
Posted By: codemastr Re: smallest script doesnt work;s - 22/07/03 10:10 PM
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.
Posted By: pheonix Re: smallest script doesnt work;s - 22/07/03 10:14 PM
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.
Posted By: codemastr Re: smallest script doesnt work;s - 22/07/03 10:16 PM
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".
Posted By: pheonix Re: smallest script doesnt work;s - 22/07/03 10:19 PM
.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.
Posted By: codemastr Re: smallest script doesnt work;s - 22/07/03 10:42 PM
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!
Posted By: pheonix Re: smallest script doesnt work;s - 22/07/03 10:43 PM
its not like you ever attempted to help anyway,you just cause stupid unnecesary arguments, e.g this 1.
Posted By: lammkott Re: smallest script doesnt work;s - 22/07/03 11:14 PM
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.
Posted By: pheonix Re: smallest script doesnt work;s - 22/07/03 11:16 PM
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)
}
Posted By: lammkott Re: smallest script doesnt work;s - 22/07/03 11:22 PM
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.
Posted By: pheonix Re: smallest script doesnt work;s - 22/07/03 11:28 PM
ok
Posted By: Online Re: smallest script doesnt work;s - 23/07/03 12:01 AM
See this post by Nimue.
Posted By: pheonix Re: smallest script doesnt work;s - 23/07/03 12:18 AM
thanx(and nimue grin )
Posted By: Om3n Re: smallest script doesnt work;s - 23/07/03 07:05 AM
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.
Posted By: Jagfire Re: smallest script doesnt work;s - 23/07/03 07:28 AM
Quote:
do i look like a complete dumbass?


Why yes, yes you do.
Posted By: pheonix Re: smallest script doesnt work;s - 23/07/03 10:27 AM
you too grin
Posted By: Watchdog Re: smallest script doesnt work;s - 23/07/03 10:40 AM
Now now boys, time to kiss and make up. :tongue:
© mIRC Discussion Forums