#NoTrayIcon #NoEnv #SingleInstance,force Chars=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/ DeCode(c) { ; c = a char in Chars ==> position [0,63] Global Chars Return InStr(Chars,c,1) - 1 } Gui, font,, Arial Gui, Add, Edit, x3 y3 w300 h77 +Multi +Wrap Vurl, Gui, Add, Button, x306 y3 w24 h37 Gpaste, 粘贴 Gui, Add, Button, x306 y43 w24 h37 Gcopy, 复制 Gui, Add, Button, x3 y83 w90 h30 Gdo, 转换 Gui, Add, Button, x99 y83 w90 h30 Gabout, 关于 Gui, Add, Button, x195 y83 w90 h30 GGuiClose, 退出 Gui, Add, Checkbox, x289 y83 w40 h30 Vtop Gctop, 置顶 Gui, Show, center w333 h116 ,下载地址转换 Return ctop: Gui,Submit,NoHide If top = 1 { Gui +AlwaysOnTop } else { Gui -AlwaysOnTop } return GuiEscape: GuiClose: exitapp about: Gui +OwnDialogs msgbox,,下载地址转换,支持(迅雷,快车,旋风,rayfile) return paste: decodeurl:=Clipboard GuiControl,, url, %decodeurl% return copy: Gui,Submit,NoHide Clipboard:=url return do: Gui,Submit,NoHide StringReplace, url, url,%A_space%,,All StringReplace, url, url,`n,,All decodeurl = If url contains :// { cut:=InStr(url,"://",false,1)-1 StringLeft, type, url,%cut% If type not in thunder,qqdl,flashget,fs2you,http { decodeurl = } else { If(type="http"){ decodeurl:=url } If(type="thunder"){ StringReplace, url, url,thunder://,,All StringReplace, url, url, /,,All IfInString, url,= { cut:=StrLen(url)-InStr(url,"=",false,1)+1 StringTrimRight, url, url, %cut% } url:=Base64Decode(url) StringTrimLeft, url, url, 2 StringTrimRight, decodeurl, url, 2 } If(type="qqdl"){ StringReplace, url, url,qqdl://,,All StringReplace, url, url, /,,All IfInString, url,= { cut:=StrLen(url)-InStr(url,"=",false,1)+1 StringTrimRight, url, url, %cut% } decodeurl:=Base64Decode(url) } If(type="flashget"){ StringReplace, url, url,flashget://,,All StringReplace, url, url, /,,All IfInString, url,= { cut:=StrLen(url)-InStr(url,"=",false,1)+1 StringTrimRight, url, url, %cut% } IfInString, url,& { cut:=StrLen(url)-InStr(url,"&",false,1)+1 StringTrimRight, url, url, %cut% } url:=Base64Decode(url) StringTrimLeft, url, url, 10 StringTrimRight, decodeurl, url, 10 } If(type="fs2you"){ StringReplace, url, url,fs2you://,,All StringReplace, url, url, /,,All IfInString, url,= { cut:=StrLen(url)-InStr(url,"=",false,1)+1 StringTrimRight, url, url, %cut% } url:=Base64Decode(url) IfInString, url,| { cut:=StrLen(url)-InStr(url,"|",false,0)+1 StringTrimRight, url, url, %cut% } decodeurl:="http://"url } } } end: GuiControl,, url, %decodeurl% return Base64Decode(code) { StringReplace, code, code, `r,,All StringReplace, code, code, `n,,All Loop Parse, code { m := A_Index & 3 ; mod 4 IfEqual m,0, { buffer += DeCode(A_LoopField) out := out Chr(buffer>>16) Chr(255 & buffer>>8) Chr(255 & buffer) } Else IfEqual m,1, SetEnv buffer, % DeCode(A_LoopField) >16) Return out Chr(buffer>>16) Chr(255 & buffer>>8) }