Insert Text Variable
Hello,
Need to set the content of a textFrame on a master page to "Current Page Number" a slash and then the missing item "Last Page Number" as found under Type -> Text Variables -> Insert Variable -> "Last Page Number";
How do i add a text variable with scripting?
....parentTextFrames[0].contents = "^N/" + ?????;
By coincidence, I just happen to be working on a script that inserts a text variable. The following also creates a text frame and a paragraph style, but you can see the relevant bit in the middle:
var myDocument = app.documents.item(0);
var myPage = app.activeWindow.activePage;
myDocument.viewPreferences.horizontalMeasurementUnits =
MeasurementUnits.points;
myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
var myTextFrame = myPage.textFrames.add({geometricBounds:[100, 100, 200, 400]});
myTextFrame.insertionPoints.item(-1).contents = "Today's date:\r";
myVariable = myDocument.textVariables.item("Modification Date");
myTextFrame.insertionPoints.item(-1).textVariableInstances.add({associatedTextVariable:myV ariable});
var myParagraphStyle = myDocument.paragraphStyles.item("Date");
try {var myName = myParagraphStyle.name;}
catch (myError){myParagraphStyle =
myDocument.paragraphStyles.add({name:"Date"});}
myParagraphStyle.appliedFont = "Arial";
myParagraphStyle.pointSize = 24;
myTextFrame.paragraphs.item(0).applyParagraphStyle(myParagraphStyle, true);
myTextFrame.paragraphs.item(1).applyParagraphStyle(myParagraphStyle, true);
You can be sure that the above is more clunky and verbose -- and less elegant -- than anything Peter writes, but it does work for me in CS3 and CS4.
EDIT: 'associatedTextVariable' gets split by the word wrap of the forum software -- just make sure you remove any added breaks.
Similar Messages
-
[IDCS3 WIN Insert Text Variables into a document
Hi all.
Please, I need insert a Text Variable into a document.
This document is not open in a window (I am importing it).
Using ITextVariableSuite is not possible.
Any idea, suggestion, way of work,...?
Thanks in advance.
Best regards,
Juanma.When you are posting on both the mac and windows forum it would be nice to say so.
When you are asking questions about the development of plugins, please do so on the appropriate forum: http://www.adobeforums.com/webx/.ee6b334/
We are all end users here. -
Inserting Text Variables into ID(CS2)
I have an old copy of Indesign CS2 that I use on an old Mac portable. (Waste not want not!)
I am trying to insert the 'modification date' into a document.
Unlike later versions there is no drop menu button to select this.
(many old software programs used to have key strokes without drop menu?)
It is possible to insert the 'modification date' or 'file name' into a ID CS2 document?
the ID CS2 Help menu is less than helpful.
Isvara78Text variables was not a feature in CS2.
Bob -
Inserting text from a variable in actionscript
what is it called when you insert text from a variable in actionscript?
Your question is not clear. There is no specific name for the process of inserting text from a variable that I am aware of.
If you have a dynamic textfield that you have assigned an instance name to, let's say you named it "tField", then to assign a variable called "aVar" to that textfield you would use:
tField.text = aVar; -
Inserting text in variable row table in Powerpoint
Hi
In Powerpoint I need to insert text into a table whose number of rows I will know at runtime. How can I insert rows at runtime that I can then reference and insert text into?
ThanksHi Yahya,
We can refer to the rows of table in PowerPoint using
Rows Object (PowerPoint) and use Rows.Add method to insert the row to the sepcfic position we wanted.
Here is an sample using the
Add method to add a row to a table. This example inserts a row before the second row in the referenced table.
ActivePresentation.Slides(2).Shapes(5).Table.Rows.Add (2)
Regards & Fei
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How can I apply a GREP style to a text variable?
Hello everybody,
I have a question concerning GREP styles inside Paragraph styles.
1. I've created a text variable to generate a recurring title on the upper side of the page based on the main title paragraph style;
2. The recurring title is in Adobe Garamond Small Caps, all letters in lower case, and it is formatted with a paragraph style sheet in the master page;
3. I want to create a GREP style for the recurring title, according to which every time that in the recurring title appear an apostrophe or the double quotes, they are automatically lowered 2pt on the baseline
(I already created the character style sheet that lowers letters of 2pt).
What I need is the correct GREP formula to automatically apply the character style sheet to apostrophes and double quotes, in the line of text generated by the text variable...
Thanks for your help
p.Hi,
As I said, using Power Headers is the best way to do it.
As Power Headers treats the header as "live text", you can use a simple grep style inserted in the header para style:
… to obtain:
For the sample, I use a char style named "-2pts" with Shift -5 pts and Green color to show you the place of ' and ".
Don't forget that, even Power Headers treats the header as "live text", you only have to update Power Headers to make an update of the headers!
Even I use in another cases Tomaxxi's [JS] and it's a good way to treat the question, Jean-Claude Tremblay's solution is less interesting because the variable used is converted in text. If the variable text content changes, it's more complicated to manage the update! -
Text variables with multiple lines
Like in my other question: we typeset a lot of juridical books.
We use text variables in the header for showing the current chapter and for example current author of that chapter.
So we let the paragraph style of the chapter show in the header.
When the title is longer then 2 lines in the header, Indesign pushes everything on 1 line. It becomes unreadable.
We have a solution by putting 2 character style variables underneath each other on the master page or just manually make a new master with the good title on 2 or more lines.
I have to ask Adobe to look to this 'issue', is this the right place?No this isn't the right place - this is a user to user forum -
You can add your request here https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform
What I do is - setup a nested style for
Runhead line 1 up to 50 characters
Runhead line 2 up to end nested style
Of course you need to have 2 running head styles based on Character Styles
And insert those into the master page
Or this will save you tonnes of work
http://in-tools.com/products/plugins/power-headers/ -
Property Lists: How to insert a variable as a property?
Hi.
I am trying to insert a variable in place of a newly defined
property to be added to a poroperty list.
This would normally add a new a new property to a poroperty
list :
Database [#needtogetvariablehere] = typedPassword
-- 'Database' is the property list, 'needtogetvariablehere'
is the new poperty and 'typedPassword' is the new property's value
- thisall works fine.
I'd like to generate new property names dynamically using an
editable text box. How do I replace the new property name '
nedtogetvariablehere' with a variable?
I'm sure I've got to put some rounded brackets in somewhere
but everything I try spits out a syntax error.
eg:
myVariable = "blablabla"
Database [#(myVariable)] = typedPassword
Any ideas?
Thanks.I don't know of a way, despite the responses so far, to
convert a variable
name to a symbol then to use it as a property. You must hard
code it as you
have seen in the responses.
Craig
Craig Wollman
Word of Mouth Productions
phone 212 928 9581
fax 212 928 9582
159-00 Riverside Drive West #5H-70
NY, NY 10032
www.wordofmouthpros.com
"dbohea" <[email protected]> wrote in
message
news:e7e3p7$mb2$[email protected]..
> Hi.
>
> I am trying to insert a variable in place of a newly
defined property to
> be
> added to a poroperty list.
>
> This would normally add a new a new property to a
poroperty list :
>
> Database [#needtogetvariablehere] = typedPassword
>
> -- 'Database' is the property list,
'needtogetvariablehere' is the new
> poperty
> and 'typedPassword' is the new property's value -
thisall works fine.
>
> I'd like to generate new property names dynamically
using an editable text
> box. How do I replace the new property name '
nedtogetvariablehere' with
> a
> variable?
>
> I'm sure I've got to put some rounded brackets in
somewhere but everything
> I
> try spits out a syntax error.
>
> eg:
>
> myVariable = "blablabla"
>
> Database [#(myVariable)] = typedPassword
>
>
> Any ideas?
>
> Thanks.
> -
Is there any way to add a text variable in Illustrator CS3?
To keep track of our proofs, I have a text box in Illustrator with the date and time that I would like to automatically update everytime I save the file.
This is possible in InDesign by inserting a text variable. Is there a way to do this in Illustrator?
Thanks for any tips!The only I'm aware you can do this is with a plugin from Worker72a
(Tag72a)
http://www.worker72a.com/CS3/Tag72a.htm -
Text Variable Help? Beginning section page number required
Hi guys,
My name is Arjun and I am working on a book in Indesign. I've created quite a few sections and want to create a header on top that displays,
for example
"Summary FirstX to LastX" (in bold are the variables)
First X being that Sections first page number
Last X being that Sections last page number
There is a default preset that came with Indesign CS4 that allows you to create a Text variable for the last page number of that section. What about the beginning? I don't wan to turn that to static text as i have a lot of page shuffling to do and the more the automated the better.
Thanks,
ArjunI hadn't noticed that there isn't a First Page Number text variable building block. How odd.
I would try setting up a "cross-reference" to the first paragraph in your section. (This is not part of the text variable dialog. Use the cross-reference window under Type & Tables in the Windows menu). I assume these will work on master pages, though I haven't tried it. It does seem odd that you'd need to use completely different tools for each page number!
Be aware that there's now a hidden marker at the beginning of that paragraph, which the cross reference uses to know what page number to insert. So if you accidentally remove it (for instance, if you delete and retype the whole paragraph), you'll have to set up the cross reference again. And you'll have to explicitly create that cross reference in each section of your book, while the text variables are pretty automatic. So there could easily be a better solution that I haven't thought of.
Good luck, and tell us what finally works... -
How to hide Text Variable in the Query title
Hi guys,
here again in a very easy pratical issue.
I need to insert a text variable in a report title.
The variable is updated with an exit and the text is get once the query is executed. This works fine.
My problem is that in report selection (so opening the query and between queries available for an Infoprovider) I see the tech variable name of the query. Do you know if there is a method to hide the variable or if it is possible to valorize it when the report title in the report selection is displayed?
Thanks in advance
Bye!Hi, thanks for your answer.
Also SAP marks this as a limitation.
Bye! -
How to use text variables?
Hi,
I have a text variable 'ZEMAIL' with data element 'COMM_ID_LONGu2019.The routine corresponding to this is 'GET_ZEMAIL' in 'ZHKMIT30' program.
Now I have to retrieve emloyee E-mail ID (infotype 0105 i.e.PA0105 DB table, subtype 0010, field USRID_LONG) and has to populate in ZEMAIL. How?
I am very new to this text variables concept
How to get this text variable implemented? Please help.select pernr subty usrid_long
from pa0105
into table it_pa0105
where pernr in s_pernr
and subty = '0010' .
loop at it_pa0105.
ZHKMIT30-ZEMAIL = it_pa0105-usrid_long.
insert ZHKMIT30.
endloop. -
Problem inserting text with special Hungarian characters into MySQL database
When I insert text into my MySQL db the special Hungarian
characters (ő,ű) they change into "?".
When I check the
<cfoutput>#FORM.special_character#</cfoutput> it gives
me the correct text, things go wrong just when writing it into the
db. My hosting provider said the following: "please try to
evidently specify "latin2" charset with "latin2_hungarian_ci"
collation when performing any operations with tables. It is
supported by the server but not used by default." At my former
hosting provider I had no such problem. Anyway how could I do what
my hosting provider has suggested. I read a PHP related article
that said use "SET NAMES latin2". How could I do such thing in
ColdFusion? Any suggestion? Besides I've tried to use UTF8 and
Latin2 character encoding both on my pages and in the db but with
not much success.
I've also read a French language message here in this forum
that suggested to use:
<cfscript>
setEncoding("form", "utf-8");
setEncoding("url", "utf-8");
</cfscript>
<cfcontent type="text/html; charset=utf-8">
I' ve changed the utf-8 to latin2 and even to iso-8859-2 but
didn't help.
Thanks, AronI read that it would be the most straightforward way to do
everything in UTF-8 because it handles well special characters so
I've tried to set up a simple testing environment. Besides I use CF
MX7 and my hosting provider creates the dsn for me so I think the
db driver is JDBC but not sure.
1.) In Dreamweaver I created a page with UTF-8 encoding set
the Unicode Normalization Form to "C" and checked the include
unicode signature (BOM) checkbox. This created a page with the meta
tag: <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />. I've checked the HTTP header with an online
utility at delorie.com and it gave me the following info:
HTTP/1.1, Content-Type: text/html; charset=utf-8, Server:
Microsoft-IIS/6.0
2.) Then I put the following codes into the top of my page
before everything:
<cfprocessingdirective pageEncoding = "utf-8">
<cfset setEncoding("URL", "utf-8")>
<cfset setEncoding("FORM", "utf-8")>
<cfcontent type="text/html; charset=utf-8">
3.) I wrote some special Hungarian chars
(<p>őű</p>) into the page and they displayed
well all the time.
4.) I've created a simple MySQL db (MySQL Community Edition
5.0.27-community-nt) on my shared hosting server with phpMyAdmin
with default charset of UTF-8 and choosing utf8_hungarian_ci as
default collation. Then I creted a MyISAM table and the collation
was automatically applied to my varchar field into wich I stored
data with special chars. I've checked the properties of the MySQL
server in MySQL-Front prog and found the following settings under
the Variables tab: character_set_client: utf8,
character_set_connection: utf8, character_set_database: latin1,
character_set_results: utf8, character_set_server: latin1,
character_set_system: utf8, collation_connection: utf8_general_ci,
collation_database: latin1_swedish_ci, collation_server:
latin1_swedish_ci.
5.) I wrote a simple insert form into my page and tried it
using both the content of the form field and a hardcoded string
value and even tried to read back the value of the
#FORM.special_char# variable. In each cases the special Hungarian
chars changed to "q" or "p" letters.
Can anybody see something wrong in the above mentioned or
have an idea to test something else?
I am thinking about to try this same page against a db on my
other hosting providers MySQL server.
Here is the to the form:
http://209.85.117.174/pages/proba/chartest/utf8_1/form.cfm
Thanks, Aron -
Creation/modification dates text variable wrong
I have a document where i wish to use the creation date amd modification date text variables. However when htey are inserted into the document the date is wrong. My Local Date Time on the pc is correct.
Has anyone else experienced this issue? I am running ID CS4 if that helps.
Thanks for any help in advance.Well I created the document yesterday. 18/10/2012 and it brings up a creation date of 27/02/12.
But creating another new doucment it shows correctly.
So all i can assume is that there may have been another file created on that date with the same name and it is taking that date even though this is a new document
Message was edited by: ScruffyG -
Messages/insert system variable in message
Hello ,
I am writing short report , and after i delet e some lines from db i would like to have message with text
e.g. ' 25 lines deleted '. I created text symbol 002 containing text " lines deleted" but i do not know how to
insert system variable sy-dbcnt in front of it . Please have a look at source code below .
Thank you
source code
REPORT ZMM4R82 message-id sy .
data gv_date type sy-datum.
data gv_no_days type n length 3 .
selection-screen begin of block A1 with frame TITLE text-001.
parameters pdays like gv_no_days default '60' .
selection-screen end of block A1.
at selection-screen.
gv_no_days = pdays .
pdays = '60'.
gv_date = sy-datum - gv_no_days.
delete from zdocktostock where ddate < gv_date.
Message text-002 type 'S' .After
delete from zdocktostock where ddate < gv_date.
You have to use
Concatenate TEXT-002 SY-DBCNT into V_string separated by Space.
Message V_STRING type 'S'.
Maybe you are looking for
-
Film 2k Editing Project Settings
Hi, i am starting a film project to edit,can anyone plz give me the exact 2k project sequence settings & project settings,like frame rate,2k resolution size,progressive or ???? ,the project pipeline is - premiere to speedgrade to Lab print(Negative o
-
Regarding Testing phase in Implementation project
Hi FI/CO gurus I would like to know about the testing phase in implementation project like 1. What are the different types of testing done by a SAP FI/CO consultant after configuring the relavent objects in implementation project, pls provide with o
-
SAP Business One Development Environment Install
Hi there, I'm new to SAP Business One and this forum. I'm trying to install the SAP Business One Development Environment on a Windows Server 2003 with VS 2008 and am receiving an error code of 2869. I've entered a 3 character namespace as suggested
-
REFRESH STATISTICS ON THE INFOCUBE
Hi , Under the manage tab of the infocube i have clicked the tab refresh statistics.I clicked on the log and it showed that the statistics were successfully compiled on the infocube. Is this the only way of confirming that the refresh statistics we
-
HT4623 iPad mini is locked, how do I get in without a password?
I have given an iPad mini as a gift and now he cannot access it bacause his password was forgotten. How can we enable the device from " device disabled" screen?