Add dialog to save as script
Hi all, I have this script
And I want to make it to have a NAME field with the actual document name so I can change it when I make multiple versions of the file
I have included a image to see example
Can anyone help me?
Thanks in advance!
app.bringToFront();
var OriginalSize = true
var Other =false
var Save8x10 = false
var Option1 = false
var Option2 = false
var Option3 =false
var OtherSize = '1125'
var Option1Size = '600'
var Option2Size = '300'
var Option3Size = '150'
if (documents.length == 0) {
alert('There are no documents open.');
else {
//try{
var fullPathStr = activeDocument.fullName.toString();
SaveFiles()
//catch( e ) {
//alert( e );
function SaveFiles(){
app.playbackDisplayDialogs = DialogModes.NO;
var OriginalRulerUnits = app.preferences.rulerUnits
app.preferences.rulerUnits = Units.PIXELS
var CurWidth =activeDocument.width.value
var CurHeight = activeDocument.height.value
var dlgwin = new Window('dialog', 'File Save 1', );
//Full Resolution Panel
dlgwin.FullResPnl = dlgwin.add('panel',undefined,' Full Resolution ');
dlgwin.FullResPnl.preferredSize.height = 135
dlgwin.FullResPnl.orientation = 'column';
dlgwin.FullResPnl.alignChildren = 'center';
dlgwin.FullResTitle = dlgwin.FullResPnl.add("statictext", undefined,);
dlgwin.FullResTitle.alignment = 'left'
dlgwin.FullResTitle.preferredSize.height = 5
dlgwin.FullRes = dlgwin.FullResPnl.add("group");
dlgwin.FullRes.orientation = 'row';
dlgwin.FullResLabels = dlgwin.FullRes.add("group");
dlgwin.FullResLabels.orientation = 'column';
dlgwin.FullResOrig = dlgwin.FullResLabels.add('statictext',undefined,'Original Size:');
dlgwin.FullResOther = dlgwin.FullResLabels.add('statictext',undefined,'Other:');
dlgwin.FullResForPrint = dlgwin.FullResLabels.add('statictext',undefined, '8x10 for Printing:');
dlgwin.FullResOrig.alignment = 'right'
dlgwin.FullResOther.alignment = 'right'
dlgwin.FullResForPrint.alignment = 'right'
dlgwin.FullResOrig.preferredSize.height = 20
dlgwin.FullResOther.preferredSize.height = 20
dlgwin.FullResForPrint.preferredSize.height = 20
dlgwin.FullRescb = dlgwin.FullRes.add("group");
dlgwin.FullRescb.orientation = 'column';
dlgwin.FullResOrigcb= dlgwin.FullRescb.add('checkbox',undefined);
dlgwin.FullResOthercb = dlgwin.FullRescb.add('checkbox',undefined);
dlgwin.FullResForPrintcb= dlgwin.FullRescb.add('checkbox',undefined);
dlgwin.FullResOrigcb.value = OriginalSize
dlgwin.FullResOthercb.value = Other
dlgwin.FullResForPrintcb.value = Save8x10
dlgwin.FullResOrigcb.preferredSize.height = 20
dlgwin.FullResOthercb.preferredSize.height = 20
dlgwin.FullResForPrintcb.preferredSize.height = 20
dlgwin.FullResSize = dlgwin.FullRes.add("group");
dlgwin.FullResSize.orientation = 'column';
dlgwin.FullResSize.alignment = 'fill';
dlgwin.FullResSizeEdit= dlgwin.FullResSize.add('edittext',undefined, CurWidth);
dlgwin.FullResOtherEdit = dlgwin.FullResSize.add('edittext',undefined, OtherSize);
dlgwin.FullResSizeEdit.preferredSize.width = 55
dlgwin.FullResOtherEdit.preferredSize.width = 55
dlgwin.FullResPW = dlgwin.FullRes.add("group");
dlgwin.FullResPW.orientation = 'column';
dlgwin.FullResPW.alignment = 'fill';
dlgwin.FullResOrigPW= dlgwin.FullResPW.add('statictext',undefined,'pixels wide');
dlgwin.FullResOtherPW= dlgwin.FullResPW.add('statictext',undefined,'pixels wide');
dlgwin.FullResOrigPW.preferredSize.height = 20
dlgwin.FullResOtherPW.preferredSize.height = 20
//Low Resolution Panel
dlgwin.LowResPnl = dlgwin.add('panel',undefined,' 72 dpi ');
dlgwin.LowResPnl.preferredSize.height = 135
dlgwin.LowResPnl.orientation = 'column';
dlgwin.LowResPnl.alignChildren = 'center';
dlgwin.LowResTitle = dlgwin.LowResPnl.add("statictext", undefined,);
dlgwin.LowResTitle.alignment = 'left'
dlgwin.LowResTitle.preferredSize.height = 5
dlgwin.LowRes = dlgwin.LowResPnl.add("group");
dlgwin.LowRes.orientation = 'row';
dlgwin.LowResLabels = dlgwin.LowRes.add("group");
dlgwin.LowResLabels.orientation = 'column';
dlgwin.LowResOpt1 = dlgwin.LowResLabels.add('statictext',undefined,'Option 1:');
dlgwin.LowResOpt2 = dlgwin.LowResLabels.add('statictext',undefined,'Option 2:');
dlgwin.LowResOpt3 = dlgwin.LowResLabels.add('statictext',undefined, 'Option 3:');
dlgwin.LowResOpt1.alignment = 'right'
dlgwin.LowResOpt2.alignment = 'right'
dlgwin.LowResOpt3.alignment = 'right'
dlgwin.LowResOpt1.preferredSize.height = 20
dlgwin.LowResOpt2.preferredSize.height = 20
dlgwin.LowResOpt3.preferredSize.height = 20
dlgwin.LowRescb = dlgwin.LowRes.add("group");
dlgwin.LowRescb.orientation = 'column';
dlgwin.LowResOpt1cb= dlgwin.LowRescb.add('checkbox',undefined);
dlgwin.LowResOpt2cb = dlgwin.LowRescb.add('checkbox',undefined);
dlgwin.LowResOpt3cb= dlgwin.LowRescb.add('checkbox',undefined);
dlgwin.LowResOpt1cb.value = Option1
dlgwin.LowResOpt2cb.value = Option2
dlgwin.LowResOpt3cb.value = Option3
dlgwin.LowResOpt1cb.preferredSize.height = 20
dlgwin.LowResOpt2cb.preferredSize.height = 20
dlgwin.LowResOpt3cb.preferredSize.height = 20
dlgwin.LowResSize = dlgwin.LowRes.add("group");
dlgwin.LowResSize.orientation = 'column';
dlgwin.LowResSize.alignment = 'fill';
dlgwin.LowResOpt1Edit= dlgwin.LowResSize.add('edittext',undefined,Option1Size);
dlgwin.LowResOpt2Edit = dlgwin.LowResSize.add('edittext',undefined,Option2Size);
dlgwin.LowResOpt3Edit = dlgwin.LowResSize.add('edittext',undefined,Option3Size);
dlgwin.LowResOpt1Edit.preferredSize.width = 55
dlgwin.LowResOpt2Edit.preferredSize.width = 55
dlgwin.LowResOpt3Edit.preferredSize.width = 55
dlgwin.LowResPW = dlgwin.LowRes.add("group");
dlgwin.LowResPW.orientation = 'column';
dlgwin.LowResPW.alignment = 'fill';
dlgwin.LowResOpt1PW= dlgwin.LowResPW.add('statictext',undefined,'pixels wide');
dlgwin.LowResOpt2PW= dlgwin.LowResPW.add('statictext',undefined,'pixels wide');
dlgwin.LowResOpt3PW= dlgwin.LowResPW.add('statictext',undefined,'pixels wide');
dlgwin.LowResOpt1PW.preferredSize.height = 20
dlgwin.LowResOpt2PW.preferredSize.height = 20
dlgwin.LowResOpt3PW.preferredSize.height = 20
dlgwin.btns = dlgwin.add('group');
dlgwin.btns.orientation = 'row';
dlgwin.btns.alignChildren = 'left';
dlgwin.btns.bSave = dlgwin.btns.add('button',undefined,'Save');
dlgwin.btns.bCancel = dlgwin.btns.add('button',undefined,'Cancel');
dlgwin.btns.bSave.preferredSize.height = 30
dlgwin.btns.bSave.preferredSize.width = 115
dlgwin.btns.bCancel.preferredSize.height = 30
dlgwin.btns.bCancel.preferredSize.width = 115
// ONCLICK save button...
dlgwin.btns.bSave.onClick = function() {
app.playbackDisplayDialogs = DialogModes.NO;
var docName = app.activeDocument.name;
var data = new Object();
var fullPathStr = activeDocument.fullName.toString();
var lastDot = fullPathStr.lastIndexOf( "." );
var fileNameNoPath = fullPathStr.substr( 0, lastDot );
data.extension = fullPathStr.substr( lastDot + 1, fullPathStr.length );
var lastSlash = fullPathStr.lastIndexOf( "/" );
var FileName = fileNameNoPath.substr(lastSlash +1, fullPathStr.length);
data.folder = fileNameNoPath.substr( 0, lastSlash );
data.fileType = activeDocument.fullName.type;
if(dlgwin.FullResForPrintcb.value == true){
var jpegOptions = new JPEGSaveOptions();
jpegOptions.quality = 12;
var forColour = new SolidColor;
forColour = app.foregroundColor;
app.backgroundColor = forColour;
activeDocument.saveAs( File( data.folder + '/' + FileName + '_8x10.jpg' ), jpegOptions,true);
var FullJpgName = data.folder + '/' + FileName + '_8x10.jpg'
var FullJpgStr = FullJpgName.toString()
var fileRef = new File( FullJpgStr)
app.open(fileRef)
app.bringToFront(fileRef);
activeDocument.resizeImage(2400,2400,300)
activeDocument.resizeCanvas(2400,3000, AnchorPosition.TOPLEFT)
activeDocument.resizeCanvas(2430,3030)
activeDocument.resizeCanvas(2430,3060, AnchorPosition.TOPCENTER)
activeDocument.saveAs( File( data.folder + '/' + FileName + '_8x10.jpg' ), jpegOptions,true);
activeDocument.close(SaveOptions.DONOTSAVECHANGES);
var i = 0
var PrintSize = new Array();
var PrintRes = new Array();
if( dlgwin.FullResOrigcb.value == true ){
PrintSize[i] = dlgwin.FullResSizeEdit.text
PrintRes[i] =300
i = i + 1 ;
if( dlgwin.FullResOthercb.value == true ){
PrintSize[i] = dlgwin.FullResOtherEdit.text
PrintRes[i] = 300
i = i + 1;
if( dlgwin.LowResOpt1cb.value == true ){
PrintSize[i] = dlgwin.LowResOpt1Edit.text
PrintRes[i] = 72
i = i + 1 ;
if( dlgwin.LowResOpt2cb.value == true ){
PrintSize[i] = dlgwin.LowResOpt2Edit.text
PrintRes[i] = 72
i = i + 1 ;
if( dlgwin.LowResOpt3cb.value == true ){
PrintSize[i] = dlgwin.LowResOpt3Edit.text
PrintRes[i] = 72
i = i + 1 ;
if (PrintSize.length>0) {
try{
var jpegOptions = new JPEGSaveOptions();
jpegOptions.quality = 12;
var NewWidth = Number(PrintSize[0])
var NewHeight = (CurHeight/CurWidth)*NewWidth
activeDocument.saveAs( File( data.folder + '/' + FileName + '_' + NewWidth +'.jpg'), jpegOptions ,true );
var FullJpgName = data.folder + '/' + FileName + '_' + NewWidth +'.jpg'
var FullJpgStr = FullJpgName.toString()
var fileRef = new File( FullJpgStr)
app.open(fileRef)
app.bringToFront(fileRef);
activeDocument.resizeImage(NewWidth,NewHeight,PrintRes[0])
activeDocument.saveAs( File( data.folder + '/' + FileName + '_' + NewWidth +'.jpg'), jpegOptions ,true );
for ( var i = 1; i < PrintSize.length; i++ ){
var NewWidth = Number(PrintSize[i])
var NewHeight = (CurHeight/CurWidth)*NewWidth
activeDocument.resizeImage(NewWidth,NewHeight,PrintRes[i])
activeDocument.saveAs( File( data.folder + '/' + FileName + '_' + NewWidth +'.jpg'), jpegOptions,true);
activeDocument.close(SaveOptions.DONOTSAVECHANGES);
catch( e ) {
alert( e );
dlgwin.close()
//activeDocument.save()
activeDocument.saveAs( File( data.folder + '/' + FileName +'.psd'));
dlgwin.btns.bCancel.onClick = function() {
dlgwin.close()
dlgwin.show();
app.playbackDisplayDialogs = DialogModes.ALL;
app.preferences.rulerUnits = OriginalRulerUnits
I am guessing there isn't. My other idea would be saving as XML from 5.5, and modifying the XML somehow to trick 5 into opening it. Not sure if that is possible.
Edit -- I found the part in the XML that determines the file version, which forces 5 to load a 5.5 xml. But it crashes, so that's not going to work.
Similar Messages
-
Need to add special characters in sap scripts
Hi All,
I need to add special characters in sap script.
I have used them as it is my script,but in the print preview i am able to see '#' instead of those special characters.Can anybody please tell me the way in which we can add special characters in the scripts.
eg. 'Shlesha' i.e. name in inverted colons.
ThanksHi
If # is coming means, that is the problem with the printer. I think u might have used your local printer to see the print preview.
Don't use LOCL or LP01. Our local printer won't recognize those characters.
Just change the printer name to client printer name. It will work. -
I want to add Tax indicator colomn in script for PO
Hi Gurus,
I want to add Tax indicator colomn in script in customized objects for Purchase order. How to give the condition for tax indicator. if the tax is applicable in item level it should give YES or NO, Please provide some possible solutions.
Thanks,
V.V.Hello,
If tax is not applicable at PO line, it will be blank or 'U0' at field EKPO-MWSKZ. In the customized print program, you may read this and pass the value to the script.
Thanks,
Venu -
[SOLVED] Chromium with KDE dialogs (open, save)
If I remember correctly, when I used Cromium on Kubuntu, Chromium used KDE dialogs for save, download and and other things....
This is not the case in the Arch Linux, Chromium use GTK dialogs... Does anyone know why Chromium use GTK dialogs or how to fix that?
Picture of problem:
Edit:
Oooouuups.... You need just to install kdebase-kdialog for that....
Last edited by Pyntux (2014-12-01 22:55:31)hiciu wrote:
Hello,
For me, chromium is not using xdg-open. You can verify it with:
strace -e process chromium
Then download something and try to open it from chromium. As for solution, try this: install perl-file-mimeinfo package and setup it with 'mimeopen --ask-default some-pdf-file.pdf'.
landzend wrote:
I have read about setting up the xdg-utils, and believe I have it configured. The following command line when run from bash opens up acroread and displays the PDF:
xdg-open http://cran.r-project.org/doc/manuals/R-intro.pdf
This is separate issue, it should run browser (http:// protocol), not acroread. Check this link: http://hiciu.org/some-pdf-file.pdf (harmless). All you know before you open it is the url, not the file type.
Thanks. I already had the "perl-file-mimeinfo" installed.
Yes. The link you gave above is type "image/jpeg", so the browser has to start the download to even know what it has coming. -
Running validation before the 'save as' script
Hi
I'm looking for a steer on how to run form validation before implementing the 'Save as' script - is this even possible??
Basically I want the save as script to run in the click event of my newly formed save button only if the validation script returns a positive value i.e. all mandatory fields are completed, I've used the script below:
if
(form1.execValidate()== "false"){
app.execMenuItem("SaveAs");
Any chance someone could point me in the right direction or am I barking up the wrong tree?
Thanksgot it to work: my script was wrong, it now looks like this:
if
(form1.execValidate()== true){
app.execMenuItem("SaveAs"); -
I've been trying to save calc script cbs file when doing a 'member and data load' from AIS. I think it save it but I can't find the file.
I think it should be stored in the folder specified by $ISHOME\bin but I looked there and it isn't in there.
Any suggestions?
ThanksI logged in AIS, go to Outline menu, member and data load.
I select my application and database name and 'Use default calc script' option and click Next button.
In the following screen there are three different options for Load Analytic Services:
- Now
- Only save Load Script
- Schedule
I choose 'Only save load Script' and click 'Save Scripts...' button. It ask me to introduce the name of the .cbs file where I want to save the Script. After introducing the name I click ok and Finish.
My question is where is this cbs file stored, because I cannot find it anywhere.
Thank you -
Add auto-save to SCRIPT, REPORT and VIEW
I was fiddling with some DIADem Scripts and manage to crash DIADem twice, unfortunatly my VIEW, REPORTS and SCRIPTS weren't auto-saved.
That is kinda bad, so please add an autosave option.
TonHello Ton,
While the autosave function would certainly help if there is a crash in DIAdem, I think a better solution is to not have DIAdem crash in the first place.
Could you please provide some additional information to help us identify the circumstances of the crash?
1. Version of DIAdem you were using when crashes occured
2. Operating system used
3. Processor and RAM available on the system
4. Short description of what you were doing when DIAdem crashed.
The more information we have, the more likely it is that we can identify the reason for the crash and fix this.
Please send the information to me directly if you would prefer not to post that here in an open forum. My email address is:
otmar DOT Foehner AT ni DOT com
Thanks,
Otmar -
Page failure when attempting to save java script in html header
Currently there is java script code for a function that is seeded in the html header of a forms page by apex when the form is generated. This code is for the chicken test for the DELETE button.
The function works as designed, but if I try to "APPLY CHANGES" to the the page definition I get the The page cannot be displayed "Cannot find server or DNS Error". "the url is http://nldg-3.appl.devjones.com:7777/pls/apex/wwv_flow.accept" If I remove the script coding from the HTML header the page will save just fine, but of course no more java script.
I need to add a java script function to the page and I am unable to do so at this time because of this issue. I can reproduce this error on any of the sample apps that I have loaded into apex.
the Apache error log contains:
[Fri Feb 13 06:11:06 2009] [error] [client 172.16.85.122] [ecid: 1234527066:192.168.211.127:31922:0:17188,0] mod_plsql: /pls/apex/wwv_flow.accept HTTP-500 Error Reading Data from Client!!
The Apache access gets:
172.16.85.122 - APEX_PUBLIC_USER [13/Feb/2009:06:23:47 -0600] "POST /pls/apex/wwv_flow.accept HTTP/1.1" 500 653
Apex is version 3.1.2.00.02 and uses on iAS on a Linux server. The Database is 10g. The browser is IE 6.0.2900.2180.
I have been developing for about 3 months in Apex and this is the first issue of this kind that I have run into. Any help will be greatly appreciated as I have no clue at this time.Luis,
All the forms are created by Apex with a default function in the html header for a delete chicken test as follows:
<scrpt language="JavaScript" type="text/javascript">
<!--
htmldb_delete_message='"DELETE_CONFIRM_MSG"';
//-->
Even though the function is already a part of the page, if I try to save it, it will fail. I will look into the "black list" a little deeper. I have asked around abit as I also had suspected that, but so far all the answers were that it should not be a problem. If I take out the "SCRIPT" word I can get the page to save, but of course the code is worthless at that point.
Keith -
How to add an error message to script?
Hi, every one
I got this script
function paste in place to next master
I want to add an error message to it, if there was no such thing as master B, C,D,E,F,G
instead of system error.
Teetan
var
myDialog = app.dialogs.add({name:"Copy Selected item(s) to chosen Master",canCancel:true}),
mStringList = ["Master A", "Master B","Master C", "Master D", "Master E","Master F", "Master G"];
with(myDialog){
with(dialogColumns.add()){
staticTexts.add({staticLabel:"Select a Master you want to copy to"});
with(dialogRows.add()){
var mySelection = dropdowns.add({stringList:mStringList, selectedIndex:0});
app.doScript('main()', ScriptLanguage.JAVASCRIPT, undefined, UndoModes.FAST_ENTIRE_SCRIPT, "Paste in place");
function main(){
if (!app.documents.length || !app.selection.length)
alert( "Nothing selected!" );
exit();
if (myDialog.show() == true)
copy_to_next_master();
function copy_to_next_master() {
var
mChoice = mySelection.selectedIndex,
mMsg = "Done.\rWhat you select is pasted in place to next documents - " + mStringList[mChoice],
nSel = app.selection.length,
mDone = false,
i,n,nextDoc,curSel;
for ( i = 1; i < app.documents.length; i++) {
nextDoc = app.documents[i];
targetMaster = nextDoc.masterSpreads[mChoice];
if (!targetMaster.isValid) {
mMsg += "\rCan't detect " + mStringList[mChoice] + " in a doc: " + nextDoc.name;
continue;
mDone = true;
for ( n = 0; n < nSel; n++ ) {
curSel = app.selection[n];
curSel.duplicate( nextDoc.masterSpreads[mChoice] );
mDone ? alert(mMsg) : alert("Nothing copied");Sorry Jarek
I made a big mistake
I want add an error message in to this:
var curSel = app.selection[0];
for ( var i = 1; i < app.documents.length; i++) {
var nextDoc = app.documents[i];
if (!curSel) { alert( "Nothing selected!" ); exit(); }
curSel.duplicate( nextDoc.masterSpreads[1] );
in case of I just want to paste in place to only on choice
Teetan -
Hi everybody,
I am new at Acrobat and experiencing some difficulties at the start.
My aim is to generate a PDF file with some fields, which can be filled in by visitors of a website. When the visitor has finished filling in, he should press a button in the PDF file to send it to a specific email-address. The receiver should be able to add little information and save data in a specific (MySQL) database.
My main problems are:
1. The visitor must not see the button for sending the information to the MySQL database.
2. How to send the information to the database (and select the fitting datafields)?
I'm looking forward to reading your replies.
Thanks in advance for your help!
Regards,
KBYou will need someone who knows how to script such things. It can probably be done with PHP or something similar.
-
Is It Possible to Bates-stamp (or add header/footer) USING A SCRIPT?
I need to Bates-stamp (or add a header/footer) to >1000 docments. The Bates-stamp (or header/footer) needs to contain ONLY the first four characters of the filename. Is there a way to do this using only the tools that are part of Acrobat X Professoinal?
If not possible using the toold of Acrobat X Pro, is anyone aware of a third-party plugin that would do this?You can use a Javascript function to place something onto one or more files as a watermark, which visually is the same as a header/footer even though internally it won't be tagged as such. For example:
addWatermarkFromText({
cText: this.documentFileName.substring(0,4),
nTextAlign: app.constants.align.right,
nHorizAlign: app.constants.align.right,
nVertAlign: app.constants.align.top,
nHorizValue: -72, nVertValue: -72
paste it into the JS console to test it (Ctrl-J or CMD-J), to run it against a bunch of files create a new Action and use the "run a Javascript" step. See the SDK documentation for the parameters you can set on the function.
There's no script access to Bates numbering or the H&F creation dialog. -
Complicated question: dialog box-batch processing script
I am adapting the working script I found on this forum.
Script: Open files as layers in Photoshop
https://forums.adobe.com/thread/1313579
The goal of the adaptation is to include a javascript Folder dialog to set the save folder destination at run time and
use this folder destination for the remaining script batch processing functions.
Presently, the script loads a Bridge stack as Photoshop layers and saves the layered tiff using the Folder dialog.
The folder dialog is manifesting every time the script encounters a Bridge stack.
The question is what is the correct script logic to set the destination folder once at run time and keep this destination
folder for the stack batch processing.
#target bridge
var stacks = app.document.stacks;
var stackCount = stacks.length;
for(var s = 0;s<stackCount;s++){
var stackFiles = getStackFiles( stacks[s] );
if(stackFiles.length> 1){
var bt = new BridgeTalk;
bt.target = "photoshop";
var myScript = ("var ftn = " + psRemote.toSource() + "; ftn("+stackFiles.toSource()+");");
bt.body = myScript;
bt.send(5);
function getStackFiles( stack ){
var files = new Array();
for( var f = 0; f<stack.thumbnails.length;f++){
files.push(stack.thumbnails[f].spec);
return files;
function psRemote(stackFiles){
app.bringToFront();
var thisDoc = open(File(stackFiles[0]));
var Name = decodeURI(app.activeDocument.name).slice(0,-4);
thisDoc.layers[0].name = decodeURI(Name);
for(var a = 1;a<stackFiles.length;a++){
open(File(stackFiles[a]));
Name = decodeURI(app.activeDocument.name).slice(0,-4);
activeDocument.activeLayer.duplicate(thisDoc);
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
thisDoc.layers[0].name = Name;
var tifOptions = new TiffSaveOptions();
tifOptions = new TiffSaveOptions();
tifOptions.embedColorProfile = true;
tifOptions.imageCompression = TIFFEncoding.TIFFLZW;
tifOptions.alphaChannels = false;
tifOptions.byteOrder = ByteOrder.MACOS;
tifOptions.layers = true;
var theFolder = Folder.selectDialog ("Select Folder");
if (theFolder) {
var myFile = new File( theFolder + "/" + app.activeDocument.name);
app.activeDocument.saveAs(myFile, tifOptions, true);
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);I am thinking the Folder dialog is not correct for this application.
On a second thought a persistent dialog to set the save folder path and run the script from the persistent dialog can make sense.
Any ideas? -
Disable alert and dialog box in vb script
Pls. help to disable the alert and dialog box for indesign CS3 in vb script?
I have try to add the following code to my vb script:
myIndesign.ScriptPreferences.UserInteractionLevel=1699640946
(Indesign still display missing Link alert box)
myIndesign.ScriptPreferences.UserInteractionLevel=idUserInteractionLevels.idNeverInteract
(Indesign shows need object idUserInteractionLevels)
myIndesign.ScriptPreferences.UserInteractionLevel=idNeverInteract
(Indesign shows values should be idUserInteractionLevels enumerator)
Vb script is running outside Indesign. Script will be automatically stop running when open a missing link document.
Pls. Help. Thank you!Check out this link, it might help.
http://indesign.objectsdefined.com/adobe/indesign/CS3/clsidUserInteractionLevels.htm -
SAVE AS script w/Default file name?
I have created a SAVE AS button on my form however; the default file name is random characters in a temp folder path. How can I change the file name to automatically appear as one of my form field values?
Ex: Someone presses the SAVE AS button and the dialog comes up with the default file name "FileNameField.pdf".
I'm not as concerned about the path as I am about the file name. I also want to deploy this for to many people and don't want to install anything at each workstation in order for the script to work.
It seems like it would be an easy script...but I can't find anything that's remotely 'easy' out there.
The ultimate goal is to have the File Name = to one of my form fields called 'FileName".
Thanks for any insight...
-JoeThis is only possible with a folder level script.
You will have to install those script on your system.
Details and samples can be found here:
http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.html -
Set default filename for file save dialog on Save button click
Hi,
I am using AxAcroPDF (version 9.0) control to view pdf files in windows forms (C#). The pdf loads into the viewer in the form. Now, when I click on the Save button in the viewer, a Save dialog pops up with a default filename having complete path info.
If I have loaded the pdf file into AxAcroPDF viewer with filename:
"C:\Documents and Settings\KB_Kravi\My Documents\CustomerList.pdf"
then in the save dialog, the default filename will be:
"C_Documents_and_Settings_KB_Kravi_My Documents_CustomerList.pdf"
Is there any option to set the default filename in the save dialog to some short name, instead of this lengthy name?
Thanks,
Ravi.Hi,
I've found a solution.
public void Open(string filePath)
axAcroPDF.LoadFile(filePath);
//this will set the correct name in the save file dialog.
axAcroPDF.src = filePath;
Thanks for your help.
Freedon
Maybe you are looking for
-
How to create YTD and MTD reports using Sql Server 2008 r2 report builder 3.0
Hi All, How can I create YTD report from the below data. please help me ProdA ProdB ProdC Month Year 10 50 40 January 2012 Data for full Year i.e. from Jan - December 2012 50 90 100 Januar
-
Questions about tabs, spaces and indenting
I tried to find some information about this in the forum, but I didn't succeed (perhaps I failed at the search). My apologies if this a trivial topic, but as I'm in the learning process of programming (I started with Python and php myself, and Pascal
-
Debugging problem, in inbound function module.
Hi Experts, R/3 system is receiving data through an IDOC called WPUUMS[sales data]. It has been seen that when this data is posted in R/3 through XI the data gets reflected in WE02 / WE05, and is similar to when a manual entry is done t
-
I have an iPod which I currently sync on my iMac, but I want to sync it on my Apple mac pro, how do I do this? Is there a way of doing it without restoring my iPod?
-
StoredProcedure and Varchar2 input parameter...
hello, I call stored procedure with Varchar2 input parameter a RefCursor output parameter. Procedure returns empty dataset.probably is not set input parameter correctly.I'm using 8i oracle database and client and ODP.NET in C#. thank you peter