All pastes #221837 Raw Edit

Mine

public text v1 · immutable
#221837 ·published 2006-10-25 22:13 UTC
rendered paste body
uses
  rfScriptEnv, System, Classes, Sysutils;

procedure RefreshAndFXPManyTimes(Sender);
begin
  RushApp.UI.Selection.Prepare;
  if RushApp.UI.Selection.CanFXP and (RushApp.UI.Selection.Count=1) then begin
    if RushApp.UI.Selection.Items[0].IsFolder then
      RushApp.UI.Selection.MakeFXPQueue(
        RushApp.UI.Selection.FtpID,
        RushApp.UI.Selection.FtpPath,
        RushApp.UI.Selection.Items[0].Name,
        RushApp.UI.Selection.TargetFtpID,
        RushApp.UI.Selection.TargetFtpPath,
        RushApp.UI.Selection.Items[0].Name,
        RushApp.UI.Selection.Items[0].Size,
        RushApp.UI.Selection.Items[0].IsFolder,
        RushApp.UI.Selection.IsLeftSide,
        True,
        RushApp.UI.Selection.FtpName +' to ' + RushApp.UI.Selection.TargetFtpName,
        50,
       '([^\w]*100%[^\w]*)|([^\w]*-\sCOMPLETE\s\)[^\w]*)|([^\w]*-\sCOMPLETE\s-[^\w]*)|(\.(avi|mpeg|mpg|jpg|jpeg)$)'

      );
  end;
end;

procedure OnCallExternalProgramClick(Sender);
begin
  RushApp.UI.Selection.Prepare;            
  if RushApp.UI.Selection.IsLocalSide and (RushApp.UI.Selection.Count>0) then begin
    ShowMessage(RushApp.UI.Selection.Items[0].FullPath);
  end else
    ShowMessage('doh!');
end;

procedure OnSwitchlayout(Sender);
begin
  //RushApp.UI.Bar.StatusBar.SumWindowButton.Visible := False;
  //RushApp.UI.Bar.StatusBar.SumTransferButton.Visible := False;
  //RushApp.UI.Bar.StatusBar.SumConnectedButton.Visible := False;
  //RushApp.UI.Bar.StatusBar.ProgressItem.Width := 240;
  
  //RushApp.UI.Menu.Local.Add('Misc.','Call External App...',5,'Ctrl+F12').OnClick :='OnCallExternalProgramClick';
  RushApp.UI.Menu.Remote.Add('', 'FXP it 50 times',2,'').OnClick :='RefreshAndFXPManyTimes';
end;

//Entry point !!!
begin
  RushApp.UI.OnSwitchLayout := 'OnSwitchlayout';
end;