phatjk

Get Direct Link Google Drive

Dec 29th, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.50 KB | None | 0 0
  1. $url = InputBox('Get Direct Link Google Drive', 'Type your file url')
  2. If @error Then Exit
  3. $DirectLink = GetDirectLinkGoogleDrive($url)
  4. InputBox('Get Direct Link Google Drive', 'Your Direct Link is :', $DirectLink)
  5.  
  6. Func GetDirectLinkGoogleDrive($url)
  7.     If StringInStr($url, 'folders') Then
  8.         MsgBox(16, 'Error', 'Not Support Folder Url')
  9.         Exit
  10.     EndIf
  11.     $KQ = StringRegExp($url, '[-\w]{25,}', 1)
  12.     Return 'https://drive.google.com/uc?export=download&id=' & $KQ[0]
  13. EndFunc   ;==>GetDirectLinkGoogleDrive
Add Comment
Please, Sign In to add comment