Loading ...
Sorry, an error occurred while loading the content.

Initial Success (Finally :)

Expand Messages
  • huazhi_ca
    Using PushButton.pl as my guide, I did the following. If anybody has Outlook, configure it to use profiles, and try this. :-) The path I chose, requires
    Message 1 of 1 , Mar 14, 2002
    • 0 Attachment
      Using PushButton.pl as my guide, I did the following. If anybody has Outlook, configure it to use profiles, and try this. :-)

      The path I chose, requires Exchange server and available exchange mailbox matching the profile name in the Exchange server.

      Note, that this portion of Outlook is not accessible by OLE Automation and Outlook Object Model, hence GUI test saves the day...

      ############################################################################
      #### Launch Outlook and Wait
      ############################################################################
      system("start outlook.exe /recycle");
      sleep(3);
      ############################################################################
      #### Choose Profile Dialog
      ############################################################################
      my @windows = FindWindowLike(0, "Choose Profile", "#32770");
      SetForegroundWindow($windows[0]) if scalar @windows == 1;
      PushButton("Ne&w...");
      sleep(1);
      ############################################################################
      #### Microsoft Outlook Setup Wizard
      ############################################################################
      @windows = FindWindowLike(0, "Microsoft Outlook Setup Wizard", "#32770");
      SetForegroundWindow($windows[0]) if scalar @windows == 1;

      ## Select Exchange Server
      SendKeys("{SPACE}");
      PushButton("Next >");

      my $user = "YOUR_USER_GOES_HERE";
      my $mailserver = "some.mail.server.com";

      ## Enter Profile Name
      SendKeys($user);
      PushButton("Next >");

      ## Enter Exchange Mail Server & Exchange Mailbox name
      SendKeys($mailserver);
      SendKeys("{TAB}");
      SendKeys($user);
      PushButton("Next >");

      ## Do you travel with computer? section
      PushButton("Next >");
      ## Done! section
      PushButton("Finish");
      sleep(1);

      ############################################################################
      #### Choose Profile Dialog
      ############################################################################
      @windows = FindWindowLike(0, "Choose Profile", "#32770");
      SetForegroundWindow($windows[0]) if scalar @windows == 1;
      PushButton("OK");
      sleep(1);
      ############################################################################
      #### Check Name Dialog
      ############################################################################

      @windows = FindWindowLike(0, "Check Name", "#32770");
      SetForegroundWindow($windows[0]) if scalar @windows == 1;
      PushButton("OK");

      #Voila
    Your message has been successfully submitted and would be delivered to recipients shortly.