Insert "illegal" characters in file name for label printing?
Hey all (Happy New Year)
I actually see people here who have helped me with this there is responsible for so many years (Hello 'x'). Sort of, I use this .js file for annotate aerial images before printing, and I know just enough about scripts to make changes to the basic layout as the need arises - so far. A new retentive mgr rather anal don't like the replacements I did for some "illegal" characters that windows does not allow in file names. For example, the file name used for the annotation is:
001 0003 1in = 660ft CFL 154_074 01-01014 503 - 013.tif
But Mr. Bishop love not in, the ft and the use of the _ instead of a period (.), so what I need is a change that goes something like (and note that I DO NOT code, so stop laughing).
"Find and replace by", find ft and replace by "and search for _ and replace by," so the final annotation written in the image is: ""
001 0003 1 "= 660' CFL 154,074 01-01014 503 - 013.tif"
My current .js is lower, I'd appreciate any help. Thank you! TLL
------------
CREATE NEW CANVAS W/SPACE ON TOP
var deltaW = 0; Add a "n" pixels to the width
deltaH var = 150; Add "n" pixels to the height
var anchor = AnchorPosition.BOTTOMCENTER; anchor point to resize canvas
SET the FONT TYPE AND SIZE - use GetFontName.js to get the exact name
fontName = 'ArialMT '; var
var fontSize = 18;
Check if a document is open
If (documents.length > 0) {}
var originalRulerUnits = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;
try {}
var docRef = activeDocument;
docRef.resizeCanvas (docRef.width + deltaW, docRef.height + deltaH, anchor);
Create a layer of text on the front
var myLayerRef = docRef.artLayers.add ();
myLayerRef.kind = LayerKind.TEXT;
myLayerRef.name = "Filename";
var myTextRef = myLayerRef.textItem;
ADD the FILE EXTENSION, change the n y below
var ShowExtension = "n";
myTextRef.size = fontSize;
myTextRef.font = fontName;
COLOR of the TEXT PUT in RGB values
newColor var = new SolidColor();
newColor.rgb.red = 0;
newColor.rgb.green = 0;
newColor.rgb.blue = 0;
myTextRef.color = newColor;
SET TEXT POSITION - PIXELS left first, then the top.
myTextRef.position = new Array (30 110);
Set the blending Mode of the text layer. The name must be in UPPERCASE
That is to say NORMAL change to the DIFFERENCE.
myLayerRef.blendMode = BlendMode.NORMAL;
Select opacity in percent
myLayerRef.opacity = 100;
The following code deletes the extension and wrote tha text layer.
fname = filename only
Use the extension if the value
If (ShowExtension == 'y') {}
fname = docRef.name;
} else {}
di = (DocRef.Name). IndexOf(".");
fname = (docRef.name) .substr (0, di);
}
myTextRef.contents = fname;
docRef.flatten ("n");
} catch (e) {}
An error has occurred. Restore units of the rule, and then spread the error return
to the user
preferences.rulerUnits = originalRulerUnits;
throw e;
}
Everything went well. Restore units of the rule
preferences.rulerUnits = originalRulerUnits;
} else {}
Alert ("you must have a document open to add the file name! ');
}
Here is the replacement code:
The following code deletes the extension and wrote tha text layer.
fname = filename only
fname = docRef.name;
fname = fname.replace(/in/, ' "') .replace (/ pi /, ' '"); "
remove the extension if needed
If (ShowExtension! = 'y') {}
fname = fname.match (/ [^.] + /) [0];
}
fname = fname.replace (/ _ /, '.');
myTextRef.contents = fname;
I sent the entire file by PM. This should work if there aren't any typos.
Tags: Photoshop
Similar Questions
-
Delete characters in file names
Hello
I need a help to rename some files. i.e. remove some characters from files.
for example. XX_5182179 _ETERNITY_25TH_MB_AB_XYX_abc .ttjs
for example. XX_4182229 _ETERNITY_21TH_MB_AB_XYX_abc .ttjs
as above, for example. I have a lot of files on a file in the office.
and I want just to keep text highlighted in blue only. and delete characters inbetween. that is XX_51312179.ttjs.
I have this script... but not do nothing...
myDoc var = app.activeDocument;
var myPath = myDoc.filePath;
var myNEWName = (myDoc.name.replace (".indd",".ps"));
var myDc = new queue (myPath +"/"+ myNEWName); myDoc.save (myDc);
myDoc.saveACopy (myDc);
Please help me to achieve this...
Thank you very much
Try this
var myfilePath = File ("E:\\rename\\");
var myFileName = myfilePath.getFiles("*.*");
for (var i = 0; i)
{
myNEWName = (myFileName [i].name.replace (/ replaceText /, "Thibaut"));
myFileName [i] .rename (myFileName [i].name.split ("_") [0] + '_' + myFileName [i].name.split (_ "") [1] + '.ttjs');
}
-
Changes in file name for the external Table
Hello
How can I call the dos2unix for Oracle utility?
I am building an external table in a procedure where every time it is called the file names are different.
any ideas?
Thank you>
You cannot call/run utility OS of Oracle with PL/SQL
>
Not TRUE! You can!DBMS_SCHEDULAR
Concerning
Biju -
By specifying the file name for FTP out OSB transport
I want OSB based service that will send via FTP a file with a specific name to a remote ftp location.
It seems that OSB cannot do this because the FTP transport on a business service only allows you to specify the prefix and the suffix, and then generates a file name long great for midlle parties.
Anyone know how to replace it and specify the name you want to call remote file name?mdsrobbins wrote:
Your answer was useful, but being new OSB I'm not yet quite there because I want to spend a "variable" in the name of the file. Now I want a CSV file, I've specified a service proxy in a format MFL behind a jms messaging ftp queue. Business service underlying it is the ftp using the MFL format service. This works all I in the message flow to the proxy I can't have access to a user defined property that contains the name of the file that I could then pull and stuff it into the header 'Filename' as suggested above.DOE, anyone got any ideas how I can get access to a property of a JMS message file name?
What I understand
JMSQ - JMS PRoxy (MFL) - Pipeline---> BS (MFL/FTP) - FTP serverIf you want to set the file name contained custom JMS message headers? When creating your Proxy JMS you must follow these steps
(1) for the creation of Proxy JMS in the transportation Configuration page select get all the headers = Yes
(2) if the name of the file is set as defined by the JMS message property user then use $Header in your pipeline/message flow. This variable can contain your user-defined properties. If the user sets the property is part of the JMS message and then use $body.Thank you
Maury -
How can I, sequence, photos, in, one, pavement, album?, the, photos, are, sequenced, file, nam e, (e.g., AC, 10, AC, 20,...) (CNN), within, their, folder, (album), in, Photoshop, elements, on, my, Windows, PC 10, but sequencing, is, disturbed, to, import, /, synchronization, to, t it, Pad, via air, how, may, sequencing, PC, be maintained, soon, transfer, to, nth, Pad? My PC operating system is Windows 10 and my iPad is version 9.2.1. Photoshop Elements is version 10.
There is no way to manually sequence on an iOS device. You can import them to your computer and the sequence by using a photo application that has this feature.
iOS: import personal pictures and videos of iOS devices to your computer
-
Print a PDF file on a label printer
Hello to save time trying to find a way to get a resized pdf so that it will print on my printer to label.
I tried to do it via the print settings, but have not progressed.
My thought/goal is that I type the address in the beginning of my form and this part of the form is filled in on another page for printing to the printer of labels. -No problem this creation.The main issue is the page for resizing to reduce the size of the labels to the printer, or scaling of the page to fit the size of the labels in the label printer.
Has anyone had experience with this?
Thank you for your time!
JOhnHi Bill
Thanks for writing - my mistake was that I had chosen (choose paper in pdf size) which seems to have solved my problem. Who was that my printer always said that the size of the paper was incorrect for the printer.
John
-
How to display Korean characters in file names?
I received a number of files whose names were originally in Korean characters. But when I watch it on my computer, the characters are jibberish.
I tried the locale and language, but those who do not seem to address.I have Vista Home Premium.
Thank you
Hello Drew Park,
Thank you for visiting the website of Microsoft Windows Vista Community.
Try the rest of the stage in this article:
To install the Korean IME on Windows Vista, start by opening the control panel.
Click the Start button and choose Control Panel, then click on the option "clock, language, and regional.
You should then see the regional and Language Options option, as shown below. Under regional and Language Options point select Change keyboards or other input methods.
Who will bring up the keyboard and languages tab in the regional and Language Options dialog. Click Change keyboards... button:
In the "text Services" and input languages dialog box, add the Korean IME and Korean keyboard components.
Click on the button "Add..." ».
You should now see the dialog "add an input language.
Scroll to the Korean script, expand it and make sure that the Korean and the Microsoft IME selected items as shown below:
Finally, click on the OK"" button.
You should end up with a "Korean" entry under "installed Services".
Finally, click on the OK"" button.
You may need to put your CD of Windows Vista in the CD player, so that the files can be copied anywhere on your hard drive. NOTE: You cannot install the IME without the CD (please do not email me to ask..!).
That's all. You should now see the IME icon in your taskbar which has a Korean option when clicked... like this:
How to use the Korean IME?
Once you have select KO (Korean) in the menu of EMI the task bar task bar,
If you have selected Korean IME as above and you do a right click on the KO will show you the Options Menu:
Choose the language bar option restore will convert the EMI in a floating toolbar with all visible IME options:
Click on the GA Han / Eng will allow you to switch between hangul and English input Modes:
TIP: The shortcut key to switch between mode is the right ALT key.
Other options of the EMI and be displayed by clicking on the small arrow to the right of the floating IME toolbar.
If you click on the element software keyboard soft keyboard icon will appear in the floating toolbar cela this:
If it's a click on a Korean/Hangul software floating keyboard will appear:
And the other option is the IME Pad, which includes handwriting recognition:
With the handwriting recognition you can draw just the hangul Word, you want to insert, and then select the correct hangul in the choice of the right.
Let us know if these steps solve your problem. I hope the information is useful.
Kind regards
Anthony
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think. -
Convention of file name for the *.dat files
My colleague gave me several *.dat files created by LabView. They have names like Data2_11119_40866.dat. I think that the strings (11119 and 40866) could contain information about the time covered in the file. If so, this information would be useful for me in the treatment of the data.
Can you please point me to a reference that explains the naming of *.dat files mode in LabView? As you can tell, I am not a user!
Names of files are created by the programmer. It would be best to ask them what are the meanings of the names.
-
8.3 file names for Webhelp?
Hello
I would like to generate Webhelp output with all the installable limited to the 8.3 naming convention files (destination is FAT format). I was not able to find a toggle for this in RoboHelp 7.00.145 (part of ATCS 1.3). Does anyone have any ideas on how to do that?
Thank you
-ClamThanks for the replies RoboWizard and FusionnerCet. As by chance, I still have 8 FM7/WWP - this combo has a gimbal 8.3, so I guess I'll take this path.
Thanks again,
-Clam
-
What is the file name for a LifeCam VX6000 driver
My LifeCam VX6000 is no longer recognized by my computer, and the application of device driver indicates that there is no driver installed.
Please see: troubleshooting failures to find the new LifeCam hardware and download the Webcam software & helmet.
-
Error Msg When you insert the disc to the software for a printer
I get the same error msg when trying to install a lexmar x 2670. «E: / is not a valid Win 32 application.» Last week, I tried to install a new HP printer and kept getting "%1 is not a valid Win 32 application." How can I fix it?
Hi BarbWat,
Which version of windows vista you are running on the computer? What type of system (32-bit or 64-bit)?
This problem may be caused by one of the options below.
1. the package is corrupt, missing, or bad.
2. the software is not designed for your version of Windows.
I suggest you try the following steps:
Step 1: The Setup file may be damaged or missing, check that the CD is clean.
Step 2: If the program is designed for a 64-bit version of Windows and you are running in a 32-bit version of Windows, it will not work and generate this error.
You can manually download the Lexmark software, please click here
Make sure you download the correct version (32-bit or 64-bit) for your computer.
If the problem persists, you can check with Lexmark.
http://support.Lexmark.com/index?page=home&locale=en&UserLocale=en_US
To check if your computer is 32-bit or 64-bit, see the link below:
You can follow the same steps to solve the problem of HP printer.
Thank you, and in what concerns:
Ajay K
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think.
-
The file name can be printed on the exported images?
I use LR 3.5 and wonder if I can get the names of files on the images when I export show them. If so, how to make that happen? I'm already tattoo a copyright script, which I suppose I could change to include the name of the image, but that would be quite tedious to do. I guess that there is an easy way to do what I didn't find. Thank you!
Get the Lightroom LR Mogrify plugin
-
'output file name' application before printing.
Try to print from a program of writing music... but the message above - not he had ideas... How do I remeove it?
Thank you
James
The easier (and first) first things:
"[Print to FIle" is checked in the print options?
-
Sizes of Splash screen and names for the iPhone 6 and 6 more in the file descriptor xml files
Is anyone know the sizes of screen and the file names for the iPhone 6 and 6 more (for the descriptor xml file)? Or current splash screens works on both devices?
i.e.
Default-Portrait.png
*-768w x 1024 hHello
Here is the specification.
iPhone 6
Start screen
750 x 1334
72
Resources or resources/iphone
iPhone 6 more landscape
Start screen
2208 x 1242
72
Resources or resources/iphone
iPhone 6 Plus portrait
Start screen
1242 x 2208
72
Resources or resources/iphone
You can find more info here - http://docs.appcelerator.com/titanium/3.0/#! / guide/Icons_and_Splash_Screens-section-290048 97_IconsandSplashScreens-Splashscreens
-
sqlldr: use data = file name, but also 'fix'...
Hello
I would like to know if it helps to specify the size of record for example, "fix 96" in a direct charge.
the recording is fixed and has decimal/characters only.
In this case, how can I specify that the rec is "fix" without Hardcoding the file name in the control file?
It seems he can follow only INFILE, which involves hard - coded file name but I want the file name for the ctl file becomes reusable.
for example, data sqlldr = < Filename > "Challenge 96" control = < generic_controlfile >
Thank you.Rustydud
You can generate your control on the fly file. For example, under unix
Start with a generic.ctl file:
... INFILE %filename% "fix %recsize%" ...
Now provide the actual values you want:
filename=$1 recsize=$2 cat generic.ctl | sed -e s/%file%/$filename/ | sed -e s/%recsize%/$recsize >/tmp/specific.ctl sqlldr u/p control=/tmp/specific.ctl
Any use to you?
HTH
Nigel cordially
Edited by: nthomas on January 8, 2009 13:46 (added missing %)
Maybe you are looking for
-
"The scan of the computer is enabled is no longer" false error
Hello I bought and installed a HP DeskJet 3521. It is configured for wifi connectivity to two computers on our home network. A laptop computer is 8 64-bit Windows. The other is Windows 7 Pro 64 bit. The printer seems to work perfectly. However, the d
-
HP Truevision HD Webcam driver for Windows 7
Hello I have a problem with a driver for my HP Pavilion G7 2251dx The video stream does not work. The hardware ID are USB\VID_04F2 & PID_B34F & REV_6047 & MI_00 USB\VID_04F2 & PID_B34F & MI_00 I installed Windows 7. My laptop came with Windows 8 by d
-
Windows updates take hours to download...
Hi... I have big problems to download updates. Even the smallest will take a few hours! I am running Vista home Premium on a laptop Compaq presario... My internet speed is fine in fact, everything is going well except for the download problem. I'm no
-
DeskJet 2542 all-in-one: parse error message prints well
I kept getting this error trying to scan a document for the first time. "An error occurred all in communicating with the device. Please check that the device is correctly connected and powered. » To make sure that the printer is connected I printed a
-
Hi, I submitted an application (game) on the 18 and currently it always appears as "pending review". But when I go to the src it shows "approved new value =" and "status = open '... Is this a normal time-out for a BB10 app aproval? I have to do somet