Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 21
  1. #1
    Join Date
    Apr 2005
    Location
    Bloemfontein, South Africa
    Posts
    9

    Huh? Please help with e-mail and print

    Hallo all. I am very new to AMS and have now knowledge any code, C++, asp ect.

    What I want to do is create a digital invitation on CD, like a wedding invitation.

    I got everything working fine except the RSVP page. On this I have:
    Input Object - Name
    Input Object - Partner_1
    Input Object - Contact_Number
    Input Object - email
    ListBox Object - Attend ...with the option Yes or No
    ListBox Object - Partner_2 ...with the option Yes or No

    What I was thinking of doing, is a e-mail button to e-mail the information on the page back to a specific e-mail address. Something like:

    File.OpenEmail("user@yourdomain.com?&Subject=Your subject here&Body=Whatever you want as your email body here", SW_SHOWNORMAL);

    Is there a way to get the information on the page into the body of the email.

    Maybe with the Input.GetText and ListBox.GetSelected actions?

    I also have a print button on this page so that the user can print the page/information to mail by normal mail services.

    Your help will be much appreciated and thx for a great forum!!

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    altpros, welcome to the forums. There are several ways to accomplish what you are trying to do. It sounds like you are off to a great start as well. If you search the forums you will find examples from how to use the File.OpenEmail to constructing a mailto link to using a php script on a server to send e-mails and even a custom dll made by Worm.

    My suggestion to you is to use the actions you already mentioned. Input.GetText, which returns a string, and ListBox.GetSelected (returns a table) along with ListBox.GetItemText (returns a string with the displayed text). and capture all of your data to variables. Then when you build your body you can concatenate (..) the items together in the File.OpenEmail action or in an action before. Here is an example

    Code:
    --obtain input object text
    strName = Input.GetText("I-Name");
    strPartner = Input.GetText("I-Partner");
    strContact = Input.GetText("I-Contact");
    strEmail = Input.GetText("I-Email");
    --Get attendance option
    tbSelected = ListBox.GetSelected("ListBox1");
    if tbSelected ~= nil then
         strAttendance = ListBox.GetItemText("ListBox1", tbSelected[1]);
    else
         Dialog.Message("Error", "Please select your attendance option");
         return;
    end
    --Get partner option
    tbSelected = ListBox.GetSelected("ListBox2");
    if tbSelected ~= nil then
         strPartner2 = ListBox.GetItemText("ListBox2", tbSelected[1]);
    else
         Dialog.Message("Error", "Select your partner, dosy doe.");
         return;
    end
    --Construct Body of your e-mail
    strBody =  strName .. " has selected their attendance as "..strAttendance..".  Their contact information is "..strContact.." and their e-mail is "..strEmail..".  Partner attendance is "..strPartner2.." and the partners name is "..strPartner
    
    File.OpenEmail("lorne@indigorose.com?subject="..strName.."%20has%20responded%20with%20a%20"..strAttendance.."&Body="..strBody, SW_SHOWNORMAL);
    If you google for mailto you will find a lot of pages on how to construct the mailto information above. There is a lot that can be done to improve the code above, I would suggest error checking but hopefully this will get you started.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  3. #3
    Join Date
    Apr 2005
    Location
    Bloemfontein, South Africa
    Posts
    9
    Tigg

    Thank you for your quik response. I will try the code later today and let you know.

    Thx a lot!!!!

  4. #4
    Join Date
    Apr 2005
    Location
    Bloemfontein, South Africa
    Posts
    9
    Hi Tigg

    I have tried the code and that is exactly wahat I was looking for.

    Just one more thing.

    I have changed the code a bit. In my email body I get this:
    Whoever - Yes. Contact information - 0123456789. e-mail - whoever@whatever. Partner - Yes. Partners - Whoever

    Where in the code do I put "\r\n" to get:

    Whoever - Yes.
    Contact information - 0123456789
    e-mail - whoever@whatever.
    Partner - Yes
    Partners name - Whoever

    Thx Altpros

  5. #5
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    At the same place you have your periods(.) in your example 'email body'


    Seriously.



    .
    Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
    Visit Acme-Tek

  6. #6
    Join Date
    Apr 2005
    Location
    Bloemfontein, South Africa
    Posts
    9
    JimS

    Tanks for your response.

    If you look at my first post, you will see that I have stated that I don't know anything about all this code.:-(

    I had a look in the forums and the help file and tried with " .. () all that I can think of as well as before and after all this stuff. But get an error every time.

    This is my first project and I must admit that the code don't make any sense to me. Call me stupid if you want;-)

    OK let's try this. At the moment I have this:
    strBody = strName .. " - "..strAttendance..". Contact number - "..strContact.." e-mail - "..strEmail..". Partner - "..strPartner2.." Partners name - "..strPartner

    Would you please be so kind and give me an example as to where I must put in "\r\n"

  7. #7
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Try this:

    strBody = strName .. " - "..strAttendance.."./r/nContact number - "..strContact.." /r/ne-mail - "..strEmail..". /r/nPartner - "..strPartner2.." /r/nPartners name - "..strPartner

    as JimS noted, put the /r/n where ever you have a period and make sure it is within the quotation marks. I placed the /r/n before each item where you wanted a new line. Let me know how it works.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  8. #8
    Join Date
    Apr 2005
    Location
    Bloemfontein, South Africa
    Posts
    9
    Tigg

    Tried it and are getting this:
    Whoever - Yes. /r/nContact information - 0123456789. /r/ne-mail - whoever@whatever. /r/nPartner - Yes. /r/nPartners - Whoever

    I also tried \r\n where you have indicated, but that do not change anything?

    Thx for the help

  9. #9
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    silly me, I put the wrong slashes in there.

    strBody = strName .. " - "..strAttendance..".\r\nContact number - "..strContact.." \r\ne-mail - "..strEmail..". \r\nPartner - "..strPartner2.." \r\nPartners name - "..strPartner
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  10. #10
    Join Date
    Apr 2005
    Location
    Bloemfontein, South Africa
    Posts
    9
    Tigg

    Tried it, but still put it in one line.

    Another qeustion. What type/language is this code? Maybe I can enroll somewhere to learn this!

  11. #11
    Join Date
    Apr 2005
    Location
    Bloemfontein, South Africa
    Posts
    9
    Tigg

    See that it was your birthday on the 4th of April!!!

    Congratulation!!!!!!!!!!

    Hope you had a great day and that you have a great year!!

    (I am Afrikaans speaking. So please ignore spelling, tenses ...has, have, had ect.)

  12. #12
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Quote Originally Posted by altpros
    Tigg

    Tried it, but still put it in one line.

    Another qeustion. What type/language is this code? Maybe I can enroll somewhere to learn this!
    altpros,

    The language that is used is LUA. You can find additional information about LUA at www.lua.org.

    Thanks for the b-day wishes.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  13. #13
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    altpros, I would never think of calling you stupid. I did think that I could do more to help you if I gave you a hint, rather than just giving you the answer that you could cut and paste.

    I figure that a cut and paste answer would only help answer this question, but my hint might help you better understand concatenation, especially if it meant you had to try it a couple of different times before you got exactly what you wanted.

    There is a notion in my country, that it is better to help teach a man how to fish, rather than just giving him a fish.

    I meant you no disrespect.

    By the way, welcome to the forums.


    .
    Last edited by JimS; 04-11-2005 at 03:00 PM.
    Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
    Visit Acme-Tek

  14. #14
    Join Date
    Apr 2005
    Location
    Bloemfontein, South Africa
    Posts
    9
    JimS

    No offence taken.

    I did try a few options thow before asking. Tigg gave me an example but I still get everything in one line.

    Maybe you can give me another hint.

    Thanx for the help.

  15. #15
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    altpros, I’m shocked that it didn’t work, Tigger’s code is exactly what I expected to work, however I can confirm that it doesn’t in my version of Outlook.

    Try this:

    Code:
    strBody = strName .. " - "..strAttendance.."%0dContact number - "..strContact.."%0de-mail - "..strEmail.."%0dPartner - "..strPartner2.."%0dPartners name - "..strPartner
    I can’t guarantee that it will work with all email clients, but it works with Outlook 2002 SP3

    I think that that is one of the greatest things about trying to help someone, I usually end up learning something myself.

    Good luck.

    .
    Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
    Visit Acme-Tek

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts