How can I add random mail signatures from a text file?

I'm trying to add a different quote to every email that I write... is there a program or way for Mail to pluck and append a quote at random from a external file of quotes?  (I'm not talking about the standard "Random" feature built into Mail.)
There must be one out there, but I can't find it.  I'm using Snow Leopard and Mail 4.5

Hello,
Here is a running start on getting specific lines in the case lines starting with ComboBox. I took your data and placed it into a text file named TextFile1.txt in the bin\debug folder. Code below was done in
a console app.
using System;
using System.IO;
using System.Linq;
namespace ConsoleApplication1
internal class Program
private static void Main(string[] args)
var result =
from T in File.ReadAllLines(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TextFile1.txt"))
.Select((line, index) => new { Line = line, Index = index })
.Where((s) => s.Line.StartsWith("ComboBox"))
select T
).ToList();
if (result.Count > 0)
foreach (var item in result)
Console.WriteLine("Line: {0} Data: {1}", item.Index, item.Line);
Console.ReadLine();
Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

Similar Messages

  • How can I read a specific character from a text file?

    Hi All!
    I would like to read a specific character from a text file, e.g. the 2012th character in a text file with 7034 characters.
    How can I do this?
    Thanks
    Johannes

    just use the skip(long) method of the input stream that reads the text file and skip over the desired number of bytes

  • How can i read all the lines from a text file in specific places and use the data ?

    string[] lines = File.ReadAllLines(@"c:\wmiclasses\wmiclasses1.txt");
    for (int i = 0; i < lines.Length; i++)
    if (lines[i].StartsWith("ComboBox"))
    And this is how the text file content look like:
    ComboBox Name cmbxOption
    Classes Win32_1394Controller
    Classes Win32_1394ControllerDevice
    ComboBox Name cmbxStorage
    Classes Win32_LogicalFileSecuritySetting
    Classes Win32_TapeDrive
    What i need to do is some things:
    1. Each time the line start with ComboBox then to get only the ComboBox name from the line for example cmbxOption.
       Since i have already this ComboBoxes in my form1 designer i need to identify where the cmbxOption start and end and when the next ComboBox start cmbxStorage.
    2. To get all the lines of the current ComboBox for example this lines belong to cmbxOption:
    Classes Win32_1394Controller
    Classes Win32_1394ControllerDevice
    3. To create from each line a Key and Value for example from the line:
    Classes Win32_1394Controller
    Then the key will be Win32_1394Controller and the value will be only 1394Controller
    Then the second line key Win32_1394ControllerDevice and value only 1394ControllerDevice
    4. To add to the correct belonging ComboBox only the value 1394Controller.
    5. To make that when i select in the ComboBox for example in cmbxOption the item 1394Controller it will act like i selected Win32_1394Controller.
    For example in this event:
    private void cmbxOption_SelectedIndexChanged(object sender, EventArgs e)
    InsertInfo(cmbxOption.SelectedItem.ToString(), ref lstDisplayHardware, chkHardware.Checked);
    In need that the SelectedItem will be Win32_1394Controller but the user will see in the cmbxOption only 1394Controller without the Win32_
    This is the start of the method InsertInfo
    private void InsertInfo(string Key, ref ListView lst, bool DontInsertNull)
    That's why i need that the Key will be Win32_1394Controller but i want that the user will see in the ComboBox only 1394Controller without the Win32_

    Hello,
    Here is a running start on getting specific lines in the case lines starting with ComboBox. I took your data and placed it into a text file named TextFile1.txt in the bin\debug folder. Code below was done in
    a console app.
    using System;
    using System.IO;
    using System.Linq;
    namespace ConsoleApplication1
    internal class Program
    private static void Main(string[] args)
    var result =
    from T in File.ReadAllLines(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "TextFile1.txt"))
    .Select((line, index) => new { Line = line, Index = index })
    .Where((s) => s.Line.StartsWith("ComboBox"))
    select T
    ).ToList();
    if (result.Count > 0)
    foreach (var item in result)
    Console.WriteLine("Line: {0} Data: {1}", item.Index, item.Line);
    Console.ReadLine();
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my webpage under my profile but do not reply to forum questions.

  • How can I create a Document object from a text file (myFile.txt)

    Hi everybody:
    Thank you for reading this message.
    I am trying to find a method to convert a text file ( I have it in a File object) to a Document object.
    I read the Java API but it is strange, I do not know if I have to create an AbstractDocument, it is really strange for me.
    Any comment is welcome,
    Regards,
    JB

    Document is an interface, and AbstractDocument is abstract, so you
    can't create either of those directly. Assuming you are dealing with a
    a plain text file, you could do something like
    // Not catching any exceptions that get thrown
    File file = /* file you already have */
    String eol = System.getProperty( "line.separator" );
    int eolLen = eol.length();
    FileReader reader = new FileReader( file );
    BufferedReader buffer = new BufferedReader( reader );
    PlainDocument doc = new PlainDocument();
    for ( String line = buffer.readLine() ; line != null ; line = buffer.readLine() ) {
        int len = doc.getLength();
        if ( len > 0 ) {
            doc.insertString( len, eol, null );
            len += eolLen;
        doc.insertString( len, line, null );
    }and now you have a document.
    : jay

  • Can i add a contact directly from my text messages, Can i add a contact directly from my text messages

    How can i add a contact directly from a text message i recieve

    Yes, open the conversation, scroll to the top and tap "Add Contact", then "Create New Contact".

  • TS2776 How can I transfer e-mail contacts from one IPad to another?

    How can I transfer e-mail contacts from one IPad to another?

    Depends on how big the file is.  If itis only a couple of pages, or mostly text, the easiest way would be to e mail it.  If it is a very large file you are going to need wifi.  Take both pads to starbucks, and e mail it from there.  Or if you have wifi, use drop box, for example. 
    Your other choice, avoiding wifi would be a bluetooth type transfer.  There is an app call bluetooth file lite that reads like it will do what you need.   The good news is it is free.  The bad news is that it has terrible ratings.  For grins, i am installing it now on a pad and a phone, and will see if it works.
    With a bluetooth method, you need both devices in  the same place.  If you are trying to send your file across country, bluetooth will not work for you.  you need e mail or drop box type solution, and if the file is big, you will almost certainly need wifi.

  • How can I add multiple email addresses  from spreadsheet into email?

    how can I add multiple email addresses  from spreadsheet into email?

    I have tried that, but the system reads the emails as one long email and I can't find any way of separating them - it ignores spaces, colons and I have also tried putting them through a word doc... still does not work. It works perfectly easily on a PC system!! ( I have just moved to a mac!)
    any ideas would be good
    thanks

  • TS3992 on iPad: How can I delete my Mail storage from my iCloud backup?

    on iPad: How can I delete my Mail storage from my iCloud backup?

    Did anyone ever provide a resolution, because I am having the same problem.
    My iCloud backup said yesterday that over 500 MB was being used by the Mail portion of the backup. So I went into iCloud.com, deleted all of the mail in my Sent Mail folder, then emptied the trash entirely. When I did that, it got worse; it said that 1.2 GB of the iCloud backup was taken up by the Mail backup. That doesn't make any sense. That is actually the opposite of what was supposed to happen.
    Today, it is back to saying that Mail takes up 609.4 MB of space in the backup, but there is next-to-nothing in any of my iCloud email folders. What is going on?
    Any suggestions you could provide would be greatly appreciated.

  • HT4759 How can I add or delete iphones from my icloud account?

    How can I add or delete iphones from my icloud account?

    Hi Inspiration69,
    I apologize, I'm a bit unclear on your question. If you are asking how to set up your iCloud account on your iPhone, you may find the following page helpful:
    Apple - iCloud - Setup
    https://www.apple.com/icloud/setup/ios.html
    Regards,
    - Brenden

  • How can I add an electronic signature line

    How can I add an electronic signature line to a form in Adobe's FormCentral?

    Start by asking in FormsCentral
    The Cloud forum is not about using individual programs
    The Cloud forum is about the Cloud as a delivery & install process
    If you will start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • HT5312 I've forgot security question and answer, how can I add rescue mail address and how can I reset my security question and answer?

    I've forgot security question and answer, how can I add rescue mail address and how can I reset my security question and answer?

    You need to ask Apple to reset your security questions; ways of contacting them include phoning AppleCare and asking for the Account Security team, clicking here and picking a method for your country, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (105466)

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How can i remove the phone number from the text messages that i receive in the notification center

    how can i remove the phone number from the text messages that i receive in the notification center?

    You choose whether to see text messages in Notification Center or not.  If you elect to see them, they will display the phone number (unless they are from a contact in your contacts list).
    You can choose not to see them at Settings > Notification Center > Messages.

  • How to Add points on graph from a text File ?

    Hello and Good Morning to all,
    I have a text file with my data and i read them by using the Read From Spreadsheet File VI,i enter the path where my file is saved,read all rows delete the first row because i don't need it and my problem is that in the text folder i have specified date and time which i want to be my X axis in my Graph and Y axis to be the Vout that means i have to use a XY Graph ,below you can see my data:
    Date        time              Vout  
    3-9-2012 7:45:37            2,35
    3-9-2012 7:45:39            2,75
    3-9-2012 7:45:41            3,15
    3-9-2012 7:45:43            3,50
    1) Is the text file format compatible with the input of the graph command?
    I do not find a LabVIEW function which convert the “date” from the text file (example:3/09/2012 07:45:37) into a compatible format for X axis for the graph.
    (Conversion from string format => into a “date and time” format)
    Can someone please provide a code solution for this problem?

    Hi gstathatos,
                             See all the threads given below:-
                             http://forums.ni.com/t5/LabVIEW/Add-points-on-XY-graph-with-time-step-not-constant/td-p/1507066
                             http://forums.ni.com/t5/LabVIEW/Add-points-on-graph-from-a-text-File-Date-and-time-include-in/td-p/1...
                             http://forums.ni.com/t5/LabVIEW/read-double-waveform-text-file-and-and-plot-graph-in-labview/td-p/10...
    Thanks as kudos only

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

