Jump to content

Welcome to Pure Warfare - The #1 Community for Pures

Welcome to Pure Warfare - The #1 Community for Pures, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of Pure Warfare - The #1 Community for Pures by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.

[6.31] Advanced YouTube Dialog


Recommended Posts

Important:

I made this a LONG time ago when I used to do mSL, which I don't anymore, so it might not work, but it used to ;]

Quoted from: http://forum.swiftirc.net/viewtopic.php?f=34&t=15047

 

Current Version: 1.0

 

Introduction

I was so bored, I needed to try something different. I hadn't made a dialog in ages, and this is how it has turned out ^.^

 

Pictures

ytdialog.png

 

How to use

Put the script into remotes, and right click on a channel or nicklist.

Then begin filling out the drop down boxes.

 

The Script

Hmm.. and finally, here is the script ^.^

 

menu * {  -  .iChunk|'s Advanced Youtube Dialog: /dialog -dm youtube youtube  -}dialog youtube {  title "iChunk|'s Advanced Youtube Dialog"  size -1 -1 390 447  option pixels  tab "Results", 20, 12 153 370 261  tab "Favourites", 21  box "", 1, 6 1 378 136  text "Query:", 2, 13 14 37 17  edit "", 3, 68 13 134 23, autohs multi  text "Duration:", 4, 213 16 49 17  combo 5, 264 14 114 79, drop  text "Language:", 6, 12 39 51 17  combo 7, 68 39 310 160, drop  text "Category:", 8, 12 64 48 17  combo 9, 68 63 310 160, drop  text "Sort Results By:", 10, 11 89 79 17  combo 11, 92 87 286 90, drop  text "Uploaded:", 12, 12 113 52 17  combo 13, 68 111 135 70, drop  button "Search!", 14, 206 109 172 25  list 15, 20 180 352 223, tab 20 size  box "", 16, 6 137 381 307  button "Open the URL", 17, 48 414 93 25  button "Add to Favourites", 18, 142 414 94 25, tab 20  button "Close", 19, 237 414 93 25, cancel  list 22, 20 180 352 223, tab 21 size  button "Delete Selected", 23, 142 414 94 25, tab 21}alias language return $gettok(All Languages.Arabic.Bulgarian.Catalan.Chinese (Simplified).Chinese (Traditional).Croatian.Czech.Danish.Dutch.English.Estonian.Finnish.French.German.Greek.Hebrew.Hungarian.Icelandic.Italian.Japanese.Korean.Latvian.Lithuanian.Norwegian.Polish.Portuguese.Polish.Romanian.Russian.Serbian.Slovak.Slovenian.Spanish.Turkish,$1,46)alias category return $gettok(All Categorys.Autos & Vehicles.Comedy.Education.Entertainment.Film & Animation.Howto & Style.Music.News & Politics.Nonprofits & Acitivism.People & Blogs.Pets & Animals.Science & Technology.Sports.Travel & Events,$1,46)alias srb return $gettok(Relevance.Date Added.View Count.Rating,$1,46)alias durations return $gettok(All Durations.Less Than 4 Mins.4-20 Mins.More Than 20 Mins,$1,46)alias upload return $gettok(Anytime.This Month.This Week.Today,$1,46)on *:DIALOG:youtube:init:0:{  var %x 1 | while ($durations(%x)) { did -a $dname 5 $v1 | inc %x }  var %x 1 | while ($language(%x)) { did -a $dname 7 $v1 | inc %x }  var %x 1 | while ($category(%x)) { did -a $dname 9 $v1 | inc %x }  var %x 1 | while ($srb(%x)) { did -a $dname 11 $v1 | inc %x }  var %x 1 | while ($upload(%x)) { did -a $dname 13 $v1 | inc %x }  var %x 1 | while (%x <= %fav) { if ($gettok($readini(yt.ini,fav,%x),1,64)) { did -a $dname 22 $gettok($readini(yt.ini,fav,%x),1,64) } | inc %x }}alias lang  {  if ($1 == Arabic) { return Ar }  elseif ($1 == Bulgarian) { return Bg }  elseif ($1 == Catalan) { return Ca }  elseif (Simplified isin $1) { return Zh-Cn }  elseif (Traditional isin $1) { return Zh-Tw }  elseif ($1 == Croatian) { return Hr }  elseif ($1 == Czech) { return Cs }  elseif ($1 == Danish) { return Da }  elseif ($1 == Dutch) { return Nl }  elseif ($1 == English) { return En }  elseif ($1 == Estonian) { return Et }  elseif ($1 == Finnish) { return Fi }  elseif ($1 == French) { return Fr }  elseif ($1 == German) { return De }  elseif ($1 == Greek) { return Er }  elseif ($1 == Hebrew) { return Iw }  elseif ($1 == Hungarian) { return Hu }  elseif ($1 == Icelandic) { return Is }  elseif ($1 == Italian) { return It }  elseif ($1 == Japanese) { return Ja }  elseif ($1 == Korean) { return Ko }  elseif ($1 == Latvian) { return Lv }  elseif ($1 == Lithuanian) { return Lt }  elseif ($1 == Norwegian) { return No }  elseif ($1 == Polish) { return Pl }  elseif ($1 == Portuguese) { return Pt }  elseif ($1 == Romanian) { return Ro }  elseif ($1 == Russian) { return Ru }  elseif ($1 == Serbian) { return Sr }  elseif ($1 == Slovak) { return Sk }  elseif ($1 == Slovenian) { return Sl }  elseif ($1 == Spanish) { return Es }  elseif ($1 == Turkish) { return Tr }}alias upd {  if ($1 == This Month) { return M }  elseif ($1 == This Week) { return W }  elseif ($1 == Today) { return D }}alias sort {  if ($1 == Date Added) { return video_date_uploaded }  elseif ($1 == View Count) { return video_view_count }  elseif ($1 == Rating) { return video_avg_rating }}alias cat {  if ($1 == All Categorys) { return all }  elseif ($1 == Autos & Vehicles) { return 2 }  elseif ($1 == Comedy) { return 23 }  elseif ($1 == Education) { return 27 }  elseif ($1 == Entertainment) { return 24 }  elseif ($1 == Film & Animation) { return 1 }  elseif ($1 == Howto & Style) { return 26 }  elseif ($1 == Music) { return 10 }  elseif ($1 == News & Politics) { return 25 }  elseif ($1 == Nonprofits & Activism) { return 29 }  elseif ($1 == People & Blogs) { return 22 }  elseif ($1 == Pets & Animals) { return 15 }  elseif ($1 == Science & Technology) { return 28 }  elseif ($1 == Sports) { return 17 }  elseif ($1 == Travel & Events) { return 19 }}alias dur {  if ($1 == Less Than 4 Mins) { return Short }  elseif ($1 == 4-20 Mins) { return Medium }  elseif ($1 == More Than 20 Mins) { return Long }}on *:DIALOG:youtube:sclick:*:{  if ($did == 14) {	if ($did(3)) {	  if ($did(5)) && ($did(7)) && ($did(9)) && ($did(11)) && ($did(13)) {		youtube $+($did(3),.,$did(5),.,$did(7),.,$did(9),.,$did(11),.,$did(13))		did -r $dname 15 | remini yt.ini sites | unset %x	  }	  else { noop $input(You need to select something $+ $chr(44) in all the dropdown boxes!,wo,Error!) }	}	else { $input(You need to enter something to search!,wo,Error!) }  }  if ($did == 17) {	if ($dialog($dname).tab == 20) {	  if ($did(15).sel) {		url www.youtube.com $+ $readini(yt.ini,sites,$v1)	  }	  else { noop $input(You need to select something!,wo,Error!) }	}	if ($dialog($dname).tab == 21) {	  if ($did(22).sel) {		url www.youtube.com $+ $gettok($readini(yt.ini,fav,$v1),2,64)	  }	  else { noop $input(You need to select something!,wo,Error!) }	}  }  if ($did == 18) {	if ($did(15).sel) {	  inc %fav	  writeini yt.ini fav %fav $did(15).seltext $+ @ $+ $readini(yt.ini,sites,$v1)	  did -a $dname 22 $did(15).seltext	}	else { noop $input(You need to select something!,wo,Error!) }  }  if ($did == 23) {	if ($did(22).sel) {	  did -d $dname 22 $v1	  remini yt.ini fav $v1	}	else { noop $input(You need to select something!,wo,Error!) }  }}alias -l nohtml { return $remove($regsubex($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null), ,",$chr(09)) }alias youtube {  if ($sock(yt)) { sockclose yt }  writeini yt.ini info query $replace($gettok($1-,1,46),$chr(32),_) | writeini yt.ini info dur $iif($dur($gettok($1-,2,46)),$v1,sdfvf)  writeini yt.ini info lang $iif($lang($gettok($1-,3,46)),$v1,sdfvf) | writeini yt.ini info cat $iif($cat($gettok($1-,4,46)),$v1,sdfvf)  writeini yt.ini info srb $iif($sort($gettok($1-,5,46)),$v1,sdfvf) | writeini yt.ini info up $iif($upd($gettok($1-,6,46)),$v1,sdfvf)  sockopen yt www.youtube.com 80}alias yt return $remove($readini(yt.ini,info,$1),sdfvf)on *:SOCKOPEN:yt:{  sockwrite -nt yt GET /results?search_query= $+ $yt(query) $+ &as=1&and_queries= $+ $yt(query) $+ &search_duration= $+ $yt(dur) $+ &search_hl= $+ $yt(lang) $+ &search_category_type= $+ $yt(cat) $+ $iif($yt(cat) != all,&search_category= $+ $yt(cat)) $+ &search_sort= $+ $yt(sort) $+ &uploaded= $+ $yt(up) HTTP/1.1  sockwrite -nt yt Host: www.youtube.com  sockwrite -nt yt $crlf}on *:SOCKREAD:yt:{  var %read  sockread %read  if (<div class="vlshortTitle"> isin %read) {	sockread %read	inc %x | .writeini yt.ini sites %x $gettok(%read,2,34)	did -a youtube 15 $replace($nohtml(%read),&,&,',')  }  elseif (No Videos found for isin %read) {	did -a youtube 15 $nohtml(%read)  }}

zChunkeh.jpg
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
  • Create New...