Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. Public Class Form1
  2.  
  3. Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
  4.  
  5. If Len(TextBox1.Text) < 3 Then
  6. MsgBox("URL must not be empty")
  7. Exit Sub
  8. End If
  9. Dim endsl As Integer
  10. Dim recip As Integer
  11. endsl = InStr(1, TextBox1.Text, "make/") + 5
  12. endsl = InStr(endsl, TextBox1.Text, "/") + 1
  13. recip = InStr(1, TextBox1.Text, "recip") - 1
  14.  
  15. TextBox2.Text = "https://www.jibjab.com/makes/" & Mid(TextBox1.Text, endsl, recip - endsl) & ".mp4"
  16.  
  17. Process.Start(TextBox2.Text)
  18.  
  19. 'https://www.jibjab.com/makes/7684de43-4e60-404c-a85d-b79929f90dc3.mp4
  20. 'https://www.jibjab.com/view/make/all_star_smash_mouth_birthday/7684de43-4e60-404c-a85d-b79929f90dc3?recipient_token=6e1e363c-a154-47d6-9f3a-873570b85fb0&utm_campaign=tx_recipient_notification&utm_source=cordial&utm_medium=email&fbclid=IwAR1p3ZH3lPgdHNxjNa_l2WvkMt-AEHaITLsT8ccReG-7LENYnVmtQuvXdbc
  21. End Sub
  22.  
  23. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  24. ' TextBox1.Text = "https://www.jibjab.com/view/make/all_star_smash_mouth_birthday/7684de43-4e60-404c-a85d-b79929f90dc3?recipient_token=6e1e363c-a154-47d6-9f3a-873570b85fb0&utm_campaign=tx_recipient_notification&utm_source=cordial&utm_medium=email&fbclid=IwAR1p3ZH3lPgdHNxjNa_l2WvkMt-AEHaITLsT8ccReG-7LENYnVmtQuvXdbc"
  25. End Sub
  26.  
  27. Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
  28. If Len(TextBox2.Text) < 3 Then
  29. MsgBox("URL must not be empty")
  30. Exit Sub
  31. End If
  32.  
  33. Process.Start(TextBox2.Text)
  34.  
  35.  
  36. End Sub
  37.  
  38. Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
  39. Dim clipb As String
  40.  
  41. clipb = Clipboard.GetText()
  42.  
  43. If InStr(1, clipb, "jibjab") = 0 Then
  44. MsgBox("no jibjab link found on clipboard")
  45. Exit Sub
  46.  
  47. End If
  48.  
  49. If Len(clipb) < 3 Then
  50. MsgBox("URL must not be empty")
  51. Exit Sub
  52. End If
  53. Dim endsl As Integer
  54. Dim recip As Integer
  55. endsl = InStr(1, clipb, "make/") + 5
  56. endsl = InStr(endsl, clipb, "/") + 1
  57. recip = InStr(1, clipb, "recip") - 1
  58.  
  59. Process.Start("https://www.jibjab.com/makes/" & Mid(clipb, endsl, recip - endsl) & ".mp4")
  60.  
  61. End Sub
  62. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement