UPDATE=20080203 /* DATE.....................2007-12-03 garry .........................Downloads YOUTUBE and automatically copies link and automatically rename RECORD to MP3 with FreeVideoToMp3Converter.exe .........................http://www.dvdvideosoft.com/download/FreeVideoToMp3Converter.exe How to use.............. start script, start youtube , copy youtube-video-link with rightclick or CTRL+C download starts automatically to c:\_YOUTUBE , automatically rename play video with black background and/ or record it to xy.mp3 saves URL ..................................................................................................... diverse links .......... http://www.muvibee.com plays 50 videos and downloads to mozillacache ........................ http://www.dvdvideosoft.com/guides/dvd/extract-audio-from-video-to-mp3.htm ........................ http://www.dvdvideosoft.com/free-dvd-video-software.htm ........................ http://www.songza.com .............. Free Video to MP3 Converter ........................................................... http://www.dvdvideosoft.com/download/FreeVideoToMp3Converter.exe http://www.dvdvideosoft.com/products/dvd/Free-Video-to-MP3-Converter.htm Use Free Video to MP3 Converter to extract audio from video files (*.avi, *mpg, *.mpg, *.mp4, *.m4v, *.mpeg, *.dvr-ms, *.wmv, *.asf, *.mov, *.qt, *.3gp, *.3g2 and *.flv) and save it as MP3 There are 3 pre-configured presets: - High Quality (MP3, 256kbps, 48000Hz, STEREO); - Standard Quality (MP3, 128kbps, 44100Hz, STEREO); - Economy Quality (MP3, 96kbps, 22050Hz, STEREO). and TRIM video ........................................................................................................ ;http://www.autohotkey.com/forum/topic14882.html */ ;---------------------------------------------------------------------- #NoEnv setworkingdir, %a_scriptdir% NAMELV =funHU_YTB_AUDIO_RECORD03 autotrim,off Settitlematchmode, 2 clipboard= MyPLAYER =%A_ProgramFiles%\K-Lite Codec Pack\Media Player Classic\mplayerc.exe ;DIRECTCUT =%A_scriptDir%\MP3DIRECTCUT\mp3directcut.exe ;record xy.ram to xy.mp3 and cut mp3 files MP3extract =%A_programfiles%\DVDVideoSoft\Free Video to Mp3 Converter\FreeVideoToMP3Converter.exe ;------------------------------------------------------ ;-- where to save downloaded videos and recorded MP3 ------- R3V=C:\_YOUTUBE ;<<<<<< save here ifnotexist,%R3V% FileCreateDir,%R3V% YOUTUBEINI=YOUTUBEINI.txt ifnotexist,%YOUTUBEINI% { IniWrite, %A_DESKTOP% , %FILERECYCLEINI% ,DefineFolder , KEY1 ;Predefined Folder IniWrite, %A_DESKTOP% , %FILERECYCLEINI% ,LastSelectedFolder , KEY1 ;Last Selected Folder } menu,S1,Add,&Set a predefined Folder,MH1 ifexist,%MP3extract% menu,S1,Add,MP3_Extractor,MH2 menu,S1,Add,&About,MH3 menu,myMenuBar,Add,Settings,:S1 gui,1:menu,MyMenuBar ;----------------------------------------------------- ;F1=http://www.funpic.hu/en.picview.php?id=32137 ;for test ;F1=http://www.youtube.com/watch?v=iCKMzrPy4t4 F1= F2= F3=ytbe.txt F4=urlkeep.txt MAXSIZE=20000 ;delete file below this size transform,S,chr,32 nothing=%S% %S% WA=%A_screenwidth% HA=%A_screenheight% SW :=(WA*95)/100 ;width guishow width SH :=(HA*90)/100 ;height TDY :=(SH*96)/100 ;Y position Textfield below when mplayerc starts Gui,1:Font, S10 CDefault, FixedSys Gui,1:add, text, x0 y0 h0 w0 vTEXT3 ,%text4% ;text is hidden , see settimer AAS4 Gui,1:Add, Text, x5 y25 w60 h20 ,URL-1 Gui,1:Add, Text, x5 y50 w60 h20 ,NAME Gui,1:Add, Text, x5 y75 w60 h20 ,URL-2 Gui,1:Add, Text, x5 y100 w60 h20 ,PROCESS Gui,1:Add, Edit, x65 y25 w530 h20 vF1,%F1% Gui,1:Add, Edit, x65 y50 w530 h20 vF2 readonly,%F2% Gui,1:Add, Edit, x65 y75 w530 h20 readonly, Gui,1:Add,Progress,x65 y100 w530 h20 vPRBAR cFF7200 Gui,1:Add,Text, x65 y100 w530 +0x200 +Center +BackgroundTrans vText22, Gui,1:Add, Button, x10 y130 w90 h25 gYOUTUBE ,YOUTUBE Gui,1:Add, Button, x110 y130 w90 h25 gFUNHU ,FUNPIC ;Gui,1:Add, Button, x310 y130 w90 h25 gCLEAR ,CLEAR Gui,1:Add,Button ,x370 y130 w110 h25 gSF ,FileSelect Gui,1:Add, Button, x500 y130 w90 h25 gBREAK ,BREAK Gui,1:Add,Button ,x13 y470 w90 h25 gVIDEO ,VIDEO Gui,1:Add,Button ,x105 y470 w90 h25 gMUSIC1 ,MUSIC1 Gui,1:Add,Button ,x213 y470 w90 h25 gPREDEF ,PREDEF Gui,1:Add,Button ,x305 y470 w90 h25 gMUSIC2 ,MUSIC2 Gui,1:Add,Button ,x410 y470 w90 h25 gURLS ,URLS Gui,1:Add,Button ,x510 y470 w90 h25 gFOLDER ,FOLDER ;Gui,1:Add,Button ,x510 y470 w90 h25 gPLAYSTOP,PLAY-STOP ;if use the ahk-command soundplay TEXT1a=RECORD (RightClick) ifexist,%MP3extract% Gui,1:add,Text, cRED x220 y500 w300 vTEXT1,%text1a% Gui,1:Add,Edit, x90 y520 w500 h25 readonly, Gui,1:Add,Edit, x90 y550 w500 h25 readonly, Gui,1:Add,Edit, x90 y580 w500 h25 readonly, ;Gui,1:Add,Button, x2 y520 w80 h25 gDELETE ,DELETE Gui,1:Add,Button ,x2 y520 w80 h25 gDNL1 ,DNL1 > Gui,1:Add,Button ,x2 y550 w80 h25 gRUN1 ,RUN1 > T1 :=570 T2 :=0 T3 :=0 T4 :=0 LSW:=T1+T2+T3+20 GSW:=LSW+30 Gui,1:Font, S12 CDefault, Verdana Gui,1:Add, ListView, x10 y170 grid r14 w%LSW% +hscroll altsubmit vA1 gA2,Name|URL1|URL2|DATE Gui,1:Font, CDefault, FixedSys LV_ModifyCol(1,T1) LV_ModifyCol(2,T2) LV_ModifyCol(3,T3) LV_ModifyCol(4,T4) GuiControl,1:Focus,F1 ;RES3=YTB 100 YTB1=YOUTUBE Gui,1:Show, x0 y0 h620 w%GSW% ,%YTB1% [100] ;<<< YOUTUBE 100 is downloadstatus gosub,video gosub,DDDD settimer,DDDD,1000 ;means goto start return ;------------------ END MENU -------------------------------------- /* PLAYSTOP: soundplay,xxyy.mp3 GuiControl,1:Disable,PLAY-STOP return */ /* MP3EXTRACT: run,%A_programfiles%\DVDVideoSoft\Free Video to Mp3 Converter\FreeVideoToMP3Converter.exe return */ ;------------------------------ MENU ------------------------------- MH1: ;preselect to search from MF= FileSelectFolder,MF,,3 if MF= return IniWrite, %MF% , %YOUTUBEINI% ,DefineFolder , KEY1 ;Predefined Folder return MH2: run,%mp3extract% return MH3: msgbox,%NAMELV%`nhttp://www.autohotkey.com return ;-------------------------------------------- SF: Gui,1:submit,nohide IniRead, DF , %YOUTUBEINI% , DefineFolder , KEY1 MF= FileSelectFolder,MF,%DF%,3 if MF= return IniWrite, %MF% , %YOUTUBEINI% ,LastSelectedFolder , KEY1 return ;------------------ LISTVIEW -------------------------------------- A2: Gui,1: Submit, NoHide Gui,1:ListView,A1 RN:=LV_GetNext("C") ;2 selected checked RF:=LV_GetNext("F") ;2 selected focused GC:=LV_GetCount() ;4 total if A_GuiEvent=Normal { if (RN="" OR RN=0) return C1= C2= C3= C4= LV_GetText(C1,A_EventInfo,1) LV_GetText(C2,A_EventInfo,2) LV_GetText(C3,A_EventInfo,3) LV_GetText(C4,A_EventInfo,4) GuiControl,1:Text,Edit4,%C1% if URLS=1 { GuiControl,1:Text,Edit5,%C2% GuiControl,1:Text,Edit6,%C3% return } if MUSIC=1 { run,%C3% ;soundplay,%C3% ;GuiControl,1:Enable,PLAY-STOP return } goto,black } if A_GuiEvent = RightClick { if (VIDEO="1" OR PREDEF="1") { LV_GetText(C3,A_EventInfo,3) ;C3=fullpath SplitPath,C3,name, dir, ext, name_no_ext, drive if ext=flv goto,record } if URLS=1 { goto,deletemultiple } return } return ;----------- END LISTVIEW -------------------------------------- ;------------------ DELETEMULTIPLE Lines in file F4 ------------------ DELETEMULTIPLE: C1x= RF = 0 RFL = Loop { RF:=LV_GetNext(RF) if RF=0 break RFL = %RF%|%RFL% LV_GetText(C1_Temp, RF, 1) C1x = %C1x%`n%C1_Temp% } if C1x != { MsgBox, 4, ,Want you delete these lines in textfile %F4%`n%C1x% ? IfMsgBox,No Return Else { Loop, parse, RFL, | { LV_Delete(A_LoopField) } filedelete,%F4% Loop % LV_GetCount() { BX1= BX2= BX3= BX4= LV_GetText(BX1,A_INDEX,1) LV_GetText(BX2,A_INDEX,2) LV_GetText(BX3,A_INDEX,3) LV_GetText(BX4,A_INDEX,4) fileappend,%BX1%;%BX2%;%BX3%;%BX4%`r`n,%F4% } } } gosub,filllist1 return ;------------------ END DELETE ------------------------------------ ;--------------- READ URLS-FILE ---------------------------------------- URLS: text1a=(Rightclick) delete lines PREDEF=0 VIDEO =0 MUSIC =0 URLS =1 R3XX =%A_scriptdir% GuiControl,1:Enable,RUN1 > GuiControl,1:Disable,PLAY-STOP GuiControl,1:Disable,URLS GuiControl,1:Enable ,VIDEO GuiControl,1:Enable ,MUSIC1 GuiControl,1:Enable ,MUSIC2 GuiControl,1:Enable,PREDEF GuiControl,1:Enable,DELETE GuiControl,1:Enable,DNL1 > GuiControl,1:Text,TEXT1,%text1a% GuiControl,1:Text,Edit4, GuiControl,1:Text,Edit5, GuiControl,1:Text,Edit6, filllist1: LV_Delete() loop,read,%F4% { LR=%A_loopreadline% if LR= continue C1= C2= C3= C4= stringsplit,C,LR,`; LV_Add("",C1,C2,C3,C4) C1= C2= C3= C4= } return ;--------------- END READ URLS ------------------------------------------ ;--------------- READ FOLDERS-CONTENT ------------------------------------ PREDEF: IniRead, MF , %YOUTUBEINI% , LastSelectedFolder , KEY1 PREDEF=1 VIDEO =0 MUSIC =0 URLS =0 R3XX=%MF% extx=flv,divx,mpg,avi GuiControl,1:Disable,PLAY-STOP GuiControl,1:Disable,PREDEF GuiControl,1:Disable,DELETE GuiControl,1:Disable,DNL1 > GuiControl,1:Disable,RUN1 > GuiControl,1:Enable,MUSIC1 GuiControl,1:Enable,MUSIC2 GuiControl,1:Enable,VIDEO GuiControl,1:Enable,URLS GuiControl,1:Text,TEXT1,RECORD (RightClick) goto,CONT03 VIDEO: text1a=RECORD (RightClick) VIDEO =1 MUSIC =0 URLS =0 PREDEF=0 R3XX=%R3V% extx=flv,divx,mpg,avi GuiControl,1:Disable,PLAY-STOP GuiControl,1:Disable,VIDEO GuiControl,1:Disable,DELETE GuiControl,1:Disable,DNL1 > GuiControl,1:Disable,RUN1 > GuiControl,1:Enable,MUSIC1 GuiControl,1:Enable,MUSIC2 GuiControl,1:Enable,URLS GuiControl,1:Enable,PREDEF GuiControl,1:Text,TEXT1,%text1a% goto,CONT03 ;--------------------------- MUSIC1: R3XX=%R3V% GuiControl,1:Disable,MUSIC1 GuiControl,1:Enable,MUSIC2 goto, skip04 MUSIC2: IniRead, MF , %YOUTUBEINI% , LastSelectedFolder , KEY1 GuiControl,1:Disable,MUSIC2 GuiControl,1:Enable,MUSIC1 R3XX=%MF% skip04: VIDEO =0 MUSIC =1 URLS =0 PREDEF=0 extx=mp3 GuiControl,1:Disable,PLAY-STOP GuiControl,1:Disable,DELETE GuiControl,1:Disable,DNL1 > GuiControl,1:Disable,RUN1 > GuiControl,1:Enable ,VIDEO GuiControl,1:Enable,URLS GuiControl,1:Enable,PREDEF GuiControl,1:Text,TEXT1,%nothing% CONT03: GuiControl,1:Text,Edit4, GuiControl,1:Text,Edit5, GuiControl,1:Text,Edit6, LV_Delete() I:=0 FSIZE:=0 Loop %R3XX%\*.*,,1 { LR=%A_LoopFileLongPath% SplitPath,LR,name, dir, ext, name_no_ext, drive if ext contains %extx% { I++ Filegettime,TM1,%LR%,C LV_Add("",A_loopfilename,TM1,LR) ;<< LR=FullPath } } LV_ModifyCol(2,"integer") LV_ModifyCol(2, "Sort") LV_Modify(LV_GetCount(), "Vis") ;scrollt nach unten return ;--------------- END READ FOLDERS-CONTENT ------------------------------------ FOLDER: run,%R3XX% return TEST: run,control desk.cpl,,3 return BREAK: reload return CLEAR: GuiControl,1:Focus,F1 GuiControl,1:Text,Edit1, GuiControl,1:Text,Edit2, GuiControl,1:Text,Edit3, GuiControl,1:,Text22, GuiControl,1:+cC8D0D4,PRBAR return FUNHU: run,http://www.funpic.hu/en.gallery.php?id=-2&s=dd&p=1 return YOUTUBE: run,http://www.youtube.com return ;-------------------------- RECORD --------------------------------- RECORD: gui,1:submit,nohide ifnotexist,%mp3extract% { msgbox,262144,,Download MP3Extract`r`nhttp://www.dvdvideosoft.com/download/FreeVideoToMp3Converter.exe return } if (RF="" OR RF=0) { msgbox,262144,,Select a row return } ifexist,%C3% { SplitPath,C3, name, dir, ext, name_no_ext, drive if ext=mp3 { msgbox, Don't record an mp3 file return } sleep,100 run,%mp3extract% winwaitactive,ahk_class TfrmMain,,5 if ErrorLevel { MsgBox, WinWait for %MP3extract% TfrmMain is timed out. return } else { send,%C3% return } return } return ;------------------ END RECORD ----------------------------------------------- ;--- run youtube -------- RUN1: Gui,1:submit,nohide if C2= return run,%C2% return ;=========================================================================== DDDD: Gui,1:submit,nohide URL1=%clipboard% if URL1 contains watch?v= goto,start2 if URL1 contains funpic goto,start2 return ;----------------------------------- START: gui,1:submit,nohide ;---------------------------------------- DNL1: Gui,1:submit,nohide if C2= return clipboard= URL1=%C2% START2: GuiControl,1:Text,Edit1,%URL1% clipboard= settimer,DDDD,off skip2: gui,1:submit,nohide ;start to search for name if URL1= { msgbox,URL is missing return } WinSetTitle,%YTB1% [100], ,%YTB1% [0] GuiControl,1:Text,Edit3, GuiControl,1:Text,Edit2, GuiControl,1:,PRBAR,%nothing% GuiControl,1:,Text22,%nothing% ;============================================================================ ;===================== FUNPIC =============================================== if URL1 contains funpic { ;-- search for URL --------------------------------- StringGetPos,VAR1,URL1,id= VAR1:=(VAR1+4) stringmid,NEW,URL1,VAR1,5 stringleft,N1,NEW,2 ;------- search for title ------------------- ;
Description: A little acting ;)

