/* $VER: XdccGet.AMIRX 3.42 (23.5.98) Button XDCC Requestor Welcome to XDCC-Get, What is it? A GUI for XDCC requesting. See docs (AmigaGuide File) for more information on installation/options. This script is EMail-ware, if you use it EMail me and tell me what you think of it and ideas for improvements, etc... For v2.1 and previous: IRC: Bossman^ Email: bosman@erols.com Web:www.erols.com/bosman More of his Amirc scripts can be found on his Homepage. For v3.0 and onwards: IRC: lanky Email: sykoe@sub.net.au I thank Bossman^ for letting me expand XDCC-Get further. This whole project is in memory of the recently departed Seona. I'll miss you always. Type: /Alias XdccGet.amirx %p (Then Save Prefs) Usage: /XDCCGet {nick} [Options] , [C/M] Or: /XDCCGet (For Help) -------------------------------Program Prefs Here---------------------------- Below set to 'NO' or 'YES' if you want the List in a Sepatate Query Window.*/ QUERY='NO' /*-Do Not Alter After Here!-*/ QUERY=Left(Upper(QUERY),1);OPTIONS RESULTS;Parse Arg nick pack ',' reqtype;INFO screen;pubs="'"result"'";BOLD='02'x;INV='16'x;UL='1F'x;Version="v3.42";IF nick='' THEN;DO;sEcho(UL||BOLD"Usage of XDCC-Get "Version||UL":"BOLD" /XDCCGet [Option] , [C/M]");sEcho(" ");sEcho(BOLD""BOLD" is the person you wish to request XDCC Packs from and is always required.");sEcho(' ');sEcho(BOLD"[Option]"BOLD" can be a pack # you wish to request or:");sEcho(BOLD" LIST"BOLD" - XDCC List");sEcho(BOLD" INPUT"BOLD" - Pack input window");sEcho(BOLD" MANUAL"BOLD" - Manual pack input window");sEcho(BOLD" LISTINPUT"BOLD" - XDCC List and also brings up the pack input window");sEcho(BOLD" LISTMANUAL"BOLD" - XDCC List and also brings up the manual pack input window.");sEcho(' ');sEcho(BOLD", [C/M]"BOLD" where C is CTCP requests/GUI and M is Msg requests/GUI. (Always prefix C or M with a , )");Exit;End;IF Exists('Libs:rexxreqtools.library') THEN Call AddLib('rexxreqtools.library',0,-30,0);ELSE;DO;sEcho(BOLD'Please Install Libs:rexxreqtools.library (from the XDCC-Get archive) to run XDCC-Get');Exit;End;Repeater=-2;LibCheck="rexxsupport.library";DO Until Repeater=0;IF Exists('Libs:'LibCheck) THEN Call AddLib(LibCheck,0,-30,0);ELSE;DO;sEcho(BOLD'Please Install Libs:'LibCheck' (from your Workbench disks) to run XDCC-Get');Exit;End;LibCheck="rexxdossupport.library";Repeater=Repeater+1;End;NL='0A'x;CTCP='01'x;SendType='C';Number=1;XDCCCancel="Quit GUI on "nick".";Tag='rt_pubscrname='pubs' rt_reqpos=reqpos_pointer';Title="XDCC-Get "Version" by lanky - ";IF reqtype~="" THEN Sendtype=Upper(Compress(reqtype));IF pack ~='' THEN;DO;Upper pack;pack=Compress(pack);SELECT;WHEN pack="LIST" THEN;DO;List();Exit;End;WHEN pack="INPUT" THEN;DO;Get();Exit;End;WHEN pack="LISTINPUT" THEN;DO;List();Get();Exit;End;WHEN pack="MANUAL" THEN;DO;Manual();Exit;End;WHEN pack="LISTMANUAL" THEN;DO;List();Manual();Exit;End;WHEN pack="MULTI" THEN;DO;Manual();Exit;End;WHEN pack="LISTMULTI" THEN;DO;List();Manual();Exit;End;WHEN DATATYPE(pack,'W')~=0 THEN;DO;xdccnum=pack;Request();Exit;End;OTHERWISE;sEcho(BOLD'ERROR! Unknown Command: /XDCCGet 'nick pack ',' reqtype BOLD' - Starting GUI on 'nick'.');sEcho('Type 'BOLD'/XDCCGet'BOLD' or 'BOLD'Read the documentation'BOLD' for the various OPTION information.');Menus();Exit;End;End;Menus:;IF SendType="M" THEN;DO;Msg();Exit;End;ELSE;DO;CTCP();Exit;End;CTCP:;call rtezrequest("Choose your CTCP XDCC Request from "nick||NL||""||NL||"O - Requests a list and opens the Pack GUI"||NL||"L - Requests a list and Quits"||NL||"P - Goes to pack input menu"||NL||"M - Go to XDCC-Get Msg menu"||NL||"A - Brings up the Author's information","List & _Open Pack GUI|_List & Quit|_Pack|_Msg|_About|_Quit",Title'CTCP Menu',Tag);IF rtresult=0 THEN;DO;sEcho(XDCCCancel);Exit;End;IF rtresult=1 THEN;DO;List();Get();Exit;End;IF rtresult=2 THEN;DO;List();Exit;End;IF rtresult=3 THEN;DO;Get();Exit;End;IF rtresult=4 THEN;DO;SendType="M";Msg();Exit;End;IF rtresult=5 THEN;Call About();CTCP();Exit;End;Msg:;call rtezrequest("Choose your Msg XDCC Request from "nick||NL||""||NL||"O - Requests a list and opens the Pack GUI"||NL||"L - Requests a list and Quits"||NL||"P - Goes to pack input menu"||NL||"C - Go to the XDCC-Get CTCP menu"||NL||"A - Brings up the Author's information","List & _Open Pack GUI|_List & Quit|_Pack|_CTCP|_About|_Quit",Title'Msg Menu',Tag);IF rtresult=0 THEN;DO;sEcho(XDCCCancel);Exit;End;IF rtresult=1 THEN;DO;List();Get();Exit;End;IF rtresult=2 THEN;DO;List();Exit;End;IF rtresult=3 THEN;DO;Get();Exit;End;IF rtresult=4 THEN;DO;SendType="C";CTCP();Exit;End;IF rtresult=5 THEN;Call About();Msg();Exit;End;Get:;DO WHILE rtresult>0;Display='';DO Counter=Number to Number+9;l=length(Counter)-1;Disp=Insert('_',Counter,l);Display=Display||Disp'|';End Counter;Prev='_Prev|';IF Number=1 THEN Prev='';call rtezrequest("Pick the XDCC pack number to request from "nick||NL||"M for Manual to input more easily multiple packs"||NL||"N or Return will choose Next",""Display"_Next|_Manual|"Prev"_Quit",Title'Pack Input Request Menu','rtez_defaultresponse=11' Tag);IF rtresult=0 THEN;DO;sEcho(XDCCCancel);Exit;End;IF rtresult=11 THEN;DO;Number=Number+10;Get();End;IF rtresult=12 THEN Manual();IF rtresult=13 THEN;DO;Number=Number-10;Get();End;xdccnum=rtresult+Number-1;Request();END;Manual:;DO WHILE rtresult>0;xdccnum=rtgetstring(,"Enter numeric XDCC pack #'s to request from "nick||NL||"You can put a space or . , - / + * \ between each. Example: 5,8,12,18",Title"Manual Input Pack Request Menu","_Ok|_Quit",Tag);IF rtresult=0 THEN;DO;sEcho(XDCCCancel);Exit;End;xdccnum=Space(Translate(xdccnum," ",".,-+*/\"),1,',');Request();END;Exit;End;List:;IF QUERY="Y" THEN 'Say /Query 'nick;IF SendType="M" THEN;DO;"RAW PRIVMSG "nick" :XDCC List";sEcho('Sent a 'BOLD'Msg'BOLD' packs 'BOLD'description'BOLD' request to 'BOLD||nick||BOLD'.');End;ELSE;DO;"RAW PRIVMSG "nick" :"CTCP"XDCC List"CTCP;sEcho('Sent a 'BOLD'CTCP'BOLD' packs 'BOLD'description'BOLD' request to 'BOLD||nick||BOLD'.');End;Return(0);Request:;DO WHILE xdccnum~='';PARSE VAR xdccnum xdccn','xdccnum;xdccn=Compress(xdccn);Repeater=Repeater+1;IF Repeater>1 THEN;DO;StartTime=Time(Seconds);DO UNTIL Time(Seconds)-StartTime>5;End;End;IF DATATYPE(xdccn,'N')=0 THEN;DO;sEcho(BOLD'Error! Pack "'xdccn'" is not a Number! Manual Pack orders must be Numbers separated by a space or . , - / + * \ Example: 1,5,8,12');Leave;End;If Getclip('st_init')='1' THEN;DO;Call setclip('st_autoget',strip(getclip('st_autoget') ':'upper(nick)));sEcho('Activating temporary DCC Autoget from' Nick);End;IF SendType="M" THEN;DO;"RAW PRIVMSG "nick" :XDCC Send #"xdccn;sEcho('Sent a 'BOLD'Msg'BOLD' request for pack 'BOLD'#'xdccn||BOLD' to 'BOLD||nick||BOLD'.');End;ELSE;DO;"RAW PRIVMSG "nick" :"CTCP"XDCC Send #"xdccn CTCP;sEcho('Sent a 'BOLD'CTCP'BOLD' request for pack 'BOLD'#'xdccn||BOLD' to 'BOLD||nick||BOLD'.');End;End;Return(0);About:;call rtezrequest("XDCC-Get "Version". For any comments / ideas / suggestions contact me:"||NL||"IRC: lanky - EMail: sykoe@sub.net.au - Web: http://www.sub.net.au/~sykoe/","_Ok|_Yam EMail|_IBrowse|_Voyager|_AWeb",Title"About Menu",'rtez_defaultresponse=1' Tag);IF rtresult=1 THEN;DO;End;IF rtresult=2 THEN;DO;YamEMail();End;IF rtresult=3 THEN;DO;Browser='IBrowse';Browser();End;IF rtresult=4 THEN;DO;Browser='Voyager';Browser();End;IF rtresult=0 THEN;DO;Browser='AWeb.1';Browser();End;Return(0);YamEMail:;IF SHOW('P','YAM')=0 THEN;DO;Address Command 'Run <>nil: YAM:YAM nocheck';i=0;DO UNTIL SHOW('P','YAM')>0|i=3;Address Command 'SYS:RexxC/WaitForPort YAM';i=i+1;End;if show('P','YAM')=0 then;do;sEcho(BOLD'XDCC-Get could not get YAM started!');Exit;End;End;sEcho('XDCC-Get has Quit and YAM is ready for message input.');ADDRESS YAM;show;mailwrite;writesubject 'XDCC-Get_'Version;writemailto "sykoe@sub.net.au";Exit;End;Return(0);Browser:;BROWSE=SHOW('P',Upper(Browser));SELECT;WHEN BROWSE=0 THEN;DO;call rtezrequest(Browser" is not running. Please start it and try again.","_Ok",Title"Browser Help",Tag);About();End;WHEN BROWSE>0 THEN;DO;sEcho('XDCC-Get is opening up and loading in the web page on 'Browser'.');IF Browser='Voyager' THEN;DO;Address VOYAGER;ScreenToFront;SHOW;OPENURL 'http://www.sub.net.au/~sykoe/';Exit;End;IF Browser='IBrowse' THEN;DO;Address IBROWSE;ScreenToFront;SHOW;GOTOURL 'http://www.sub.net.au/~sykoe/' RELOAD;Exit;End;IF Browser='AWeb.1' THEN;DO;Address AWEB.1;ScreenToFront;WindowToFront;SHOW;OPEN 'http://www.sub.net.au/~sykoe/' RELOAD;Exit;End;End;Return(0);sEcho:;IF arg(1)~='' then 'ECHO P='d2c(27)'b«XDCC-GET» 'arg(1);Return(0)