Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #region
- #AutoIt3Wrapper_UseUpx=Y
- #AutoIt3Wrapper_Compression=4
- #AutoIt3Wrapper_Icon=E:\wamp\www\favicon.ico
- #AutoIt3Wrapper_Res_Comment=Coded by Juno_okyo
- #AutoIt3Wrapper_Res_Description=Coded by Juno_okyo
- #AutoIt3Wrapper_Res_Fileversion=1.0.0.0
- #AutoIt3Wrapper_Res_ProductVersion=1.0.0.0
- #AutoIt3Wrapper_Res_LegalCopyright=(c) 2014 by Juno_okyo's Blog
- #AutoIt3Wrapper_Res_Field=ProductName|Juno_okyo's Production
- #AutoIt3Wrapper_Res_Field=ProductVersion|1.0.0.0
- #AutoIt3Wrapper_Res_Field=CompanyName|J2TeaM
- #endregion
- ; Includes
- #include <Misc.au3>
- #include <ButtonConstants.au3>
- #include <EditConstants.au3>
- #include <GUIConstantsEx.au3>
- #include <StaticConstants.au3>
- #include <WindowsConstants.au3>
- #include <Inet.au3>
- ; Only One Instance
- _Singleton(@ScriptName)
- ; Options
- #NoTrayIcon
- Opt('WinTitleMatchMode', 2)
- Opt('GUIOnEventMode', 1)
- Opt('GUICloseOnESC', 0)
- ; Script Start - Add your code below here
- Global Const $API = 'http://fb-elly.rhcloud.com/youtube.php?v='
- #Region ### START Koda GUI section ### Form=
- Global $FormMain = GUICreate("Get link Youtube by Juno_okyo", 423, 45, -1, -1)
- GUISetFont(12, 400, 0, "Arial")
- GUISetOnEvent($GUI_EVENT_CLOSE, "FormMainClose")
- Global $Label1 = GUICtrlCreateLabel("Video URL:", 5, 11, 85, 22)
- Global $Input1 = GUICtrlCreateInput("", 95, 8, 262, 26, BitOR($GUI_SS_DEFAULT_INPUT,$ES_CENTER))
- Global $Button1 = GUICtrlCreateButton("GET", 365, 8, 50, 25)
- GUICtrlSetCursor(-1, 0)
- GUICtrlSetOnEvent(-1, "Button1Click")
- GUISetState(@SW_SHOW)
- #EndRegion ### END Koda GUI section ###
- While 1
- Sleep(100)
- WEnd
- Func Button1Click()
- Local $videoID = GUICtrlRead($Input1)
- ;=> Check for Full URL
- Local $test = StringRegExp($videoID, 'https?://(www\.)?youtube\.com/watch\?v=([A-z0-9]{10,12})', 1)
- If Not @error Then $videoID = $test[1]
- Local $data = _INetGetSource($API & $videoID)
- $data = StringSplit($data, @CRLF)
- For $i = 1 To $data[0]
- If $data[$i] = '' Then ContinueLoop
- ConsoleWrite(@CRLF)
- Local $temp = StringSplit($data[$i], '|')
- ConsoleWrite($temp[1] & ' => ' & $temp[2] & @CRLF)
- Next
- EndFunc
- Func FormMainClose()
- Exit
- EndFunc
Add Comment
Please, Sign In to add comment