Deutsches AutoHotkey Homepage AutoHotkey Community
Wir helfen uns gegenseitig aus der Patsche
 
 FAQFAQ   SuchenSuchen   MitgliederlisteMitgliederliste   RegistrierenRegistrieren 
 ProfilProfil   Einloggen, um private Nachrichten zu lesenEinloggen, um private Nachrichten zu lesen   LoginLogin 

Lachen mit Klaus

 
Neues Thema eröffnen   Neue Antwort erstellen    AutoHotkey Community Foren-Übersicht -> Skripte & Funktionen
Vorheriges Thema anzeigen :: Nächstes Thema anzeigen  
Autor Nachricht
garry



Anmeldedatum: 25.10.2005
Beiträge: 422
Wohnort: switzerland

BeitragVerfasst am: So Jun 04, 2006 8:15 pm    Titel: Lachen mit Klaus Antworten mit Zitat

hier ein Beispiel von HR-3:
kurze Witze hören (download alle xy.mp3, im Moment 164)
-Knopf start drücken, die Witze landen im Subordner _DOWNLOAD

oder RSS benützen:
http://podcast.hr-online.de/lachenmitklaus/podcast.xml
oder Unterrubrik Spass/Comedy:
http://www.hr-online.de/website/radio/hr3/index.jsp?rubrik=2766
Code:

/*
Date    =2006-06-04  garry
Name    =Lachen mit Klaus.ahk
*/

R3M=_DOWNLOAD
ifnotexist,%R3M%
FileCreateDir,%R3M%

VARX=MP3

Gui,1:Color, 000000
Gui,1:Font,  S10 CDefault , FixedSys

GUY:=400
GSW:=1000            ;GuiShow  width
GSH:=510             ;GuiShow  height
ROW:=26

LSW:=(GSW-30)          ;ListView width
T1 :=(LSW-130)         ;TAB1
T2 :=100               ;TAB2
T1Y:=(GSH-30)          ;Y

LV_ModifyCol(1,T1)
LV_ModifyCol(2,T2)
LV_ModifyCol(2,"Integer")

Gui,1:Add, ListView,grid y18 20 r%ROW% w%LSW% +hscroll altsubmit vMyListView gMyListView,URL|Size
    Gui,1:Font,S8 cwhite, Verdana
    Gui,1:Add,Text,x20  y2 vTotal1  w100,%I%
    Gui,1:Font,  S10 CDefault , FixedSys
    Gui,1:Add,Button,x20  y%T1Y% w80 h25 gDNL_ALLX ,START
    Gui,1:Add,Button,x120 y%T1Y% w80 h25 gSTOP     ,STOP
    Gui,1:Add,Button,x220 y%T1Y% w80 h25 gFOLDER   ,FOLDER

FILL:
    I:=0
    LV_Delete()
    Loop, %R3M%\*.*
     {
     I++
     LV_Add("", A_LoopFileName, A_LoopFileSize)
     LV_ModifyCol(1,T1)
     LV_ModifyCol(2,T2)
     LV_ModifyCol(2,"Integer")
      }
    GuiControl,1:,total1,%I%

Gui,1: Show, x2 y%GUY% w%GSW% h%GSH% ,%NAME%
return
;==============================================
FOLDER:
runwait,%R3M%
return
;----------------
STOP:
RL=1
return
;==============================================

DNL_ALLX:
Gui,1:submit,nohide
GuiControl,1:Disable,START

F1=lachenmitklaus.txt
F2=url2.txt
Filedelete,%F1%
Filedelete,%F2%
LAC=.MP3


URLX=http://podcast.hr3.de/lachenmitklaus
   Splashimage,,M2 x80 y5 CWred   fs10,%URLX%,DOWNLOAD >>>
   URLDownloadToFile,%URLX%,%F1%
   sleep,1000
   Splashimage, off


K=0
A=href=
T=
Loop,Read, %F1%
{
T=%A_LoopReadLine%
StringReplace t,T,.%A_Space%,`,,All
StringRight r,t,1
IfEqual r,., StringTrimRight t,t,1
Loop Parse,t,`,` `>`;?`!
     {
   StringLeft r,A_LoopField,5
   If r=%A%
         {
   stringlen,L1,A_loopfield
   stringmid,ALF,A_loopfield,7,L1-7
   stringright,Q4,ALF,4
   if Q4 contains %LAC%
               {
   fileappend,http://podcast.hr3.de/lachenmitklaus/%ALF%`r`n,%F2%
   K++
               }
         }
     }
}

if K<1
  {
msgbox,Check http://podcast.hr3.de/lachenmitklaus
return
  }

   loop,read,%F2%
         {
         if RL=1
            {
         SplashTextOff
         GuiControl,1:Enable,START
         goto,fill
            }
         C3=%A_LOOPREADLINE%
         SplitPath,A_LOOPREADLINE, name, dir, ext, name_no_ext, drive
         if ext=%VARX%
              {
 stringlen,L,C3
 StringGetPos,C,C3,/,R1
 C:=(L-C)
 stringright,SR,C3,C-1
   SplashTextOn,400,60,%C3%,START >>  Download
   URLDownloadToFile,%C3%,%R3M%\%SR%
              }
         }
   SplashTextOff
   GuiControl,1:Enable,START
   goto,fill
   return
;---------------------------------------------
MyListView:
GuiControlGet, MyListView
if A_GuiEvent = Normal
    {
    C1=
    LV_GetText(C1,A_EventInfo,1)
    }

if A_GuiEvent = DoubleClick
   {
   C1=
   LV_GetText(C1,A_EventInfo,1)
   run,%r3m%\%C1%
   }
return
;----------------------------------------------
Guiclose:
Guiescape:
ExitApp
Nach oben
Benutzer-Profile anzeigen Private Nachricht senden
Beiträge der letzten Zeit anzeigen:   
Neues Thema eröffnen   Neue Antwort erstellen    AutoHotkey Community Foren-Übersicht -> Skripte & Funktionen Alle Zeiten sind GMT
Seite 1 von 1

 
Gehe zu:  
Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.


Powered by phpBB © 2001, 2005 phpBB Group
Deutsche Übersetzung von phpBB.de