problem with function OnCanRunProfile

English Support for Syncovery on Windows.
Post Reply
PeterC
Posts: 23
Joined: Thu Jan 05, 2023 11:18 pm

problem with function OnCanRunProfile

Post by PeterC »

I had a 'Global PascalScript for All Profiles' running that prevents two profiles from running at once.
I renamed one of the profiles and edited the names in the script but now the script is not preventing the two from running.

Screenshots showing the profiles:
20241016 p1.jpg
20241016 p1.jpg (34.1 KiB) Viewed 4047 times
20241016 p2.jpg
20241016 p2.jpg (30.45 KiB) Viewed 4047 times
The function:

Code: Select all

const p1='[chn00] C:\(slctd,excl)--SamsungT7-L:\UserData';
      p2='Winbirra Daily L:30-min Backup C&D--Wombat (sleep)';

function OnCanRunProfile(const ProfileName:UnicodeString; var PostponeBySeconds:Integer):Boolean;
begin
  if ProfileName=p1 then
     Result:=not ProfileRunning(p2)
  else
     if ProfileName=p2 then
       Result:=not ProfileRunning(p1)
     else
       Result:=true;
  if not Result then
     PostponeBySeconds:=60;
  end;
Any help will be greatly appreciated!
tobias
Posts: 1933
Joined: Tue Mar 31, 2020 7:37 pm

Re: problem with function OnCanRunProfile

Post by tobias »

Hello,
many thanks for your post!

Due to the new free grouping feature in Syncovery 10, it's not possible for me to verify the actual profile names from your screenshots. Can you post the actual names from screenshots of the profile editor dialog or a log file?

Thanks.
PeterC
Posts: 23
Joined: Thu Jan 05, 2023 11:18 pm

Re: problem with function OnCanRunProfile

Post by PeterC »

20241016 profile p1.jpg
20241016 profile p1.jpg (17.53 KiB) Viewed 4037 times
20241016 profile p2.jpg
20241016 profile p2.jpg (16.9 KiB) Viewed 4037 times
PeterC
Posts: 23
Joined: Thu Jan 05, 2023 11:18 pm

Re: problem with function OnCanRunProfile

Post by PeterC »

It seems to be working again. Please close this request.

Thanks for looking at it promptly.
Post Reply