Tweeks MP3

By Tweek on Jun 07, 2011

Screenshots

Ok so the volume bar is not mine i did get it from off here but i can not find the person i got it from or i would put there name in. The rest of the script and dialog is done by me. i did not have any help this time so that is why it dont run as good as most MP3 on here.

Alias tweek { 
  if (!$dialog(volume)) dialog -mdo volume volume
}
alias Remaining {
  If ($dialog(volume)) {
    did -ra volume 10 $asctime($round($calc(($insong.length - $insong.pos) / 1000),0),nn:ss),none)
    Else { Halt }
  }
}
dialog volume {
  title "tweekMP3"
  size -1 -1 220 267
  option pixels notheme
  scroll "", 2, 7 7 145 19, horizontal top range 0 100
  button "Mute", 5, 160 7 55 19
  list 1, 6 28 208 151, vsbar sort
  button "Play", 3, 6 176 65 25, multi
  button "Stop", 4, 79 176 65 25
  button "Directory", 6, 152 176 65 25
  button "Pause", 7, 6 203 65 25
  button "Resume", 8, 152 203 65 25
  edit "", 9, 7 231 212 20, read
  edit "", 10, 81 207 64 20, read center
  text "Tweek MP3", 11, 60 252 100 12, center
}
Menu * {
  tweek: tweek
}
on *:dialog:volume:*:*: {
  if ($devent == InIt) {
    Did -a volume 1 $findfile(%dir, *.mp3,0,did -a volume 1 $nopath($1-))
    did -ra volume 9 
    did -ra volume 10 00:00 
  }
  var %volume $round($calc($vol(master) * 100 / 65535),0)
  if ($devent = init) { 
    did -c volume 2 %volume
    dialog -t volume Volume $chr(160) $+(%volume,/100%)
  }
  if ($devent = scroll && $did = 2) { 
    vol -v $calc(653.5 * $did($dname,2).sel) 
    var %sound $iif($did($dname,2).sel = 0, $chr(160) No Sound,$+($did($dname,2).sel,/100%))
    dialog -t volume Volume $chr(160) %sound
  }
  if ($devent = sclick && $did = 5) { 
    if ($vol(master).mute) { 
      vol -vu2 | did -ra volume 5 Mute 
      dialog -t volume Volume $chr(160) $+(%volume,/100%) 
    }
    else { vol -vu1 | did -ra volume 5 UnMute | dialog -t volume Volume $chr(160) $chr(160) @Muted@ }
  }
  If ($Devent == Sclick) {
    If ($did = 3) {
      var %Playing $Remove($did(volume,1).seltext,.volume)
      var %song $findfile(%dir,$did(volume,1).seltext,1)
      set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss)
      splay %song
      Did -a $dname 9 $remove($nopath($insong.fname)$1-,.mp3) 
      Did -ra $dname 10 %length
      .timermp3 0 0 Remaining
    }
    If ($did = 7) {
      Splay Pause
    }
    If ($did = 8) {
      Splay Resume
    }
    If ($did = 4) {
      Splay stop
    }
    If ($did = 6) {
      set %dir $sdir="Mp3 Directory"
      write mp3.txt
      noop $findfile(%dir,*.mp3,0,write mp3.txt $1-)
      var %num $findfile(%dir, *.mp3,0,did -a volume 2 $nopath($1-))
    }
  }
Sign in to comment.
irchainscriptz   -  Jun 09, 2011

0uch!!

 Respond  
blackvenomm666   -  Jun 09, 2011

meh

 Respond  
Jethro   -  Jun 07, 2011

jaytea could be an English tutor by trade if he wanted to. :P Yes, language is a funny thing, especially if you don't explain thoroughly, it could wind up with a different meaning or notion.

It'd have been straightforward and less conjectured if scakk said "is mine."

 Respond  
napa182   -  Jun 07, 2011

Maybe he is an English teacher, but he don't know that he is. ;x

 Respond  
blackvenomm666   -  Jun 07, 2011

ok so jaytea is not only the jack of all trades when it comes to scripting but also a philosopher

 Respond  
jaytea   -  Jun 07, 2011

[quote] The word world, in this case, suggests probability, not certainty. [/quote]

since we're getting down and dirty with it :P 'would' implies contingency not probability. if we take what Scakk said literally, then his statement is incomplete as it is missing the condition under which the snippet is his. if he had included such a condition, for example "that snippet would be mine if you had taken it from ", then, if we assume Scakk is being truthful, it follows with certainty that the snippet is his if it is indeed taken from . however, we know from context that his statement should not be taken literally, and 'would be' in this context is just a less terse way of saying 'is'. it also carries a slightly more condescending tone, which i believe is entirely warranted given the circumstance. language.. it's a funny thing ;)

 Respond  
blackvenomm666   -  Jun 07, 2011

[quote] edit: hmm, apparently the double vertical bar symbol i used for pause up there shows as a single bar on hawkee. it should show correctly on mIRC, or we could always just use a double pipe, '||'. [/quote] shows as double on my end man

[quote] the reason is because it will show in custom window menus, like @window menus... and sometimes, depending on what the @ window is for, you may not want it showing [/quote] i knew there was a reason for it just couldnt remember what. ty punktured.

 Respond  
napa182   -  Jun 07, 2011

Jethro_ Wrote: [quote] I believe the med has worn off now as I post this... Screw English grammar. lol [/quote] OH NO!! Jethro_ is going through withdraws =/ heh an yes Scakk is from the future, here to screw the past, or set fire to it, either or. lolol

 Respond  
