problem with function OnCanRunProfile
Posted: Tue Oct 15, 2024 11:44 pm
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: The function:
Any help will be greatly appreciated!
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: 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;