Announcement

Collapse
No announcement yet.

ListBox: Company email directory help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ListBox: Company email directory help

    Hi there,

    I want to build into our company CD-ROM an E-mail Directory in the form of a ListBox. I derived from previous posts a great little peice of code that uses the user's default e-mail program to send mail. I've also found a great post by one of IndigoRose's admins that enables page-jumping from ListBoxes. Is there any way to combine the two together to form a ListBox that displays a list of e-mail addys, which once clicked on, sends an pre-subjected e-mail using the user's default e-mail program? Wow...that was a mouth-ful. Anyway, please let me know. I love the software BTW.


    The great e-mail code someone listed was:


    <IR_ACTIONS_LIST>
    <Action name="Does Key Exist">
    <Type>70</Type>
    <Function>0</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Variable>%mailto%</Variable>
    <MainKey>0</MainKey>
    <SubKey>PROTOCOLS\Handler\mailto</SubKey>
    </Action>
    <Action name="IF">
    <Type>200</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Condition> ! %mailto%</Condition>
    </Action>
    <Action name="Message Box">
    <Type>5</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <DialogTitle>Mail Error</DialogTitle>
    <DialogMessage>An e-mail application was not found on your system. Please call our support team at 1(800) 123-4567 ext. 123 with any questions you may have, or if your e-mail is available through a separate application, please send an e-mail to [email protected]. Thank you for your business!</DialogMessage>
    <Icon>1</Icon>
    <Variable>%Result%</Variable>
    <DialogType>0</DialogType>
    <DefaultButton>0</DefaultButton>
    </Action>
    <Action name="GOTO">
    <Type>209</Type>
    <Function>1</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Label>skip</Label>
    </Action>
    <Action name="ELSE">
    <Type>206</Type>
    <Function>1</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="Open">
    <Type>7</Type>
    <Function>0</Function>
    <DTIndentLevel>1</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <FileName>mailto:[email protected]?SUBJECT= Question from CD-ROM user</FileName>
    <Verb>open</Verb>
    <WorkingDir/>
    <RunMode>0</RunMode>
    </Action>
    <Action name="END IF">
    <Type>201</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    </Action>
    <Action name="LABEL">
    <Type>208</Type>
    <Function>1</Function>
    <DTIndentLevel>0</DTIndentLevel>
    <Enabled>1</Enabled>
    <ErrorHandling>
    <UserNotificationMode>2</UserNotificationMode>
    <CustomErrorMessage/>
    <OnErrorAction>0</OnErrorAction>
    <JumpToLabel/>
    </ErrorHandling>
    <Label>skip</Label>
    </Action>
    </IR_ACTIONS_LIST>


    Can anyone build on top of this to add the ListBox? Thanks in advance!


    Protocol
    "White-colla-AMS-gangsta."

  • #2
    Re: ListBox: Company email directory help

    Hi,

    What you should do is setup the entries in your list box so that the item's text is the e-mail address and the data is the "command" that you would like to file.

    So your items would be something like this:

    [email protected]::mailto:[email protected]?SUBJECT= Question from CD-ROM user

    Then when the user double-clicks on an item, get the item's data, store it in a variable and then use that variable in your File.Open action.

    Something like this:

    %SelectedIndex% = ListBoxObject[ListBox1].GetSelected
    %ItemData% = ListBoxObject[ListBox1].GetItemData (%SelectedIndex%)
    File.Open (open, "%ItemData%")





    MSI Factory The Next Generation Intelligent Setup Builder

    Comment


    • #3
      Re: ListBox: Company email directory help

      I think I put that script together. The other thing you can do is to change the "GOTO (skip)" action to a RETURN condition
      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

      Comment


      • #4
        Re: ListBox: Company email directory help

        Thanks guys!

        I really appreciate it. Mark, the code worked. Now I'm just going to try and merge it with Tig's code to make it more universal. Emphasis on "TRY." =) I'm basicly puting together a demo of what our company CD-ROM could look like if they allow me to purchase the software. At this point, they're already planning on it. I haven't seen such solid coding and flexibility in a prog since sound forge. I'm genuinely impressed. Keep up the great support. I'll be posting some templates I made in Photoshop including some cool mouse-overs pretty soon.


        Tig: you da man!





        Protocol

        "White-colla-AMS-gangsta."

        Comment

        Working...
        X