Advertisement
alien_fx_fiend

YouTube Links Converter Script (Multi-GUI Defunct) Fixed

Jun 27th, 2020
2,597
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance force
  2. #NoEnv
  3. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  4. #Persistent
  5.  
  6. #!y::
  7.     Gui, New, , YT URL Shortener
  8.     Gui, Add, Text, x4 y7, URL:
  9.     Gui, Add, Edit, x32 y5 w400 h18 vURL
  10.     Gui, Add, Button, x435 y4 h20 Default gShort, GO!
  11.     Gui -Resize -SysMenu +ToolWindow +AlwaysOnTop
  12.     Gui, Show, w470
  13.     Return
  14.  
  15. Short:
  16.     Gui, Submit
  17.     Gui, Hide
  18.     Name := URL
  19.     Name := strReplace(Name,"www.youtube.com","youtu.be")
  20.     Name := strReplace(Name,"/watch?v=", "/")
  21.     GuiControl, , URL, %Name%
  22.     Gui, Show
  23.     Return
  24.    
  25. GuiClose:
  26. GuiEscape:
  27.     Gui, Destroy
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement