Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Scripting and warning messages

355 views
Skip to first unread message

Jeremy Donaghue

unread,
Jan 22, 2019, 3:37:10 AM1/22/19
to pinnacle3-users
How can you ignore warning messages that Pinnacle displays when running scripts?  I feel like the answer is buried in this group's history, but I can't figure out the right search keywords to find it.

Thanks,
Jeremy

Robert Ross

unread,
Jan 25, 2019, 8:02:51 AM1/25/19
to pinnacle3-users
Hi Jeremy

The search term is:
  AskYesNo

It looks like this stopped working sometime during Pinnacle 9.x , I haven't tried it in Pinnacle 16 myself, but I suppose it depends on what version you are using.

Kind regards
Robert

Robert Ross

unread,
Jan 25, 2019, 8:18:25 AM1/25/19
to pinnacle3-users
Hi 

Just came across some more details on this.  Apparently (I haven't tested this), you can define a default answer to a question window if you put a line telling it the answer before the question: eg

TrialList .Current .RemoveCouchFromScan.ExpectedAskYesNoReply=1;
TrialList .Current .RemoveCouchFromScan = 0;

Although, this particular question doesn't generate a message window for me in P16.0, so I don't know if it works.

Apparently you can also dismiss a warning eg
Test.ExpectWarning = "1";

Have you got a specific warning message in a script that you could share?

Kind regards
Robert

Jeremy Donaghue

unread,
Jan 25, 2019, 4:39:38 PM1/25/19
to pinnacle3-users
I was re-using a dummy/temp structure to create multiple structures, so you need to say it's ok to overwrite it once.  I sort of tweaked my code to get around it, but there are some other areas where I'll try and apply this for.  Thank you so much.

Andy Blackmore

unread,
Sep 19, 2019, 2:59:48 PM9/19/19
to pinnacle3-users
I've been fighting this issue today trying to get rid of the PDF warning messages which re-confirm the Patient ID and then warn about using 1 page for a window capture. Very irritating when you have 3-5 pages to capture...

My answer is to use a KeyDependency to answer Yes to all AskYesNo boxes that appear; but be sure to turn it off once you're done, else bad things will happen (TM). 

// Suppress AskYesNo Boxes
Store.FreeAt.CatchAllAskYesNo="";
Store.At.CatchAllAskYesNo=KeyDependency{
   
KeyString = "Test.CatchAskYesNo";
   
AddAction = "Test.CatchAskYesNo = 1";
   
AddAction = "Test.ExpectedAskYesNoReply= 1";
   
ExecuteActions = "";
};
Test.CatchAskYesNo = 1;


// Do Your Things Here... For me that was screen capturing for the PDFs. Every AskYesNo box will be answered with Yes. For No, change ExpectedAskYesNoReply to 0 above.


// Time to turn this off...
Store.FreeAt.CatchAllAskYesNo = "";
Test.CatchAskYesNo = 0;



Hopefully that helps someone :)

Andy Blackmore

unread,
Sep 22, 2019, 3:37:59 AM9/22/19
to pinnacle3-users
I've been fighting this issue today trying to get rid of the PDF warning messages which re-confirm the Patient ID and then warn about using 1 page for a window capture. Very irritating when you have 3-5 pages to capture...

My answer is to use a KeyDependency to answer Yes to all AskYesNo boxes that appear; but be sure to turn it off once you're done, else bad things will happen (TM). 

// Suppress AskYesNo Boxes
Store.FreeAt.CatchAllAskYesNo="";
Store.At.CatchAllAskYesNo=KeyDependency{
   
KeyString = "Test.CatchAskYesNo";
   
AddAction = "Test.CatchAskYesNo = 1";
   
AddAction = "Test.ExpectedAskYesNoReply= 1";
   
ExecuteActions = "";
};
Test.CatchAskYesNo = 1;


// Do Your Things Here... For me that was screen capturing for the PDFs. Every AskYesNo box will be answered with Yes. For No, change ExpectedAskYesNoReply to 0 above.


// Time to turn this off...
Store.FreeAt.CatchAllAskYesNo = "";
Test.CatchAskYesNo = 0;



Hopefully that helps someone!
 


On Friday, 25 January 2019 21:39:38 UTC, Jeremy Donaghue wrote:
Reply all
Reply to author
Forward
0 new messages