Jethro   -  Jun 07, 2011

I was having a dose of English "madness capsule," napa182. I believe the med has worn off now as I post this...

Screw English grammar. lol

 Respond  
Scakk   -  Jun 07, 2011

Jethro_ .. Were you not aware I am from the future and post in the past :P

 Respond  
napa182   -  Jun 07, 2011

Jethro_ are you on medication? if so sharing is caring.. ;x

 Respond  
Jethro   -  Jun 07, 2011

Yup, as our nice ol' napa182 is sayin'...you can even update your snippet title to Tweek's MP3 with Scakk's Vlume Bar. (That sounds kind of gay. lol)

Scakk, I don't want to be grammatically savvy here. Posting comments should not be bounded by grammar. But when you said would be, it's as if it has yet to be made yous.

The word world, in this case, suggests probability, not certainty.

This would sound very odd if you said, "I saw a woman seated all by herself on the patio. That would be my mother."

Or "I see a woman seated all by herself on the patio. That will be my mother."

The would or would be have many uses, and I'm not getting into technicality of that...this is not an English class after all...:P

 Respond  
napa182   -  Jun 07, 2011

lol @ > Ok so the volume bar is not mine i did get it from off here but i can not find the person i got it from or i would put there name in.

thats funny cuz it's on the home page of this site. Not hard to find. =/

 Respond  
Scakk   -  Jun 07, 2011

I used "would be" based on the bit in his description.

[quote] Ok so the volume bar is not mine i did get it from off here but i can not find the person i got it from or i would put there name in. [/quote]

 Respond  
napa182   -  Jun 07, 2011

why didn't you update ur other mp3 snippet rather then reposting it? [quote] Your snippet will be deleted if you break any of the following rules: [b]If you used somebody else's snippet you must include a URL to the original. You may not post an updated snippet separately, you need to edit your first post.[/b] [/quote]

 Respond  
Jethro   -  Jun 07, 2011

Scakk, "would be" is not certain whether it is yours. You should have said "is mine." :P

 Respond  
Scakk   -  Jun 07, 2011

The volume bar bit would be mine http://www.hawkee.com/snippet/8691/

 Respond  
jaytea   -  Jun 07, 2011

[quote] Menu * { ^^^ is a nono dont ask me to explain i don't remember why. [/quote]

'menu *' applies to all custom @windows as well as the other areas you mentioned. this may be desirable, but rarely is. i wouldn't want an mp3 player's popups interfering with a picwin game's popups, for example.

[quote] but yea you can get rid of the Resume button as shown above since you havent said anything about that one [/quote]

indeed, it's common to use a single button for play/pause/resume with the symbols/text on the button changing to represent its current function. here's an example of a trick you can use to create a depressed button effect:

dialog eg {
  size -1 -1 50 50
  button "▶", 1, 15 15 20 20
  button "‖", 2, 15 15 20 20, hide flat
}

on *:dialog:eg:sclick:*:{
  did -h eg $did
  did -v eg $xor(3, $did)
}

since you can't change the style of a button with /did, you can have 2 overlapping buttons, one flat one not, and simply show/hide them alternately ;P

edit: hmm, apparently the double vertical bar symbol i used for pause up there shows as a single bar on hawkee. it should show correctly on mIRC, or we could always just use a double pipe, '||'.

 Respond  
PuNkTuReD   -  Jun 07, 2011

the reason is because it will show in custom window menus, like @window menus... and sometimes, depending on what the @ window is for, you may not want it showing...

 Respond  
Tweek   -  Jun 07, 2011

na na na thats a good idea man ima try that out.

 Respond  
blackvenomm666   -  Jun 07, 2011

take the advice or not doesnt matter to me:) but yea you can get rid of the Resume button as shown above since you havent said anything about that one

 Respond  
Tweek   -  Jun 07, 2011

ah well that makes sence but derek is the one who told me how to do it this way and he siad he has been doing it this way sence you were a noob

 Respond  
blackvenomm666   -  Jun 07, 2011

the way i showed you makes it so you can rightclick and open it as well tweek in any of the areas mentioned in the way i did it. in the nicklist the channel window the query window the status window. the way you did it can interfere with something i do not remember what exactly

 Respond  
Tweek   -  Jun 07, 2011

it works the way i have it though lol its so you can right click and open it

 Respond  
blackvenomm666   -  Jun 07, 2011

Menu * { ^^^ is a nono dont ask me to explain i don't remember why. i've been told this by several good scriptors so i just listen Menu Menubar,Channel,Query,Nicklist,Status { also you can get rid of the resume button by changing

If ($did = 3) {
      var %Playing $Remove($did(volume,1).seltext,.volume)
      var %song $findfile(%dir,$did(volume,1).seltext,1)
      set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss)
      splay %song
      Did -a $dname 9 $remove($nopath($insong.fname)$1-,.mp3) 
      Did -ra $dname 10 %length
      .timermp3 0 0 Remaining
    }

to

If ($did = 3) {
if ($insong.pause = $true) {
    splay resume
}
else {
      var %Playing $Remove($did(volume,1).seltext,.volume)
      var %song $findfile(%dir,$did(volume,1).seltext,1)
      set %length $gmt($round($calc($mp3(%song).length / 1000),0),nn:ss)
      splay %song
      Did -a $dname 9 $remove($nopath($insong.fname)$1-,.mp3) 
      Did -ra $dname 10 %length
      .timermp3 0 0 Remaining
    }
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.