How to search content in script using script (CS3 JS ESTK2)
Hi
My text file containing two parameters with separated by "|"
e.g.
subhead|Ind_Head2
my script containing function as subhead like
function Heading2()
applyParagraphStyle(myDocument.paragraphStyles.item(subhead));
I want to replace with "subhead" with "Ind_Head2"
Is this possible to write script to replace?
Thanks in advance.
Thanks for your reply.
Yes, i need the same. The script needs to take the first parameter information from txt file (which is separated by "|") and the same has to find in the script file and the second parameter from the txt file needs to replace in the script.
i.e.
subhead|
Ind_Head2
function Heading2()
applyParagraphStyle(myDocument.paragraphStyles.item(
Ind_Head2));
Thanks in advance.
Similar Messages
-
How to fix the financial table using script
Hi All,
How to fix the financial table using script, (for example see below table. i have fixed manually, my document having more than 50 tables)
%, ) are hang aligned.
$ are left aligned as like below.
Regards,
VeluHi Velu
The quality of your screenshot came out pretty bad
Maybe send another higher resolution one which on a smaller part of the table and show the hidden characters -
How to load data into table Using Script Task
We have a directory/folder where we have a file. We need to insert the File Created Date , File Name , Extension into the database table of Sql server by using Script Task.
So could you please suggest , how to frame the connection string , fetch the file details and insert the data into the database table using Script Task of SSIS 2008You can achieve it as follows using standard script task
1. Add a ForEachLoop container to point to your directory to iterate though the files. Add a variable of type string inside loop to get file name of each file it iterates. Choose option Filename and extension. Add a variable to just store extension part
(FileExtension), set EValuateAsExpression true for it and give expression as below
SUBSTRING(@[User::FileName],FINDSTRING(@[User::FileName],".",1)+1,LEN(@[User::FileName]))
2. Add a script task inside loop and pass filename variable as a read only variable to it. Crete a new variable to get creationdate and pass it as ReadWrite. Inside write code as below
Public Sub Main()
' Add your code here
Dim f As New System.IO.FileInfo(Dts.Variables("FileName").Value.ToString())
Dts.Variables("FileCreatedDate").Value = f.CreationTime
Dts.TaskResult = ScriptResults.Success
End Sub
3. Add a Exec SQL Task after Script task inside loop and give a query like below
INSERT INTO TableName (FileName,CreatedDate,Extension)
VALUES(?,?,?)
and in parameter tab map the parameter placeholders 0,1 and 2 to @[User::FileName],@[User::FileCreatedDate] & @[User::FileExtension] variables
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
How to get certain applied styles using script?
Hi All,
I need to know how to get certain applied styles using ID Scripting. I don't have much experience in InDesign so need some help.
Here is a screenshot with a sample text with the said styles applied and highlighted.
I need to know what texts in my document have these styles applied like All Caps, Strikethrough, Underline, Subscript and Superscript etc.
Please help.
Thanks!Hi Poortip87
The first thing you have to understand is how to refer to "where" you want to apply the style.
If you want the script to apply the style to the selected text then you would use for example app.selection[0].strikeThru = true;
If you for example want to underline the last word of the first paragraph of the first story you would use app.activeDocument.stories[0].paragraphs[0].words[-1].underline = true;
If you just wanted the first letter of that word underlined then you would add .characters[0] after the words[-1]
To for example apply All Caps to all the text in all the stories you would use
app.activeDocument.stories.everyItem().texts[0].capitalization = Capitalization.ALL_CAPS;
The easiest way to find how to set properties to a selections is to set them manually and make the selection and then run the script below.
You should be able to find all the properties you want very easily after running the script.
Or you can use Jongwares excellent reference guide. Indesign JavaScript Help
HTH
Trevor
// script to show most of the selection properties by Trevor
// Creative-Scripts.Com (Still not ready!) available (sometimes) for custom scripts $$$
// scripts {at} Creative-Scripts [dot] Com
$.level = 0; // set debug mode to allow try catch (not read only as stated in manual);
if (!app.selection.length) exit();
var c = 0, s = app.selection[0], p,
a = [], n, er;
for (n in s) {
try {
p = s[n];
if (p && p.constructor.name === "Enumerator") p = getEnum(p ,n);
a[c++] = n + ": " + p;
} catch (er) {a[c++] = n + ": ???"}
var f = new File (Folder.temp + +(new Date) + ".txt");
f.open('r');
f.encoding = "UTF-8";
f.lineFeed = ($.os[0]=="M") ? "Macintosh" :" Windows";
f.open('w');
f.write("\uFEFF" + a.join("\r"));
f.close();
$.sleep(300);
f.execute(true);
function getEnum (q, n) {
var enums = ["AcrobatCompatibility",
"AddPageOptions",
"AdornmentOverprint",
"AlignDistributeBounds",
"AlignOptions",
"AlignmentStyleOptions",
"AlternateGlyphForms",
"AlternatingFillsTypes",
"AnchorPoint",
"AnchorPosition",
"AnchoredRelativeTo",
"AnimationEaseOptions",
"AnimationPlayOperations",
"AntiAliasType",
"ArrangeBy",
"ArrowHead",
"AssetType",
"AssignmentExportOptions",
"AssignmentStatus",
"AutoEnum",
"AutoSizingReferenceEnum",
"AutoSizingTypeEnum",
"BalanceLinesStyle",
"BaselineFrameGridRelativeOption",
"BaselineGridRelativeOption",
"BehaviorEvents",
"BevelAndEmbossDirection",
"BevelAndEmbossStyle",
"BevelAndEmbossTechnique",
"BindingOptions",
"BitmapCompression",
"BlendMode",
"BlendingSpace",
"BookContentStatus",
"BookletTypeOptions",
"BoundingBoxLimits",
"BuildingBlockTypes",
"BulletCharacterType",
"BulletListExportOption",
"Capitalization",
"ChangeBackgroundColorChoices",
"ChangeCaseOptions",
"ChangeConditionsModes",
"ChangeMarkings",
"ChangeTextColorChoices",
"ChangeTypes",
"ChangebarLocations",
"ChangecaseMode",
"ChapterNumberSources",
"CharacterAlignment",
"CharacterCountLocation",
"CharacterDirectionOptions",
"ClippingPathType",
"ColorModel",
"ColorOutputModes",
"ColorRenderingDictionary",
"ColorSettingsPolicy",
"ColorSpace",
"ComposeUsing",
"CompressionQuality",
"ConditionIndicatorMethod",
"ConditionIndicatorMode",
"ConditionUnderlineIndicatorAppearance",
"ContainerType",
"ContentType",
"ContourOptionsTypes",
"ConvertPageBreaks",
"ConvertShapeOptions",
"ConvertTablesOptions",
"CoordinateSpaces",
"CopyrightStatus",
"CornerOptions",
"CreateProxy",
"CrossReferenceType",
"CursorTypes",
"CustomLayoutTypeEnum",
"DataFormat",
"DefaultRenderingIntent",
"DesignOptions",
"DiacriticPositionOptions",
"DigitsTypeOptions",
"DimensionsConstraints",
"DisplayOrderOptions",
"DisplaySettingOptions",
"DistributeOptions",
"DocumentIntentOptions",
"DocumentPrintUiOptions",
"DynamicDocumentsJPEGQualityOptions",
"DynamicDocumentsTextExportPolicy",
"DynamicMediaHandlingOptions",
"DynamicTriggerEvents",
"EPSColorSpace",
"EPSImageData",
"EditingState",
"EmptyFrameFittingOptions",
"EndCap",
"EndJoin",
"EpubCover",
"EpubVersion",
"EventPhases",
"ExportFormat",
"ExportLayerOptions",
"ExportOrder",
"ExportPresetFormat",
"ExportRangeOrAllPages",
"FeatherCornerType",
"FeatherMode",
"FeatureSetOptions",
"FindChangeTransliterateCharacterTypes",
"FirstBaseline",
"FitDimension",
"FitMethodSettings",
"FitOptions",
"Fitting",
"FlattenerLevel",
"Flip",
"FlipValues",
"FloatingWindowPosition",
"FloatingWindowSize",
"FollowShapeModeOptions",
"FontDownloading",
"FontEmbedding",
"FontStatus",
"FontTypes",
"FootnoteFirstBaseline",
"FootnoteMarkerPositioning",
"FootnoteNumberingStyle",
"FootnotePrefixSuffix",
"FootnoteRestarting",
"GIFOptionsPalette",
"GlobalClashResolutionStrategy",
"GlobalClashResolutionStrategyForMasterPage",
"GlowTechnique",
"GoToZoomOptions",
"GradientType",
"GridAlignment",
"GridViewSettings",
"GuideTypeOptions",
"HeaderFooterBreakTypes",
"HeaderTypes",
"HorizontalAlignment",
"HorizontalOrVertical",
"HyperlinkAppearanceHighlight",
"HyperlinkAppearanceStyle",
"HyperlinkAppearanceWidth",
"HyperlinkDestinationPageSetting",
"ICCProfiles",
"IconSizes",
"ImageAlignmentType",
"ImageConversion",
"ImageDataTypes",
"ImageExportOption",
"ImageFormat",
"ImagePageBreakType",
"ImageResolution",
"ImageSizeOption",
"ImportFormat",
"ImportPlatform",
"ImportedPageCropOptions",
"InCopyUIColors",
"IndexCapitalizationOptions",
"IndexFormat",
"InkTypes",
"InnerGlowSource",
"InteractiveElementsOptions",
"InteractivePDFInteractiveElementsOptions",
"JPEGOptionsFormat",
"JPEGOptionsQuality",
"JoinOptions",
"JpegColorSpaceEnum",
"Justification",
"KashidasOptions",
"KentenAlignment",
"KentenCharacter",
"KentenCharacterSet",
"KinsokuHangTypes",
"KinsokuSet",
"KinsokuType",
"LanguageAndRegion",
"LayoutRuleOptions",
"Leading",
"LeadingModel",
"LibraryPanelViews",
"LineAlignment",
"LineSpacingType",
"LinkStatus",
"ListAlignment",
"ListType",
"LiveDrawingOptions",
"Locale",
"LocationOptions",
"LockStateValues",
"MapType",
"MarkLineWeight",
"MarkTypes",
"MatrixContent",
"MeasurementUnits",
"MojikumiTableDefaults",
"MonoBitmapCompression",
"MoviePlayOperations",
"MoviePosterTypes",
"NestedStyleDelimiters",
"NoteBackgrounds",
"NoteColorChoices",
"NothingEnum",
"NumberedListExportOption",
"NumberedParagraphsOptions",
"NumberingStyle",
"OTFFigureStyle",
"ObjectTypes",
"OpenOptions",
"OpenTypeFeature",
"OutlineJoin",
"OverrideType",
"PDFColorSpace",
"PDFCompressionType",
"PDFCrop",
"PDFJPEGQualityOptions",
"PDFMarkWeight",
"PDFProfileSelector",
"PDFRasterCompressionOptions",
"PDFXStandards",
"PNGColorSpaceEnum",
"PNGExportRangeEnum",
"PNGQualityEnum",
"PPDValues",
"PageBindingOptions",
"PageColorOptions",
"PageLayoutOptions",
"PageNumberPosition",
"PageNumberStyle",
"PageNumberingOptions",
"PageOrientation",
"PagePositions",
"PageRange",
"PageReferenceType",
"PageSideOptions",
"PageTransitionDirectionOptions",
"PageTransitionDurationOptions",
"PageTransitionOverrideOptions",
"PageTransitionTypeOptions",
"PageViewOptions",
"PaginationOption",
"PanelLayoutResize",
"PanningTypes",
"PaperSize",
"PaperSizes",
"ParagraphDirectionOptions",
"ParagraphJustificationOptions",
"PathType",
"PathTypeAlignments",
"PdfMagnificationOptions",
"PerformanceMetricOptions",
"PlacedVectorProfilePolicy",
"PlayOperations",
"PointType",
"Position",
"PositionalForms",
"PostScriptLevels",
"PreflightLayerOptions",
"PreflightProfileOptions",
"PreflightRuleFlag",
"PreflightScopeOptions",
"PreviewPagesOptions",
"PreviewSizeOptions",
"PreviewTypes",
"PrintLayerOptions",
"PrintPageOrientation",
"Printer",
"PrinterPresetTypes",
"Profile",
"ProofingType",
"RangeSortOrder",
"RasterCompressionOptions",
"RasterResolutionOptions",
"RecordSelection",
"RecordsPerPage",
"RenderingIntent",
"RepaginateOption",
"ResizeConstraints",
"ResizeMethods",
"ResolveStyleClash",
"RestartPolicy",
"RotationDirection",
"RowTypes",
"RubyAlignments",
"RubyKentenPosition",
"RubyOverhang",
"RubyParentSpacing",
"RubyTypes",
"RuleDataType",
"RuleWidth",
"RulerOrigin",
"SWFBackgroundOptions",
"SWFCurveQualityValue",
"Sampling",
"SaveOptions",
"ScaleModes",
"Screeening",
"ScreenModeOptions",
"ScriptLanguage",
"SearchModes",
"SearchStrategies",
"SelectAll",
"SelectionOptions",
"Sequences",
"ShadowMode",
"SignatureSizeOptions",
"SingleWordJustification",
"SmartMatchOptions",
"SnapshotBlendingModes",
"SortAssets",
"SoundPosterTypes",
"SourceFieldType",
"SourceSpaces",
"SourceType",
"SpanColumnCountOptions",
"SpanColumnTypeOptions",
"SpecialCharacters",
"SpreadFlattenerLevel",
"StartParagraph",
"StateTypes",
"StaticAlignmentOptions",
"StoryDirectionOptions",
"StoryHorizontalOrVertical",
"StoryTypes",
"StrokeAlignment",
"StrokeCornerAdjustment",
"StrokeFillProxyOptions",
"StrokeFillTargetOptions",
"StrokeOrderTypes",
"StyleConflict",
"StyleSheetExportOption",
"SyncConflictResolution",
"TabStopAlignment",
"TableDirectionOptions",
"TableFormattingOptions",
"TagRaster",
"TagTextExportCharacterSet",
"TagTextForm",
"TagTransparency",
"TagType",
"TagVector",
"TaggedPDFStructureOrderOptions",
"TaskAlertType",
"TaskState",
"TextExportCharacterSet",
"TextFrameContents",
"TextImportCharacterSet",
"TextPathEffects",
"TextStrokeAlign",
"TextTypeAlignments",
"TextWrapModes",
"TextWrapSideOptions",
"ThumbsPerPage",
"TilingTypes",
"ToolTipOptions",
"ToolsPanelOptions",
"TrapEndTypes",
"TrapImagePlacementTypes",
"Trapping",
"UIColors",
"UITools",
"UndoModes",
"UpdateLinkOptions",
"UserInteractionLevels",
"VariableNumberingStyles",
"VariableScopes",
"VariableTypes",
"VersionCueSyncStatus",
"VersionState",
"VerticalAlignment",
"VerticalJustification",
"VerticallyRelativeTo",
"ViewDisplaySettings",
"ViewZoomStyle",
"WarichuAlignment",
"WatermarkHorizontalPositionEnum",
"WatermarkVerticalPositionEnum",
"WhenScalingOptions",
"XFLRasterizeFormatOptions",
"XMLElementLocation",
"XMLElementPosition",
"XMLExportUntaggedTablesFormat",
"XMLFileEncoding",
"XMLImportStyles",
"XMLTransformFile",
"ZoomOptions"];
var l = enums.length,
s = q.toString(), e, er, a;
while (l--) {
try {
e = $.global [enums[l]];
if (e.hasOwnProperty (s) && q === e[s]) {
a = e.reflect.properties;
a.pop();
a = (a.length < 2) ? "" : "\r[Possible " + enums[l]+ " Enumerations for " + n + "]:\r" + enums[l] + "." + a.join ("\r" + enums[l] + ".");
return enums[l] + "." + q.toString () + a;
catch (er) {};
return "???." + q.toString (); -
How to search content items in the folder( include subfolders) with API?
I want use UCM API to search contents in the folders including subfolders. I need a example code. thank you !
If you have Folders properly installed, Standard Search form will have 'Folder' field and 'Include subfolders' check box. This means that you can use normal http function call to get results.
Example:
http://content.ravenna.com/idc/idcplg?IdcService=GET_SEARCH_RESULTS&QueryText=&SearchQueryFormat=UNIVERSAL&ftx=&AdvSearch=True&folderChildren=7&ResultCount=20&SortField=dInDate&SortOrder=Desc -
Hii guys, this is a very interesting question and i hope that it will have ample amount of answers.
My requirement is to know the number of tables and views and backend functions/procedures which are used in the code written in the oracle forms 6i,
all i want is to display whole views, tables or functions/procedures which are written in the code of a particular fmb, i do have the path of that fmb and i want to read the code and search through it's entire code for the tables/views/backend procedures/functions written in the code. So how to search through the entire code of a particular form (6i) and make it display through another form.
I am using oracle forms 6i.
Please help me out....
With Regards:
Ankit ChandraHere is a modified dealForm.jsp that merges the 2 steps - both symbol submission and Yahoo convert is done by it. Play with it and add your DB code to it:
<html>
<head><title>IPIB Database Selection</title></head>
<body bgcolor="#DFDFFF">
<H1><CENTER>IPIB Database Selection</CENTER></H1>
<font size=4>
<%@ page language="java" %>
<%@ page import="java.net.*,java.io.*,java.util.*" %>
<%
String symbol = request.getParameter("symbol");
if (symbol != null) {
String urlString = "http://finance.yahoo.com/download/javasoft.beans?SYMBOLS=" + symbol + "&format=ab";
try {
URL url = new URL(urlString);
URLConnection con = url.openConnection();
InputStream is = con.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line = br.readLine();
StringTokenizer tokenizer = new StringTokenizer(line,",");
String name = tokenizer.nextToken();
name = name.substring(1, name.length()-2);
String price = tokenizer.nextToken();
price = price.substring(1, price.length()-2);
%>
<p>
Original line from yahoo <%= line %>
</p> <p>
Name: <%= name %>
</p> <p>
Price: <%= price %>
</p> <p>
Pub DB processing code from dealLoad.jsp here
</p>
<%
} catch (IOException exception) {
System.err.println("IOException: " + exception);
} else { %>
<form action="dealForm.jsp"method="GET">
<p>Enter Symbol: <input size="20" name="symbol">
<inputtype="submit" value="Submit">
</p></form>
<% } %>
</font>
</body>
</html> -
How to search on Time Machine using Yosemite OS X?
Is searching on Time Machine different using Yosemite OS X?
Hi Bruce,
This article give an excellent explanation of how to search in Time Machine under Mac OS X 10.10 (Yosemite).
OS X Yosemite: Recover items using Time Machine and Spotlight
Thanks for using Apple Support Communities.
Best,
Brett L -
How to make muliple column listbox using indesign cs3
Hi,
I want to create list box having muliple rows and columns. I tried with one cloumn using tree view and that is working fine. How to create multiple column listbox using tree view. I need a code snippet for muliple rows and columns using treeview.
Thanks
K.SaravananDownload the CS6 SDK. Under the "open" folder you will find the code for the LinksUI panel. This is the closest you will get to a multicolumn list box in C++, if you want to stay in C++.
The tree view widget support dynamic load of sub nodes in a tree. Also it will only request widgets to drawn when they are in view (as far as I remember). -
How to search "ActiveDocs" in folder-level script
I am trying to perform a search in an Acrobat folder-level javascript like this:
function timerCallback() {
app.beginPriv();
search.query(searchText, "ActiveDoc");
app.endPriv();
app.beginPriv();
app.openDoc(path_to_my_doc);
app.endPriv();
app.setTimeOut("timerCallback()", 5000);
I use the setTimeOut function to make sure that the document has had enough time to open before I start the search. The problem is that I get this error:
GeneralError: Operation failed.
Search.query:24:Folder-level:App:SearchScript.js
No active document
It seems like I can't "see" active documents from a folder-level script. Is there any way around this?
ThanksA folder-level script can be used for two things:
- Execute commands relevant to the application as a whole, NOT dependent of
any specific document (e.g. adding new menu items).
- Create functions which should be available to any document or script that
might need them (e.g. formatting a string in a certain way).
What you're trying to do is neither here nor there. If you want to be able
to search existing documents, you can use a folder-level function, but then
you need to call it from somewhere else, like a menu item or a toolbar
button. -
How to search content in repository through portal
i want to search the content present in my content repository with input as a string ,which will be searched in content and displayed through portal.
or can i navigate bea content search into portalI am also trying to use content in the BEA content repository. I am able to create the content repository, but i do not know how to set it up so that it can be accessed from a portal. It seems that you are able to integrate it. Can you please tell me the steps or point me to a document? I will appreciate your help.
-
How to search users in Outlook Using Last Name and First Name
During recent times we change the naming convention in AD, FirstName , LastName
We can search users using More Columns but I would like to know alternate method to search users. The search result should sort results by last name as query
Regards Chen V [MCTS SharePoint 2010]Hi Chen,
Based on my knowledge, there is no related method to enforce all users using More Columns as the default search option in Outlook Address Book. We can just change the search option for individual Outlook user by remembering the last search using as I mentioned
above.
Sorry for any inconvenience and thanks for your understanding.
Regards,
Winnie Liang
TechNet Community Support -
How to search Database in JSP using LIKE
hi can anyone tell me is there any other syntax for Query when we use LIKE to search database in which suppose
String para = request.getParameter("name");
Select name,surname From user where name LIKE '"+para+"';hi,
which database are you using, some require you to put % sign with like
e.g. select xyz from table abc where xyz like '%"+para+"%' -
How transfer VHS contents on DVD using iMac ?
I have a lot of old VHS but my VHS reader is broken. There is some HW and SW product somebody can suggest to use with my iMac in order ti perform the tranfer of the contents? Thank's
Here is a review of the top 10:
http://vhs-to-dvd-converters-review.toptenreviews.com/ -
How to search stored procedures being used by rpt files?
Post Author: Wah!
CA Forum: General
Dear all,
I have a lot of rpt files, each of them at least use one stored-procedure.
If I want to know a specific stored-procedure is being used by which rpt files,
is there any fast methods rather than opening the rpt files one by one to check manually?
Thank you very much!
Wah!Post Author: synapsevampire
CA Forum: General
Try one of the 3rd party report documenters, such as Report Miner. Not sure, most do a crappy job about returning the data source...
Another means would be to run a trace on the database and execute the reports, which is pretty kludgy as well.
I put documentation into every report, so that exporting to report definition supplies this info.
A good tip is to add a suppressed report header section and place documentation, revision history, etc., in there.
-k -
How to search content in external hard drive?
hi
i using macbook air and i need to navigate and find files on my mounted hard drive,which is seagate, in windows, i just type certain words i could recall and it will pop out, but not on mac! anyone help me?pls.leivicky_008 wrote:
i tried both, neither works........
even tried lines!
By both I'm not sure if you mean that you tried both methods from my first response -- or if you mean you tried both of my replies. In short, did you re-index Spotlight?
Also, sorry but I don't understand what you mean by "even tried lines!"
Maybe you are looking for
-
Fetching SSIS error message into Audit table using SP
Hi Experts, I want to fetch SSIS Error Info along with Task Name into Audit table 'Error_Info' column. This is nvarchar(max) datatype, i wrote below Stored Procedure for this (Column names passing dynamically in SP) CREATE PROC [dbo].[usp_AuditErrorH
-
While generating payment proposal i get all the lines registered in my system as open items... i have paid most of them but they still appear as open and i have to block them manually one by one... this occurs in Tx code F110... is this a common trou
-
Number of backups reduced again.
In Logic 7 and previous, the number of saved project backups was variable by user preference. I had always set this to at least 100 for a number of reasons, not the least of which is I used it to track my time when billing my clients. (if I save, I'm
-
Hi experts, I have a query regarding WM status of the delivery item, we are creating delivery with reference to project, material is warehouse managed material WM1 and WM2 views are maintained Material has stock in the storage bin which is maintained
-
Can i put toolbars on the Spry Tabbed Menu
Hi, I have a spry tabbed panel on my site and have filled it with a spry data set from a static XML file. Eventually there will be a fair bit of content in the tabbed panel content area so im wondering if its possible to put scroll bars in the conten