Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Sub Button2_Click()
- Dim fname As String = Replace(GridView1[GridView1.Row, 0].Text, " ", "")
- Dim cmd As String
- If Exist(TextBox2.Text) = False Then
- Message("Download location is invalid!")
- Return
- Endif
- fname = Replace$(fname, "_", "")
- fname = Replace$(fname, "?", "")
- fname = Replace$(fname, "'", "")
- Try fname = Mid$(fname, 1, 20)
- fname &= ".mp3"
- sString.Text = "'echo " & ivt.Text & "File: " & fname & ivt.Text & "; echo " & ivt.Text & "Downloading to:" & TextBox2.Text & ivt.Text & "; curl -# --user-agent " & ivt.Text & "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:21.0) Gecko/20130331 Firefox/21.0" & ivt.Text & " -o " & ivt.Text & TextBox2.Text & "/" & fname & ".mp3" & ivt.Text & " -L " & ivt.Text & ListBox1[GridView1.Row].Text & ivt.Text & "'"
- If Exist("/usr/bin/konsole") = True
- Shell "konsole -e bash -c " & sString.Text
- Else If Exist("/usr/bin/gnome-terminal") = True Then
- Shell "gnome-terminal -e " & Quote("bash -c " & sString.Text)
- Else
- Message("Please install either gnome-terminal or konsole")
- Endif
- End
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement