Number of Movies to script ?

If you made a script you can offer it to the others here, or ask help to improve it. You can also report here bugs & problems with existing scripts.
Post Reply
FinderX
Posts: 29
Joined: 2010-05-03 09:30:44

Number of Movies to script ?

Post by FinderX »

Hi,

Is there any way to know the number of movies that script is going to change?

For example in the Scripting Window there are Movies Limits and the options All - Selected - Marks - Visibles

Is there a variable or function that tells me the amount of records to works?

th
FinderX
Posts: 29
Joined: 2010-05-03 09:30:44

Well... the plan is...

Post by FinderX »

The idea is that once a window out in bathmode, with an input that set the porcentage of math title.

In summary, with use SetStatic store the value of percentage of title and GetStatic to read this value in bathmode.

But can not get the value of total record to work, selected before run the script (in the options all-selected-marks-visibles)

well... this is the prototype

Code: Select all

procedure SettingPercent(var outputPercent:Integer);
var
    percentValue, durationValue : string;
    current: Integer;
    
begin

    durationValue := GetStatic('duration');
    percentValue := GetStatic('percent');
    
    if (percentValue = '') then
        percentValue := IntToStr(defaultPercent);   // defaultPercent: global variable

    if (durationValue = '') then begin
        SetStatic('duration','0');
        durationValue := '0';

    if (durationValue = '0') then begin                  // First time of the bath
    
        // This Input appear in the first time ONLY

        if (Input('...', '...', percentValue)) then begin
            SetStatic('duration',IntToStr(***TOTAL_RECORDS***));
            SetStatic('percent',percentValue);
            outputPercent := StrToInt(percentValue,0);
        end else
            outputPercent := 0;     // Cancel button of the input
            
    end else begin                    // Here always for the rest of the bath

        outputPercent := StrToInt(percentValue,0);

        current := StrToInt(durationValue,0);
        if (current > 0) then                 // This is like a counter
            SetStatic('duration',IntToStr(current - 1));
    end;
end;
            // When 'duration' reaches zero
            // there is when is posible to set 'percent'
            // in theory...
Post Reply