Scripting Documentation

Post Reply
lauff
Posts: 3
Joined: 19 Dec 09 10:32

Scripting Documentation

Post by lauff » 26 Dec 13 18:35

Hi,

I want to start developing some scripts, but I can't find a complete documentation.

What I found is the "IDimager.chm" but this doesn't look complete (at least not for Photo Supreme).
Yes, I can of course browse existing samples, but this is neither really convenient, nor complete.

e.g. There is no information about "Progress"

Code: Select all

  Progress.UseProgress;
  Progress.Pos := 0;
  Progress.Show;
  Progress.ProgressText := 'Starting ...';
For the example above I can't figure out why "Progress.UseProgress" no longer works in Photo Supreme (as I copied the code from the IdImager repository, I guess it worked before in IdImager).

What do you use / what can you recommend?

Warm regards,
Markus

P.S. BTW, even the information in "IDimager.chm" is terribly documented.

Hert
Posts: 6210
Joined: 13 Sep 03 7:24

Re: Scripting Documentation

Post by Hert » 26 Dec 13 20:42

Hello Markus,

Progress.UseProgress is not available in PSU. PSU uses a different progress module compared to IDI and in PSU the "UseProgress" property is irrelevant...there's always progress; it's a progress component after all ;) If you want to convert IDI scripts to PSU then you should remove this line.

Hert
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

lauff
Posts: 3
Joined: 19 Dec 09 10:32

Re: Scripting Documentation

Post by lauff » 28 Dec 13 11:58

Hi Hert,

Thanks for the quick help, unfortunately I got some more questions...

How can you show the "cancel button" in the progress, so the script can be cancelled?

How can I move a TCatalogItemProp to another parent?

Is there any way to display structure of an object / available functions (e.g. while debugging or code completion)?

Warm regards,
Markus

Hert
Posts: 6210
Joined: 13 Sep 03 7:24

Re: Scripting Documentation

Post by Hert » 28 Dec 13 12:11

Here's a sample for Progress:

Code: Select all

var
  i: Integer;
begin
  Progress.Caption := 'My Caption Title';
  Progress.Pos := 0;
  Progress.Max := 100;
  Progress.CanCancel := True;
  Progress.Show;
  for i := 0 to 100 do
  begin
    Progress.Pos := i;
    Progress.ProgressText := 'You''re now at position: ' + IntToStr(i);
    if Progress.Cancel then
      break;

    // do your operations here...
    Sleep(50);
  end;
  if Progress.Cancel then
    Say ('Cancelled');
  Progress.Hide;
end;
How can I move a TCatalogItemProp to another parent?
See Catalog.StorePropToDatabase (AProp: TCatalogItemProp; AParentGUID: String; WithSubs: Boolean = True)
Is there any way to display structure of an object / available functions (e.g. while debugging or code completion)?
No, there's no debugging or code completion. Available functions and properties can be found in the CHM

Hert
This is a User-to-User forum which means that users post questions here for other users.
Feature requests, change suggestions, or bugs can be logged in the ticketing system

Post Reply