Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Modified=20140412
- SplitPath,a_scriptname, name, dir, ext, name_no_ext, drive
- F1=%a_scriptdir%\%name_no_ext%.ini
- I=10 ;- total checkboxes
- src=Najeeb Khan
- Gui,2: Color, ControlColor, Black
- Gui,2: Font, CDefault, Lucida Console
- Loop,%i%
- {
- IniRead, Ch%A_Index%, %f1%, ss, Cb%A_Index% , 0
- If (Ch%A_Index% = 1)
- Cb%A_Index% = Checked
- Else
- Cb%A_Index% =
- }
- Gui,2: Show, x100 y5 w300 h440, %name_no_ext%
- Gui,2: Add, Edit, x20 y5 w265 h20 cWhite vSearch,%src%
- Gui,2: Add, CheckBox, x20 y40 vCh1 %cb1% cYellow, Google
- Gui,2: Add, CheckBox, x20 y65 vCh2 %cb2% cYellow, Google I``m feeling lucky
- Gui,2: Add, CheckBox, x20 y90 vCh3 %cb3% cYellow, Bing Pictures
- Gui,2: Add, CheckBox, x20 y115 vCh4 %cb4% cYellow, Flickr Pictures
- Gui,2: Add, CheckBox, x20 y140 vCh5 %cb5% cYellow, Google Pictures
- Gui,2: Add, CheckBox, x20 y165 vCh6 %cb6% cYellow, Google News
- Gui,2: Add, CheckBox, x20 y190 vCh7 %cb7% cYellow, Google News NL
- Gui,2: Add, CheckBox, x20 y215 vCh8 %cb8% cYellow, Google Video
- Gui,2: Add, CheckBox, x20 y240 vCh9 %cb9% cYellow, Google PDF
- Gui,2: Add, CheckBox, x20 y265 vCh10 %cb10% cYellow, Wikipedia
- Gui,2: Add, CheckBox, x20 y330 vCh98 gCheckAll cYellow, Select All
- Gui,2: Add, CheckBox, x20 y355 vCh99 gUnCheckAll cYellow, De-Select All
- Gui,2: Add, Button, x10 y400 w100 h26 gAA ,Start
- GuiControl,2:Focus,search
- return
- CheckAll:
- Loop, %i%
- GuiControl,2:, Ch%A_Index%, 1
- GuiControl,2:, Ch99, 0
- Return
- UnCheckAll:
- Loop, %i%
- GuiControl,2:, Ch%A_Index%, 0
- GuiControl,2:, Ch98, 0
- Return
- AA:
- Gui,2: submit, nohide
- StringReplace,Search, Search, %A_space%, +, All
- search=`%22%search%`%22
- if Ch1
- run,http://www.google.de/search?hl=&q=%search%
- if Ch2
- run,http://www.google.com/search?btnI=I`%27m+Feeling+Lucky&q=%search%
- if Ch3
- run,http://www.bing.com/images/search?q=%search%&FORM=HDRSC2
- if Ch4
- run,https://www.flickr.com/search/?q=%search%
- if Ch5
- run,https://www.google.com/search?q=%search%&tbm=isch
- if Ch6
- run,https://www.google.com/search?q=%search%#q=%search%&tbm=nws
- if Ch7
- run,https://www.google.com/search?q=%search%#q=%search%&tbm=nws&hl=nl ;- hl=nl nederlands
- if Ch8
- run,https://www.google.com/search?q=%search%#q=%search%&tbm=vid
- if Ch9
- run,http://www.google.de/search?hl=&q=%search% filetype:pdf
- if Ch10
- {
- StringReplace,search,search,+,%A_space%, All
- StringUpper,search,search,T
- StringReplace,search,search,%A_space%,_, All
- StringReplace,Search,Search,`%22, , All
- run, http://en.wikipedia.org/wiki/%search%
- }
- return
- 2GuiClose:
- Gui,2: Submit
- Loop,%i%
- {
- e= % ch%a_index%
- IniWrite, %e%, %f1%, ss, Cb%a_index%
- }
- ExitApp
- ;===========================================================================
- ;- yt-dlp.exe for test / download youtube or dailymotion etc ... as MP4 or MP3
- ;- creates a folder at desktop > \M_VIDEO_AUDIO ( downloaded MP3 or MP4 is here )
- ;======================================================================================
- ;-
- ;- https://github.com/yt-dlp/yt-dlp#update
- ;- https://github.com/yt-dlp/yt-dlp
- ;- https://write.corbpie.com/downloading-youtube-videos-and-playlists-with-yt-dlp/
- ;- https://youtube-dl.org/latest/youtube-dl.exe ( replaced with yt-dlp / no update since 2021-06-06 )
- ;- https://ffmpeg.org/download.html#build-windows ( needed for MP3 / 7zip-file)
- ;-
- ;--
- fdpro1:=a_scriptdir . "\YT_programs1" ;- here only yt-dlp.exe ( for VIDEO / don't get MP4 with ffmpeg (?) )
- ifnotexist,%fdpro1%
- filecreatedir,%fdpro1%
- ;-
- fdpro2:=a_scriptdir . "\YT_programs2" ;- here yt-dlp-exe ffmpeg.exe ffprobe.exe ( for MP3 )
- ifnotexist,%fdpro2%
- filecreatedir,%fdpro2%
- ;-
- ;-
- youtubedl1:=fdpro1 . "\yt-dlp.exe" ;- only yt-dlp.exe ( for VIDEO MP4 )
- youtubedl2:=fdpro2 . "\yt-dlp.exe" ;- ( for AUDIO MP3 )
- ;-
- ifexist,%youtubedl1%
- {
- loop,%youtubedl1%
- SP1:=A_loopFileShortPath
- ;RunWait, %comspec% /k %sp1% -U ;- Update
- }
- ;-
- ifexist,%youtubedl2%
- {
- loop,%youtubedl2%
- SP2:=A_loopFileShortPath
- ;RunWait, %comspec% /k %sp2% -U ;- Update
- }
- else
- {
- F0:="https://youtube-dl.org/latest/youtube-dl.exe"
- F1:="https://github.com/yt-dlp/yt-dlp#update"
- F2:="https://ffmpeg.org/download.html#build-windows"
- run,%f1%
- run,%f2%
- return
- }
- ;-----
- ;--
- fdmpx:=a_desktop . "\M_VIDEO_AUDIO"
- ifnotexist,%fdmpx%
- filecreatedir,%fdmpx%
- ;--
- ;-------------------------------------------------------------------
- url:="https://www.youtube.com/watch?v=PtzaMHjf_3Q" ;- A mouse divided 1953 cartoon
- ;url:="https://www.dailymotion.com/video/x6bap58" ;- Maitetxu mia - lilian de celis
- ;---------------
- ;==============
- ;-- VIDEO >
- {
- Runwait, %comspec% /k %sp1% %url% --encoding UTF-8 --verbose --youtube-skip-dash-manifest -o "%fdmpx%\`%(title)s-`%(uploader)s-`%(id)s.`%(ext)s"
- ;- create xy.vtt file if subtitle exist
- ;RunWait, %comspec% /k %sp1% %url% --encoding UTF-8 --verbose --youtube-skip-dash-manifest -k --write-auto-sub --sub-lang de -o "%fdmpx%\`%(title)s$`%(uploader)s$`%(id)s.`%(ext)s"
- }
- ;-- MUSIC >
- ;RunWait, %comspec% /k %sp2% %url% -x --audio-format mp3 --audio-quality 320k --encoding UTF-8 --embed-thumbnail --youtube-skip-dash-manifest -o "%fdmpx%\`%(title)s$`%(uploader)s$`%(id)s.`%(ext)s" ;- needs ffmpeg.exe
- return
- ;=================================================================================
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement