Two items:
A) In the FullDemo as well in code, the Command ToggleJSConsole does not work properly. You can show the window once and only once:
In pseudo code:
DoVerb(null, "ExecuteCommand", "ToggleJSConsole"); // will show the window
DoVerb(null, "ExecuteCommand", "ToggleJSConsole"); // will hide
DoVerb(null, "ExecuteCommand", "ToggleJSConsole"); // will do nothing
My questions:
1) How can you determine if the console is showing or not?
2) Is there such a command as "ShowJSConsole"/"Show"?
B) Is there a way to capture the JS console output. For example, how do I capture the output from the JS script: 'console.println("Hello World.")'
Seeing JavaScript Console output...
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 2448
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Seeing JavaScript Console output...
Hi, DSSavant.
It is issue really and will be fixed in the next build. Thanks.
Code: Select all
DoVerb(null, "ExecuteCommand", "ToggleJSConsole"); // will show the window
DoVerb(null, "ExecuteCommand", "ToggleJSConsole"); // will hide
DoVerb(null, "ExecuteCommand", "ToggleJSConsole"); // will do nothing
You may obtain actual visibility state by:1) How can you determine if the console is showing or not?
Code: Select all
GetProperty("View.Panes["JavaScript"].Visible", val, 0);
You may change the "View.Panes["JavaScript"].Visible" property directly, without UI-command sending:2) Is there such a command as "ShowJSConsole"/"Show"?
Code: Select all
SetProperty("View.Panes["JavaScript"].Visible", "true", 0); // to show JS-Console
SetProperty("View.Panes["JavaScript"].Visible", "false", 0); // to hide JS-Console
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 216
- Joined: Thu Jul 08, 2004 7:29 pm
Re: Seeing JavaScript Console output...
Great thanks. This will work good. Piecing all the different ways to execute a command with the SDK is, at time, difficult. I have also found how to do it in JavaScript since my last post.
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: Seeing JavaScript Console output...
Excellent - thanks 

If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com