Name of file in the header

Hi,
I would like to set automaticaly the name of the file in the header (or the foot) of a document without to write it but after i have save the document. Is it possible ?
Thanks for your response.
PB G4   Mac OS X (10.4.6)   Pages 2

You can use AppleScript to target the header specifically, so you don't have to rely on the active insertion location. But, because Pages can have complicated documents, some care must be taken to get every header in every section.
<pre>
tell application "Pages"
tell front document
set docName to name
set firstSection to section 1
repeat with aSection in every section
tell aSection
-- If reusing headers/footers from the previous section, there's
-- no need to set the value again, unless it's the first section,
-- where there is no previous section.
if not reuse headers and footers or contents of aSection is firstSection then
-- Every section has an odd header
set odd header to docName
-- Some may also have an even header
if different left and right pages then
set even header to docName
end if
-- This may not be desirable, but it's here for completeness
-- In practice different first page is used
-- for a title page, where you might not want the header.
if different first page then
set first page header to docName
end if
end if
end tell
end repeat
end tell
end tell
</pre>
Titanium PowerBook   Mac OS X (10.4.6)  

Similar Messages

  • How do I extract the name of the incoming file from the Header?ta

    Hi all,
    I am using 11g TP4:
    I have an File Adapter Service that reads a file. In the Routing Service I want to include the name of the file that was read in the message passed onwards to the target service.
    Previously we used an expression like
    <xsl:variable name="INFILENAME"
    select="ehdr:getRequestHeader('/fhdr:InboundFileHeaderType/fhdr:fileName','fhdr=http://xmlns.oracle.com/pcbpel/adapter/file/;')"/>
    to set the $INFILENAME variable to the name of the file.
    This does not seem to work anymore. I notice a new namespace has appeared:
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.GetRequestHeaderExtnFunction"
    is this namespace the origin for a new function that replaces getRequestHeader? Is it still getRequestHeader? What then is the correct syntax - as I am getting XPath errors with either ehdr or mhdr. Is there any documentation on accessing the contents of the header?
    Thanks for any help you can provide.
    Lucas

    Hi Lucas (says Lucas),
    After a little digging and trying out things I have found the solution.
    The Advanced Components palette available in the Mapping Editor has a section Mediator Functions. The getProperty() function shown there can be used to extract header properties. The property I am after is called jca.file.FileName, and can be assigned in the XSLT document like this:
    <ns2:filename>
    <xsl:value-of select="mhdr:getProperty('in.property.jca.file.FileName')"/>
    </ns2:filename>
    Note that the Assign Values dialog that is available in the Mediator editor has a long list of many names of properties that are available, including jca.file.Directory and jca.file.Size as well as many properties for the AQ, BPEL and EBS adapters.
    hope this helps any one besides myself.
    bye for now,
    Lucas

  • Is it possible (if so: how) to store an i-Photo file (with an average of 50 photos per file) onto a USB-stick, in a way that the file with the heading (e.i.'holidays' or 'work') remains in tact? If I click 'export' all photos are stored separately. Thanks

    I am trying to store I-Photo files onto a USB-stick, keeping the file (with an average of 50 photos) in tact. Is this possible and if so: how, please? I have tried clicking on 'export' and then click on the name of the USB-stick. But by doing this all photos seem to be stored separately, under their image number - and not under the file name. Which makes it near impossible to easily refind the photos on the USB-stick.
    Thanks for advice

    Dear Alex,
    If I understand correct your post you are confused with difference of loading procedure between real smartcard and SDK simulation. It is a fact that simulation uses its own loader application and smartcards usually use GlobalPlatform card manager application. To load CAP file to the GP compliant card it is necessary to use sequence of commands such as INSTALL(load),LOAD,INSTALL(install+make_selectable). I do not know any specific java API to perform this loading with any reader. But there are few software programs from various card producers. This software is usually distributes toghether with smartcards.
    Yours
    Dmitri

  • Can I remove the Edge Animate stage from the body of my HTML but keep the .js file in the head?

    Howdy,
    I have designed a couple of Edge Animations for a client to insert on a single page of their website.
    The client wants to package all .js files as one for the site to reduce the pageload - but if they do that and simply remove the stage elements from this page the animations take over the page where the stages are supposed to be.
    I am hoping it is possible to add some logic to the .js file about "if these divs don't exist, do nothing" but I do not have enough coding skill to alter these Edge Animate .js files.
    Does anyone have any suggestions?
    Thanks!

    Hi Sarah,
    Thanks for the reply.
    What my clients want to accomplish is is to package all the separate .js files for the website into one file, so all the pages load faster.
    This includes the Animate.js files which are only to be used for the home page, so of course random animations appear on the rest of the pages which don't have the animate DIVs in them.
    I have suggested they package all the .js files EXCEPT the animate.js ones and just load them separately on the page the animations are to appear on.
    But they are still wanting to do them all in one package however (!!) so my question is:
    Can some code be added to the animate.js files that says something like "if these DIVs are not found, make the animation do nothing"?
    It is possible the relevant code cannot be added in which case they will have to do the animate.js files separately, but as they have asked me about it I thought I would ask people in the forum if they knew how to accomplish this.
    Cheers,
    Jim

  • Adobe InDesgin CS6 "The networks connection was lost for the file, name of file, or the file was modified by another process. Then the document just spins and spins until we force quit. Very frustrating. What can we do to fix this?

    Running on Mac OS X 10.9.4 and InDesign CS6.

    Are you opening a file from a file server? It sounds like you connection with the server was broken, or there is a problem with the server configuration.
    When happens if you reboot, reopen InDesign, and open a file on your local hard drive?

  • Author name in the header

    How is possible to insert the Author name of sheet on header page??
    bye
    gianlu

    Hi JeanCruz!
    Were you able to sort your problem out?
    Based on what you have written, what I understand is:
    1) Your clients have access to various business areas
    2) They are creating their own reports either using Discoverer Desktop or Plus.
    3) They want their name to appear on the header as a report author.
    The solution I had suggested was let them select 'user' from your quary 'select user from dual' and place it as a page item in the report. Thus, when they select page items to be displayed in the header, their name will automatically apear as an author.
    However, there is something that I had not thought of....if some other user (with whom the author of tha report has shared the report) logs in and checks tha same report...then, his/her name will appear instead of the author.
    Answer to your last question: I'm from India, but, working in Mauritius.
    Regards,
    Aparna

  • How to overwrite the header part of a wave file?????

    I need to overwirte the header part of a wave file. Any one has ideas or similar experiences?
    basically, I want to continousely save wave data from a sound card. At the end of my program, I need to write the data size of the final wave file to the header part of the wave file.
    Is there a function to replace the content of a file? Thanks

    I assume that what you want to do is add documentation into the header of the wav file such as the media type, location, equipment used .....
    Some one may have written some routines to do this in Labview, unfortunately all the ones I have are written in Visual Basic, quite a long time ago.
    Here are some pointers in the event that no one has any Labview stuff, we could even knock a few togther, if its not been done.
    The WAV file falls into a cateory of Windows files known as RIFF format files, in fact you will see this written into the file header almost at the very front.
    I quote here from the Microsoft Technet Article:-
    See here for a nice picture and here for full details, although for the header structure I prefer here.
    "The basic building block of a RIFF file is a chunk. A chunk is
    a logical unit of multimedia data, such as a single frame in a video
    clip. Each chunk contains the following fields:
    A four-character code specifying the chunk identifier
    A doubleword value specifying the size of the data member in the chunk
    A data field
    Don't be put off by the fact that it often says AVI rather than WAV in the examples, the RIFF format is an extensible file format supporting lots of various media types even custom types. It's just that at the moment people are interested in Video.
    There are standard fourcc codes that exist to hold various specific types of information and if one of these is not suitable you can create your own, there is (well was) even a way to regiser your own special type with Microsoft!!
    There are a couple of ways of doing the job (assuming some kind sole does not donate a VI library).
    1) Handle all the file i/o yourself by reading in the file and then insert the appropriate headers and rewrite the file out again.
        Involved, but cross platform.
    2) Muck about with Windows 'mmio' librarys (mmioCreateChunk).
        Platform specific but possibly more reliable???
    If you select option 1, then what you have to do is read in the appropriate chunk sizes(lengths) contained in the header, insert your appropriate FOURCC code, size(length) and data then adjust the affected 'chunk' size indicators to put all the various size indicators in the correct place, simple ehhh
    If you select option 2, this requires linking to the appropriate DLL, it always my last resort to avoid DLL hell and portability issues.
    As an example I wrote my own Turbo Pascal and later Visual Basic handlers which allowed attachment of lots of information from a form, and then created a special media format for the data to allow storing native measured data. These files are still recognised by WAV file readers today such as Media Player 10. Of course the data format is not understood because the encoding type was special, but that's the point.
    One final point, there was a tool which read in a WAV file displaying all available headers, with C source (Windows 3.X) supplied in the MSDN toolkit. There are probalby other tools available by now, as a last resort If you decide to have a go I can send you my VB alpha version which reads all standard headers, it might write out a few as well (it was a very long time ago).
    Good  luck.
    Message Edité par Conseils le 12-10-2005 04:09 PM

  • Question about using a PHP include for the head info...

    Hi,
    I'm currently using PHP includes for my site header and footer info.
    All my js/css files and meta declarations are in the head portion, which is in the header include.
    How would I go about giving each page its own individual TITLE if the modifiable content of my pages is inside the body only? Since we can't specify title inside the body, am I stuck with the same page title for each page on the website?

    Is it true that you header include file has the </head> and <body> tags embedded? It would seem a lot neater - and safer - to use two include files, one for the header and one for the body. That way, the <title> is not in either of them and you can do with it what you will.
    Barry

  • Set Folder Name From File Name Inclosed.

    Hello scripters,
    There has been quite a few topics about setting file names from parent folders. I believe it's possible but not sure how to reverse this process. That is to say set the folder name from a file in the folder. This is what I'm imagining.
    I've got a folder. In the folder are 100 folders with the names "untitled folder xxx" In side I've got files that are all named and numbered.
    For example,
    untitled folder/B-day 001~050.jpg
    untitled folder 50/At The Park 001~020.jpg
    I would like a script to change the name of the parent folder of the files that it houses.
    So untitled folder becomes
    B-Day
    untitled folder 50 becomes
    At The Park
    etc…
    I think getting the name of the first file (minus the index number) would be easiest.
    Any help or futher questions are greatly appreciated.
    Maximilian

    Working backwards...
    Assuming all the files have the same name structure (e.g. end in the format "xxx~xxx.jpg" you can get the base name using:
    <pre class=command>set baseName to characters 1 through -13 of filename as text</pre>
    This cuts off the last 12 characters of the file name.
    Once you have a folder, you can get the names of files in the folder via the Finder. for sanity's sake I'd ask the Finder for the first item, just in case there's more than one file:
    <pre class=command>set filname to name of first item of (files of folder theFolder)</pre>
    And if all the folders are in one top folder, you can iterate through them like:
    <pre class=command>repeat with eachFolder in (every folder of folder topFolder)</pre>
    So now, string it all together:
    <pre class=command>tell application "Finder" -- we'll use the Finder to do the legwork
    set topFolder to (choose folder with prompt "Choose the top level folder" ) -- get the top folder
    repeat with eachFolder in (every folder of folder topFolder)
    set fileName to name of first file of (files of folder topFolder)
    set baseName to characters 1 through -13 of fileName as text
    set name of folder eachFolder to baseName
    end repeat
    end tell</pre>
    Note there's no error checking - the script will fail if there are no files in any particular folder, but it should get you going.

  • Problem applying Spry tool tips to child pages because the head tag is in a locked region

    I’m new to DW and migrating a site from GoLive CS2 to DW CS5. The site uses templates created in GL CS2. I have stripped out as much GL stuff as possible.
    I want to use the SPRY tooltips as a way to show captions for graphics that are on some of the pages (I used to use an Open New Browser window for that but I don’t have as much control in DW as I did in GL). But when I try to apply SPRY tooltips (or any SPRY widget for that matter) I get the following message:
    “Required links could not be added to this file because the <head> tag is in a locked region. To insert this content, open the template file ‘xyz.dwt’ and either unlock the <head> tag or add this content to the template.”
    I am not sure how to go about solving this problem. In the template there is an editable region for adding graphics but in the template itself there are no graphics or anything else to apply a tooltip too. Also in the child pages there may be more than one place to use a tooltip. So that suggests to me that I should not add a tooltip to the template. That brings me to the other option.
    How would I go about unlocking the  <head> tag in the template, without messing everything up?
    Or, should I detach any page from the template when I want to add tooltips then reapply the template? I am planning to ditch the GL template anyway and apply a DW template to all the pages anyway.
    Any suggestions as to what I should do?
    Yours faithfully
    Branko
    PS I’m using Mac with Snow Leopard.

    I found a solution.
    I just made a transparent PNG. Put it in an inconspicuous part of the template. On the child page I could make as many copies as I needed making sure I provided id tags for each use etc.

  • SAP Query: Display Selection Fields in the header page of Basic list

    Hello,
    I have to display the selection fields in the header page of the basic list and statistics
    in a SAP Query.
    I know the usage of short names for fields in the header page, but this doesn't work
    for the selection fields.
    How can I display the selection fields in header pages?
    Kind regards
    Thomas

    Try using:
    DATA: wa_lstab TYPE line
    READ LINE sy-index line value INTO wa_lstab
    Thanks,
    SKJ

  • How to Modify the Header/Footer that's created when printing to PDF?

    Hi all,
    How do I modify the header/footer that is added when I use the Adobe PDF printer in another application, like MS Word? Currently it adds the entire path of the file as the header, which is really annoying.
    I'm not talking about the Header/Footer command in Acrobat's "Document" menu. In fact, that command doesn't even recognise the header that's generated by the Adobe PDF printer.
    I'm using Acrobat Pro 8.1.3, btw.
    Thanks :)

    Generally you should set the whole look of the page in your application and then print to the Adobe PDF printer as you have been doing. If you are using a browser, there are header and footer commands for the printer that are typically set by the browser - those can be modified there. The PDF should look just like the preview in the application, that is the point of a PDF.

  • I want to put a .jpeg in the head of a page.

    It should repeat it on every page. But it is not possible to put a .jpeg file in the header.
    Can somebody help me. In word it is no problem at all.
    Kind regards,
    A pages user

    With which application are you doing this?

  • How we create a flat file on the application server

    hi,
    how we create a flat file on the application servere,this file have the header data and corresponding item data also.
    i.e. how we use the AT NEW and ATEND. statement in this file creation.
    pls send me some code related to this.
    thanks,
    vipin

    Hi Grafl,
    Chk this link
    Folder creation in AL11 using ABAP program
    try this code.This works on UNIX servers
    data: unixcom like   rlgrap-filename.
    data: begin of tabl occurs 500,       
            line(400),    
          end of tabl.
    dir = unixcom = 'mkdir mydir'. "command to create dir
    "to execute the unix command 
    call 'SYSTEM' id 'COMMAND' field unixcom
                      id 'TAB' field tabl[].
    <b>Reward Points if Useful</b>
    Regards
    Gokul

  • Multiple drag emails from Mail to a finder window and for it to name the files as the subject heading

    Hi
    I have been using Mac's now for about 10 years and this is my first problem.
    I have recently moved into an office that use PC's with a Windows server.
    I have set up the network to transfer files and view the windows server and it  works fine.
    I have a problem in that my colleagues on PC need to be able to view my emails which I send and receive using Mail. They therefore need to have logical title names and the date sent and ideally who to or from. I view them and archive them using Mail which is fine for me.
    I understand about the archiving and copying of mailboxes but this gives every email the un-fathomable title name 9944847 etc.
    I can get round the problem by dragging and dropping every email I send and receive individually and it will automatically give it a more logical title of the subject heading however the date is when it was dragged not when sent. This is a pain if I am away or forget to save an email for a day or two and then the date is inconsistent.
    Is there a way to batch copy emails from Mail to a finder window and for it to name the files as the subject heading or to archive the files in a similar way so they retain the detailed information my colleagues require.
    And no I can not get to all change to Mac and I don't really fancy using Outlook, Entourage or Parallels.
    Please help.
    Toby

    Quit Mail. Force quit if necessary.
    Back up all data. That means you know you can restore the Mail database, no matter what happens.
    Triple-click the text on the line below to select it:
    ~/Library/Mail/V2/MailData/Envelope Index
    Copy the selected text to the Clipboard (command-C). In the Finder, select
    Go ▹ Go to Folder
    from the menu bar. Paste into the box that opens (command-V), then press return.
    A Finder window will open with a file selected. Move the selected file to the Desktop, leaving the window open. Other files in the folder may have names that begin with "Envelope Index". Move those files, if any, to the Trash. Relaunch Mail. It should prompt you to re-import your messages. You may get a warning that the index is corrupt and that Mail has to quit. Click OK.
    Test. If Mail now works as expected, you can delete the file you moved to the Desktop. If you get a warning that the file is in use when you try to empty the Trash, log out and log back in.

Maybe you are looking for