This is a bit of a niche issue, and probably quite low priority so I'm hesitant to ask; but it may be not too difficult to do IDK:
Currently 'cmd.moveToTrash' if run from app.execMenuItem() will fail, even if run from a trusted function, after showing two dialogs. It would be useful for scripts to be able to remove temporary utility files automatically, without the dialog if it's a file that's open hidden.
I understand this function could cause quite a bit of damage, but if restricted to a trusted function, that would limit the types of function that could do it. It also requires that the pdf be open to delete it.
The use case I'm thinking of are two:
1. For small "lock files" when pdfs are on shares that don't do file locking.
2. For cleaning up temporary files, or files that were created as part of a script (scripts can create files with doc.saveAs, or doc.exportAsFDF for example).
[javascript] allow privileged execution of app.execMenuItem() for 'cmd.moveToTrash' SOLVED
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators
-
Mathew
- User
- Posts: 835
- Joined: Thu Jun 19, 2014 7:30 pm
[javascript] allow privileged execution of app.execMenuItem() for 'cmd.moveToTrash'
You do not have the required permissions to view the files attached to this post.
-
Sean - PDF-XChange
- Site Admin
- Posts: 1091
- Joined: Wed Sep 14, 2016 5:42 pm
Re: [javascript] allow privileged execution of app.execMenuItem() for 'cmd.moveToTrash'
Hi Mathew,
I've asked the devs to take a look at this.
Kind regards,
I've asked the devs to take a look at this.
Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
-
Sean - PDF-XChange
- Site Admin
- Posts: 1091
- Joined: Wed Sep 14, 2016 5:42 pm
Re: [javascript] allow privileged execution of app.execMenuItem() for 'cmd.moveToTrash' SOLVED
Update - I'm afraid this won't be implemented, due to security risks, as suspected.
Kind regards,
Kind regards,
Sean Godley
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
Technical Writer
PDF-XChange Co LTD
Sales: +1 (250) 324-1621
Fax: +1 (250) 324-1623
-
Mathew
- User
- Posts: 835
- Joined: Thu Jun 19, 2014 7:30 pm
Re: [javascript] allow privileged execution of app.execMenuItem() for 'cmd.moveToTrash'
Thanks for checking.
You do not have the required permissions to view the files attached to this post.
-
Daniel - PDF-XChange
- Site Admin
- Posts: 12927
- Joined: Wed Jan 03, 2018 6:52 pm
[javascript] allow privileged execution of app.execMenuItem() for 'cmd.moveToTrash'
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]