Results 1 to 11 of 11

Thread: [RESOLVED] How can i get rid of this anoying message ?

Threaded View

  1. #6

    Thread Starter
    PowerPoster
    Join Date
    Feb 2002
    Location
    Canada, Toronto
    Posts
    5,803

    Re: How can i get rid of this anoying message ?

    OK, This is the dialog window using Spy++:


    I used this test code to try to select the options, and close the window, but for some reason, it does not press the "Yes" button...
    VB Code:
    1. Private Sub Form_Load()
    2.     'StartEnumWindows
    3.     tmrCheckOutlook.Interval = 150
    4.     tmrCheckOutlook.Enabled = True
    5. End Sub
    6.  
    7. Private Sub tmrCheckOutlook_Timer()
    8.     Dim hWnd As Long, Count As Long
    9.    
    10.     hWnd = FindWindow("#32770", "Microsoft Outlook")
    11.    
    12.     If hWnd <> -1 And hWnd <> 0 Then
    13.         'StartEnumChildWindows hWnd
    14.        
    15.         BringWindowToTop hWnd
    16.         SetForegroundWindow hWnd
    17.        
    18.         Pause 150
    19.        
    20.         SendKeys "{TAB 2}", True
    21.         SendKeys " ", True
    22.         SendKeys "{TAB}", True
    23.         SendKeys "{DOWN 3}", True
    24.         SendKeys "{TAB}", True
    25.         SendKeys "{ENTER}", True   ' < ---- this does not work !!!
    26.         SendKeys " ", True        ' < ---- pressing the space key does not work either...
    27.        
    28.         Debug.Print "tmrCheckOutlook_Timer"
    29.         tmrCheckOutlook.Enabled = False
    30.     End If
    31. End Sub
    32.  
    33. Private Sub Pause(ByVal Delay As Long)
    34.     Dim EndTime As Long
    35.    
    36.     EndTime = GetTickCount + Delay
    37.     Do
    38.         Sleep 10
    39.         DoEvents
    40.     Loop Until GetTickCount >= EndTime
    41. End Sub
    Attached Images Attached Images   

Posting Permissions

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



Click Here to Expand Forum to Full Width