Create text with tokens

Does any one know how to automate the creation of a text file that is made up from a number of specified strings or tokens? For example, I would like to automatically create a text file that would be the input file to a email message.
For example:
"This message was created on <today's date> at <today's time> by <name of logged on user> on Mac <machine name>."
Every time the workflow is called the tokens (<token>) are replaced with the full values.
Would this be possible? Or would it be simpler to AppleScript?
Thanks
Mark

Try using this AppleScript:
set the_date to (current date) as string
set the_time to items ((count the_date) - 7) thru (count the_date) of the_date as string
set the_date to items 1 thru ((count the_date) - 9) of the_date as string
set the_user to long user name of (system info)
set the_machine to computer name of (system info)
tell application "Finder"
(make file) as alias
write ("This message was created on " & the_date & " at " & the_time & " by " & the_user & " on Mac " & the_machine & ".") to the result
end tell
The 7 and 9 may need to be increased by 3 if the computer is set to use the 12-hour clock.
(21916)

Similar Messages

  • Can't create text with PHP using imagettftext [SOLVED]

    I think that after the upgrade of PHP to the modular one I can't create text using TTF fonts. Before I file a bug report could someone confirm if it works or not for them? I might just have screwed something in my box.
    This code should create a text image and display it in the browser (it assumes you have DejaVu fonts in the default directory):
    <?php
    // Set the content-type
    header("Content-type: image/png");
    // Create the image
    $im = imagecreatetruecolor(400, 30);
    // Create some colors
    $white = imagecolorallocate($im, 255, 255, 255);
    $grey = imagecolorallocate($im, 128, 128, 128);
    $black = imagecolorallocate($im, 0, 0, 0);
    imagefilledrectangle($im, 0, 0, 399, 29, $white);
    // The text to draw
    $text = 'Testing...';
    // Replace path by your own font path
    $font = '/usr/share/fonts/TTF/DejaVuSans.ttf';
    // Add some shadow to the text
    imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
    // Add the text
    imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
    // Using imagepng() results in clearer text compared with imagejpeg()
    imagepng($im);
    imagedestroy($im);
    ?>
    Could someone with an up to date php with GD enabled tell me if it works or him/her?
    Thanks.
    EDIT: Ok, I solved it. The error reporting is turned off by default now, so I was not getting any error. After turning it on I found out it was related to the open_basedir directive being enabled now in php.ini. Turning it off allowed me to access the TTF for drawing text.
    Last edited by Bogart (2007-11-01 00:43:33)

    Aha!  I figured it out.  I used File...Open As to open it as a Camera RAW file.  In the ACR editor, it was showing as 16-bit depth.  Changed it to 8-bit and saved it.  Now the Text tool works!
    Ken

  • How do I create text with Automator

    I am trying to create a very simple macro, or text substation. I would like to hit 5 on my keyboard, and have a long text message appear, like a signature line at the end of an email. When I use record in Automator, it works. However, I cannot get the macro itself to execute.
    Thanks in advance for your help.

    AppleScripts do not, typically, trigger based on arbitrary events (such as a keypress), so there's no direct way to invoke your script in the way you describe.
    (notwithstanding, of course, that your proposal would prevent you from ever typing '5' again).
    If you want simple text substitution then check Keyboard preferences (System Preferences -> Keyboard -> Text) and create a new shortcut that the OS will automatically replace with a block of text.
    If you want more involved actions then you may need some external app such as Keyboard Maestro or QuicKeys, both of which can perform actions based on specific keystrokes.

  • Create text with noice

    Hello
    I need text have the "noice" as shown on the attached image.
    "noice" must be transparent, so backgrounds seen through.
    I can use it both created with the text tool or as an  graphic elements
    Is there an filter /effects ?
    How am I doing this,  - ( is there  an  tutorial )

    Simply use a luma matte. For adjusting the contrast of the matte, use additioanl effects like Levels. And, if I you allow me: No need to post in multiple forums. Okay, it's weekend so answers may take a bit longer, but even we buddies around here can answer one or the other question on PS, if you really must know all 500 ways how to create an effect.
    Mylenium

  • Using Illustrator CS4 trying to create text with background showing thru in random areas

    how can I get this look in Illustrator?
    this is a red letter on a blue background which shows thru

    ween,
    If you have an image or whatever in grayscale with the desired pattern where full black or white corresponds to the background fully showing through the letters, you may:
    1) Create the blue background at the bottom;
    2) Create the red letters in the middle;
    3) Place the grayscale image/whatever at the top;
    4) Select 2) and 3) and in the Transparency palette flyout tick Make Opacity Mask with Clip ticked and Invert mask ticked or unticked, depending on the choice of colour (you can see which makes it right).

  • Create text with default values

    Hi,
    I need to copy values(ID, description , dates , status text)  from current document to follow up document ' text ' .
    I have defined text determination procedure->text type-> access sequence->function ( copy of COM_TEXT_DETERMINE_TEXT)
    , but this function only copies SO10 text to next document.
    I need to pass values to the text.
    Please suggest how to achieve this.
    Regards
    Pratyush

    Hi,
    you can use screen fields in BDC to update short text. you need CREATE_TEXT or SAVE_TEXT function module to update long text. Transaction may any. You have to pass some parameter to update long text.First try to use READ_TEXT to get existing text for practice.You will get some idea of long text, then create your own long text for any transaction

  • Formatting text with Safari

    I am posting ads on a website that doesn't use Safari (or any non PC system, from what I gather) for formatting. As a result, when I paste text in it only allows ktml formatting, which doesn't make paragraphs or do anything else. Is there a way to create text with formatting that will paste in as I format it, or is there a MAC-friendly browser that will allow me to format?

    If this site is really using KTML (as opposed to HTML), then you really don't have many choices for editing anything. Formatting is limited to the site design and capabilities of the system as they designed it.
    You might try this site for a script that works in Safari: http://www.hotscripts.com/Detailed/57712.html
    Mulder

  • LIBOVD ERROR  - "validateContextToken: workflow session was not found for given context. Create a new workflow session with token"

    Hello everyone,
    I have the following scenario:
    We're using "Oracle SOA Suite 11g 11.1.1.7.0" (Patched w/ 17893896) mainly for a BPM/Human workflow composite. Former, we were having the error bellow:
    <Mar 16, 2015 1:13:03 PM BRT> <Error> <oracle.soa.services.workflow.query> <BEA-000000> <<.> Verification Service cannot resolve user identity. User weblogic cannot be found in the identity repository. Workflow Context token cannot be null in request.
    ORABPEL-30511
    When that error ocurred, no one was able to use the system (BPM/Human Workflow).
    I opened an SR, and after some analysis from the support, it recommended me to set up "virtualize=true" in EM, and restarting the domain. Then it started logging the following:
    connection to ldap://[10.200.10.57]:7001 as cn=Admin.
    javax.naming.NamingException: No LDAP connection available to process request for DN: cn=Admin.
    Looking up on support KB, I found this note Doc ID 1545680.1 and increased from Max size of Connection Pool 10 to 200. That did work successfully! Problem now is that the <SERVER>_diagnostic.log is being filled up with the following error:
    [2015-03-31T16:03:46.421-03:00] [soa_server2] [ERROR] [] [oracle.soa.services.workflow.verification] [tid: [ACTIVE].ExecuteThread: '19' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: e0194e38aa6c9a2f:39fc1ff9:14c5def5247:-8000-00000000000a5653,0] [APP: soa-infra] <.>    validateContextToken: workflow session was not found for given context. Create a new workflow session with token=51490173-e3d0-41dd-ae99-983915aa8454;;G;;Z+P7Oe9ABnoTUQD9ECryEW2l0/8yRcqPDyZsOWBCuzMmRgA3Qsj601TxmWQ87z2MjuwW5AH+KzgjIwkPmhJFdpc1FrE6Y/MrN1bxIDHJWu2/zP3iSNwKD07hRrh/U37Ea0TvaQyuaHJIog9y3Ptmzw==
    One important point is that we're using only the embedded WLS ldap. So I am not 100% sure if we should be using the virtualize flag=true, once all docs I read point out that this should be done when using multi-ldap providers.
    Also, I only got this error in the "diagnostic.log".
    Although, no user has complained about using the system, I really want to work it out. Anyone has any suggestions?
    Thanks in advance!

    I have moved your thread from Certification to SOA Suite to get proper assistance.
    Thanks,
    Lisa

  • Need help with creating text anchors with tagged text.

    Can anyone tell me how to determine the correct value for a "Hyperlink Dest Index" value?
    I have a script which creates a tagged text file that specifies about about 280 pages of tables (thank heavens for autoflow) , and would like to add live links between different parts. I can create a text anchor and a hyperlink to it in InDesign. The tagged text definition for the link source is simple and in-line and exports and imports nicely as tagged text. However, I see that all the link destinations, aka  text anchors, are all exported at the very end of the tagged text files as global definitions, and thier location iin the document is specified by the property HyperlinkDestIndex. However, I can't figure out how to set this value progammatically. I've spent over an hour exporting links, and it sure isn't anything as obvious as character index in the story.
    Any advice appreciated,
      Read Roberts

    Read, I'm not sure the following is going to help you. It works for external hyperlinks, but you want internal links, right? Anyway, it might give you some clues.
    A funny thing: I was reviewing some script where I got links to work, and I spotted a tiny coding error. Links seemed to be defined by two separate identifiers: a "link name", which is what appears in Edit Hyperlink dialog, and a "Dest Key", which seems to be a simple increasing number. However, due to aformentioned coding error, the dest keys between the actual link and its definition were off by '1', so there was no way that ought to have matched. But it still worked! So "Dest Key" is a red herring ...
    As far as I understand, it works like this (for hyperlinks): in your text, you have
    HplName -- this is actually the 'title' that appears in the Hyperlink palette
    HplDest -- this is the 'internal name'
    DestKey. Hm. Perhaps you could omit this, per above obsvn.
    CharStyleRef, the name of the auto-applied style
    Hid -- seems to be always '0'
    HplOff: the "offset" from this entire command to the start of the hyperlink, in InDesign characters.
    HplLen: the "length" from the hyperlinked text, in InDesign characters.
    and in the list of 'proper' definitions, those that appear at the very end of your file:
    HplDestDfn -- the internal name again
    DestKey -- see above
    HplDestUrl -- finally! A real URL! (But you must escape lots of characters, such as the forward slash and colon.)
    Hid -- again, always seems to be '0'.
    Some of these items are perhaps optional, but experimenting with what may be left out only lead to frustration The Tagged Text guide is far from complete, as I'm sure you already knew.
    As noted, some (or all) of the named items need a backslash escape for a few characters, but I can't find a definitive way to determine in advance what is 'good' and what is 'not good'.
    The following script creates a Tagged Text file with a couple of working hyperlinks in it -- I don't know if this is of any help for your internal links.
    var hyperlinkDest = [];
    var text = "This is some text with a link [http://www.jongware.com/idjshelp.html] and another one [http://forums.adobe.com/thread/1014617?tstart=0] in it.";
    var tagtext = text.replace (/\[(.+?)\]/g, function (full, match)
                        return makelink (match, 'title:'+match, match, match);
    // When done processing plain text, add the destinations at the end:
    tagtext += hyperlinkDest.join('');
    tagFile = File(Folder.myDocuments+'/__tmp.txt');
    if (tagFile.open('w') == false)
              alert ("Unable to create temporary file!");
              exit();
    if (File.fs == "Windows")
              tagFile.write ("<ASCII-WIN>\n");
    else
              tagFile.write ("<ASCII-MAC>\n");
    tagFile.write ("<dcs:HYPERLINK=<cu:1>>\n");
              tagFile.write (tagtext);
    tagFile.close();
    // 'text' is the actual text that will be clickable
    // 'title' is what will appear in the Hyperlinks palette
    // 'name' is the internal name in the Edit Hyperlink dialog
    // 'url' is the actual URL that will be linked to
    function makelink (text, title, name, url)
              var destkey = hyperlinkDest.length;
              // In URL you must escape forward slashes and colons
              // .. and some other characters as well, by the way. There seems to be no list
              url = url.replace(/\//g, '\\/').replace(/:/g, '\\:');
              hyperlinkDest.push ('<HplDestDfn:=<HplDestName:'+name+'><DestKey:'+String(destkey)+'><HplDestUrl:'+url+'><Hid:0>>');
              return '<Hpl:=<HplName:'+title+'><HplDest:'+name+'><DestKey:'+String(destkey)+'><CharStyleRef:HYPERLINK><Hid:0><Brdrv:0><HplOff:0><HplLen:'+String(text.length)+'>>'+text;

  • Standard Text with ' include' option doesn't work with order created by FM

    Hi ABAPers,
    Standard text with 'Include' Option does not work with all the Order created via the Function Module SD_ORDER_CREATE_WWW. Where as Order created via VA01 display the Standard text with 'Include'.
    On my analysis I found that, Order created via FM use  the '*' 'Comment' instead of ':/' 'Command' in the script editor. So the Standard text inserted was considered as a Text instead of command.
    Hence issuing print or print preview, the Script display the INCLUDE statement instead of the text.
    Can you please let me know the reason and the way to rectify it.
    Thanks & Regards
    N.Suresh Kumar

    Hi.
    Make that * command as /: and try in ur program..
    It works..
    Hope it helps...
    Cheers,
    Simha.

  • Problem: Create SO with BAPI_SALESORDER_CREATEFROMDAT2 & Head-Text Elements

    Hi all,
    I hape that sb can help me with my problem.
    I have created a ABAP-Program to create sales-orders with the function module:
    BAPI_SALESORDER_CREATEFROMDAT2
    Everythiunk works fine but I can not create text-elements (from the head) with this bapi.
    I know that I have to use the table "ORDER_TEXT" but I do not know how to fill this table.
    Can anybody help me?
    Best regards,
    pb974

    Hi,
    yes, you have to fill the order_text table. The following fields you have to fill:
    DOC_NUMBER   
    -> not to fill, let it blank
    ITM_NUMBER     
    -> if you want to create a header-text then fill ITM_NUMBER with '000000'
    -> if you want to create a position-text then fill the related position-number '000010' or '000020'....
    TEXT_ID
    -> fill this field with the text-id for which you want to create the text.
    -> The text-id must be defined in your customizing
    LANGU
    -> set the language for the text: 'E' or 'D' or......
    LANGU_ISO
    -> let it blank
    FORMAT_COL
    -> set a star (*) if you want to have the standard-format. If you have a special format defined in SapScript or in a Style you can set this one.
    TEXT_LINE
    -> fill in the text
    FUNCTION
    -> let it blank
    see below:
    data: i_text     LIKE bapisdtext  OCCURS 0 WITH HEADER LINE.
    Texte...
            CLEAR i_text.
            i_text-itm_number  = '000010'.    "Text for Position 10
            i_text-text_id         = 'ZA10'.        "Defined Text-ID
            i_text-langu           = 'D'.             "Language German
            i_text-format_col    = '*'.              "Standardformat
            i_text-text_line       = 'This is text for Pos. 10 - line 2'.   "the text
            APPEND i_text.
    ...if your text has more then one row... the same one to do...
            i_text-itm_number  = '000010'.    "Text for Position 10
            i_text-text_id         = 'ZA10'.        "Defined Text-ID
            i_text-langu           = 'D'.             "Language German
            i_text-format_col    = '*'.              "Standardformat
            i_text-text_line       = 'This is text for Pos. 10 - line 2'.   "the text
            APPEND i_text.
    ...and so one...
    and now text for position 20...
            CLEAR i_text.
            i_text-itm_number  = '000020'.    "Text for Position 20
            i_text-text_id         = 'ZA10'.        "Defined Text-ID
            i_text-langu           = 'D'.             "Language German
            i_text-format_col    = '*'.              "Standardformat
            i_text-text_line       = 'Text für Pos. 20 - Zeile 1'.   "the text
            APPEND i_text.
    ...and now the text for position in englisch
            i_text-itm_number  = '000020'.    "Text for Position 20
            i_text-text_id         = 'ZA10'.        "Defined Text-ID
            i_text-langu           = 'E'.             "Language German
            i_text-format_col    = '*'.              "Standardformat
            i_text-text_line       = 'This is text for Pos. 20 - line 1'.   "the text
            APPEND i_text.
    I hope it's a help for you.
    Erhard

  • TS3406 I have a connection in the top left hand corner and can access the internet with and without internet on my iphone 5c but I can't receive and create texts and calls, someone please help have tried everything!

    I have a connection in the top left hand corner and can access the internet with and without internet on my iphone 5c but I can't receive and create texts and calls, someone please help have tried everything!

    YOu will need to contact your cell phone provider to resolve those issue, those are carrier features.

  • Can anyone recommend an alternative software programme to Pages? I have an OS X 10.7.5 macbook pro, so I am unable to get it. I want a programme that I can create docs with pictures and text on, invitations, posters etc. Many thanks in advance-..

    Can anyone recommend an alternative software programme to Pages? I have an OS X 10.7.5 macbook pro, so I am unable to get it. I want a programme that I can create docs with pictures and text on, invitations, posters etc. Many thanks in advance…..

    LibreOffice

  • Failed to create recognisable class with token

    anyone know what this error message means?
    "Failed to create recognisable class with token <num>"
    I'm running a JNI app.

    Probably something that comes from the code of the application itself.

  • Creating a text with a java script on fixed position

    Hello i want to know how to create a text with a java script on fixed position
    thanx

    Hi,
    Your next steps are hidden here:
    http://www.jongware.com/idjshelp.html
    Object you created (textFrame, page, text) have properties to set or methods to execute.
    You could find them all inside above Jongware's Kingdom of Knowledge.
    In example:
    to set your text size use:
    myTextFrame.texts[0].pointSize = 12;
    Jarek

Maybe you are looking for

  • Guest OS Windows 7 for remote access

    We are setting up 4 VM's with Windows 7 OS for staff access on a Dell PowerEdge R320. We had all of the VM's working as specified above but had to re-install Server 2012 Standard because the factory tech setup the Raid 5 to only give the server OS 40

  • Pick up a specific file with File Sender Adapter.

    Hi guys, I would like to know how I can pick a specific file in a file pool (folder)? I would like to choose this file by name, like FileA or FileB, etc. I’m asking this because I have an asynchronous file scenario (BPM) with a receiver adapter that

  • Sound quality for recording concerts

    I love music and visit a lot of concerts. When I bought my E63 I noticed that while on my previous phone the sound got all distorted when I tried to record a loud live performance, it sounded pretty good on the E63, even if the concert got loud. Sinc

  • IPod touch unique issue

    I have an iPod touch that is disabled. iTunes won't recognize it (it doesn't give an error code, it says that the passcode must be typed in before it will recognize it) and obviously I can't type in the passcode when it's disabled. I've tried restori

  • Why has the textbooks category disappeared from the iBooks store?

    I just realized that it has disappeared. Why is that?