Splashimage,,b w600 h30 CWred m9 b fs10 zh0,DOWNLOAD Search for URL2 >>> %URL1% urldownloadtofile,%URL1%,%F3% ;Splashimage, off Loop,Read,%F3% { LR=%A_LoopReadLine% ifinstring,LR,Description { StringGetPos,P1,LR,Description StringGetPos,P2,LR, P1:=(P1+22) P2:=(P2+1) P3:=(P2-P1) stringmid,DESCR,LR,P1,P3 NAME=%DESCR% break } } gosub,REMOVECHR URL2=http://www.funpic.hu/files/pics/000%N1%/000%NEW%.flv ;new download adress URL-2 sleep,2000 Splashimage, off goto,AA } ;=============== END FUNPIC ======================================= ;-------------- YOUTUBE NAME AND URL2 SEARCH ------------------------------------ if URL1 contains youtube { ;

To view this video or group, please verify you are 18 or older by logging in or signing up.

;http://www.youtube.com/watch?v=J7noYuasI3k ;http://www.youtube.com/get_video?video_id=J7noYuasI3k&t=OEgsToPDskIIxLKb0nOjWRbyOGxTrhC5 ;OLD changed ;var fullscreenUrl = '/watch_fullscreen?video_id=J7noYuasI3k&l=127&t=OEgsToPDskIIxLKb0nOjWRbyOGxTrhC5&sk=MYb6O0VPCVC_NLFr57SeNQC&fs=1&title=Vira_velho Carla_Pires'; ;var fullscreenUrl = '/watch_fullscreen?video_id=vxKaeA_si2c&l=125&t=OEgsToPDskI6BgnXQ5BnFGqwtv6sut_C&sk=-UaeU-AlR9G76MM4tCStvQC&fs=1&title=Adios Amigo'; Splashimage,,b w600 h30 CWred m9 b fs10 zh0,DOWNLOAD Search for name and URL2 >>> %URL1% UrlDownloadToFile,%URL1%,%F3% ;<<<<<<< sleep,2000 Splashimage, off TITLE = name = adress= URL2 = VANAF1=watch_fullscreen?fs=1&e=h&video_id= UNTIL1=&hl= VANAF2=&title= UNTIL2='; V=0 Loop,Read,%F3% { LR=%A_LoopReadLine% ifinstring,LR,%VANAF1% { StringGetPos,VAR1,LR,%VANAF1% StringGetPos,VAR2,LR,%UNTIL1% VAR1:=(VAR1+36) VAR2:=(VAR2+1) VAR3:=(VAR2-VAR1) VAR4=http://www.youtube.com/get_video?video_id= stringmid,ADRESS,LR,VAR1,VAR3 URL2=%VAR4%%ADRESS% ;<<<< new adress URL2 StringGetPos,VAR11,LR,%VANAF2% StringGetPos,VAR12,LR,%UNTIL2% VAR11:=(VAR11+8) VAR12:=(VAR12+1) VAR13:=(VAR12-VAR11) stringmid,TITLE,LR,VAR11,VAR13 stringreplace,TITLE,TITLE,quot,%S%,all stringreplace,TITLE,TITLE,",%S%,all stringreplace,TITLE,TITLE,&,%S%,all ;stringreplace,TITLE,TITLE,-,%S%,all stringreplace,TITLE,TITLE,ç,c,all stringreplace,TITLE,TITLE,é,e,all stringreplace,TITLE,TITLE,è,e,all stringreplace,TITLE,TITLE,ñ,n,all stringreplace,TITLE,TITLE,ã,a,all stringreplace,TITLE,TITLE,ç,c,all ;ç stringreplace,TITLE,TITLE,ã,a,all ;ã stringreplace,TITLE,TITLE,ö,oe,all ;ö stringreplace,TITLE,TITLE,é,e,all ;é stringreplace,TITLE,TITLE,Ã,a,all ;à name=%TITLE% ;<<<< found name break } } if URL2= { msgbox,URL2 not found WinSetTitle,%YTB1% [0], ,%YTB1% [100] settimer,DDDD,1000 return } gosub,REMOVECHR ;--- F2 is the newname --- } Splashimage,,b w600 h30 CWred m9 b fs10 zh0,DOWNLOAD >>> %F2% sleep,3000 Splashimage, off goto,AA ;============================================================================= ;------------------------------------ AA: stringmid,ANOW1,A_NOW,1,12 Fileappend,%F2%`;%URL1%`;%URL2%`;%ANOW1%`r`n,%F4% ;save name URL1 URL2 date SKIP4: SIZE3:=HttpQueryInfo(URL2,5) ;<<< check size from new URL2 adress GuiControl,1:+RANGE0-%SIZE3%,PRBAR ;CHANGE processbar GuiControl,1:Text,Edit3,%URL2% ; URL-2 GuiControl,1:Text,Edit2,%F2% ; name F2=%R3V%\%F2% ;--------------------- settimer,AAS4,250 title = (%res1%) URLDownloadToFile,%URL2%,%F2% ;downloads to %R3V% <<<<<<<<<<<<<<<<<<<<<< settimer,AAS4,OFF ;--------- DOWNLOAD FINISHED ---------------------------------------------- ;new DDDD test GuiControl,1:,PRBAR, %SIZE3% GuiControl,1:,Text22,FINISHED 100 `% SIZE=%SIZE3% WinSetTitle,%YTB1% [%RES2%], ,%YTB1% [100] Splashimage,,b w600 h30 CWlime m9 b fs10 zh0,DOWNLOAD >>> %filename% FINISHED sleep,3000 Splashimage, off settimer,DDDD,1000 ;wait for new adress ;------------------ Filegetsize,size5,%F2% if size5<%MAXSIZE% { Filedelete,%F2% GuiControl,1:,Text22,DELETED return } run,%F2% ;run xy.flv with default player like VLC/FLV-/GOMPLAYER gosub,video return ;-------------------------------------------- ;================= GOSUBS ================================== AAS4: Filegetsize,size1,%F2% RES1:=Round((100*SIZE1)/SIZE3) GuiControl,1:,PRBAR, %SIZE1% GuiControl,1:,Text22,%RES1% `% SIZE=%SIZE3% Guicontrolget,text3 ;<< 1-99 WinSetTitle,%YTB1% [%RES2%], ,%YTB1% [%RES1%] RES2=%RES1% Text4=%Res2% GuiControl,1:Text,TEXT3,%text4% return ;================ END AAS4 ================================= ;---------- remove special characters ---------------------- REMOVECHR: new2= Loop,Parse,NAME { A:=(Asc(A_LoopField)) B:=chr(a) if (B="_" OR B=" ") ;allow _space autotrim,off Goto,SKIP8 if ((a<48 or a>57) AND A<65 OR A>90 AND A<97 OR A>122) continue SKIP8: new2=%new2%%b% } stringmid,ANOW1,A_NOW,1,12 ;not readable chinese... if new2= { new2=_%ANOW1%.flv F2=%new2% return } new2=%new2%.flv F2=%new2% ifexist,%R3V%\%F2% F2=_%ANOW1%_%F2% F2:=uridecode(F2) ;TITAN 20070503 http://www.autohotkey.com/forum/topic18876.html ; Find uri encoded characters such as %20 (space) and replace with ascii character uriDecode(str) { pos = 1 Loop If pos := RegExMatch(str, "i)(?<=%)[\da-f]{2}", hex, pos++) StringReplace, str, str, `%%hex%, % Chr("0x" . hex), All Else Break F2=%STR% Return,F2 } return ;----------------- END REMOVE SPECIAL CHARACTERS --------------------------------- ;############################### BLACK ################################### ;-------------------------------------------------------------------------------------------------- BLACK: SysGet m, MonitorWorkArea Gui,4:-Border Gui,4:Color,000000 ;BLACK Gui,4:Font,S12 cwhite, Verdana SW4 :=(WA*95)/100 ;width SH4 :=(HA*90)/100 ;height TY4 :=(HA*87)/100 ;Gui,4:Add, GroupBox, Section x50 w%SW4% h%SH4%, Gui,4:Add,Text,center y%TY4% w%SW% cWhite,%C1% Gui,4:Font,S10 cRed, Verdana Gui,4:Add, GroupBox, x20 y20 w%SW4% h%SH4%, Gui,4:Show,% "x" mLeft+2 " y" mTop+2 " w" mRight-mLeft-10 " h " mBottom-mTop-10, BLACK ifexist,%MyPlayer% ;mplayerc.exe { PA="%C3%" /fixedsize 1000,750 sleep,1000 Run,%MyPLAYER% %PA%,,hide,pid3 Process,wait,mplayerc.exe PID2 = %ErrorLevel% Process,exist,mplayerc.exe { WinWaitActive,Media Player Classic,,5 { sleep,50 send,^0 ; remove border from mplayerc when once positioned } } return } run,%C3% return ;------------------------------------------------------------------------------------------------- ;############################### END BLACK ################################### ;################## ESCAPE ################################################# ~ESC:: gui,1:submit,nohide Gui,4:destroy process,close,%PID3% return ;=========================================================================== ;============================================================== guiclose: exitapp ;============================================================== ;-------------------------- FUNCTION GETSIZE before download ------------------------- ;http://www.autohotkey.com/forum/topic10510.html ; Olfen PhiLho ;SIZE:=HttpQueryInfo(URL, 5) ;msgbox,262144,MESSAGE,SIZE = %SIZE% Byte /* ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HttpQueryInfo ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; QueryInfoFlag: HTTP_QUERY_RAW_HEADERS = 21 Receives all the headers returned by the server. Each header is terminated by "\0". An additional "\0" terminates the list of headers. HTTP_QUERY_CONTENT_LENGTH = 5 Retrieves the size of the resource, in bytes. HTTP_QUERY_CONTENT_TYPE = 1 Receives the content type of the resource (such as text/html). Find more at: http://msdn.microsoft.com/library/en-us/wininet/wininet/query_info_flags.asp Proxy Settings: INTERNET_OPEN_TYPE_PRECONFIG 0 // use registry configuration INTERNET_OPEN_TYPE_DIRECT 1 // direct to net INTERNET_OPEN_TYPE_PROXY 3 // via named proxy INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY 4 // prevent using java/script/INS ; Examples: ; url1 = http://www.autohotkey.com ; url2 = http://www.autohotkey.com/download/AutoHotkeyInstall.exe ; MsgBox % HttpQueryInfo(url1) ; MsgBox % HttpQueryInfo(url2, 5) ; MsgBox % HttpQueryInfo(url2, 1) USAGE= Example for size: #Include dlfilesize.ahk ;------ Jim reeves Mexican Joe ---- url=http://www.youtube.com/watch?v=YSx_kgXQJDg SIZE:=HttpQueryInfo(URL, 5) MsgBox,64,Info,Dateigröße = %SIZE% Byte */ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; HttpQueryInfo(URL, QueryInfoFlag=21, Proxy="", ProxyBypass="") { hModule := DllCall("LoadLibrary", "str", "wininet.dll") If (Proxy != "") AccessType=3 Else AccessType=1 io_hInternet := DllCall("wininet\InternetOpenA" , "str", "" ;lpszAgent , "uint", AccessType , "str", Proxy , "str", ProxyBypass , "uint", 0) ;dwFlags If (ErrorLevel != 0 or io_hInternet = 0) { DllCall("FreeLibrary", "uint", hModule) return, -1 } iou_hInternet := DllCall("wininet\InternetOpenUrlA" , "uint", io_hInternet , "str", url , "str", "" ;lpszHeaders , "uint", 0 ;dwHeadersLength , "uint", 0x80000000 ;dwFlags: INTERNET_FLAG_RELOAD = 0x80000000 // retrieve the original item , "uint", 0) ;dwContext If (ErrorLevel != 0 or iou_hInternet = 0) { DllCall("FreeLibrary", "uint", hModule) return, -1 } VarSetCapacity(buffer, 1024, 0) VarSetCapacity(buffer_len, 4, 0) Loop, 5 { hqi := DllCall("wininet\HttpQueryInfoA" , "uint", iou_hInternet , "uint", QueryInfoFlag ;dwInfoLevel , "uint", &buffer , "uint", &buffer_len , "uint", 0) ;lpdwIndex If (hqi = 1) { hqi=success break } } IfNotEqual, hqi, success, SetEnv, res, timeout If (hqi = "success") { p := &buffer Loop { l := DllCall("lstrlen", "UInt", p) VarSetCapacity(tmp_var, l+1, 0) DllCall("lstrcpy", "Str", tmp_var, "UInt", p) p += l + 1 res := res . "`n" . tmp_var If (*p = 0) Break } StringTrimLeft, res, res, 1 } DllCall("wininet\InternetCloseHandle", "uint", iou_hInternet) DllCall("wininet\InternetCloseHandle", "uint", io_hInternet) DllCall("FreeLibrary", "uint", hModule) return, res } ;------------------------------------------------------------------