Maybe you are looking for

  • InDesign CS6 8.0.2.414 crash in Initialisierung wird abgeschlossen

    InDesign CS6 8.0.2.414 stürzt im Startvorgang bei "Initialisierung wird abgeschlossen"  ! Dann kommt die Info: "Adobe InDesign CS6 kann nicht gestartet werden. Wir informieren Sie, wenn eine Lösung gefunden wurde. Dies passiert im Hauptbenutzerkonto

  • Lync login issue with one domain but started working when domain is changed.

    we have two domains in lync 2013 infra.i have enabled user id with one domain but its not allowing user to login.If we change user id to other domain it start working. it seems user id already existed somewhere in lync or active directory database. c

  • Playing back a ProRes clip

    Hi guys, When I tried to open a ProRes clip last night in QuickTime, all I got was a black screen, plus audio. This happened a few weeks ago and I found an article telling me to reinstall QT, which I did, and it solved the problem. However, when I tr

  • IPhone's USB Adapter Exchange Program

    I recently requested an exchange of my USB power adapter that came with my iPhone. The new adapter arrived and came with a shipping box to return the defective adapter, but without pre-paid postage. I don't feel that I should have to pay the postage

  • How to have a generic typed column in a database table

    Hi, I have to create a table with one column which should be able to hold values of any data type. At runtime I will get values from different fields of different tables.  Any idea how to achieve thi as there is no generic data type available with AB