Jump to content
Macro Express Forums

Mouse click on control breaks text type


Recommended Posts

I'm evaluating Macro Express and noticed that when I use a Mouse Click on Control prior to a Text Type (simulating keystroke <F5>) in SQl Server Management Studio, it stops the Text Type from functioning. When I remove the Mouse Click on Control function the Text Type function works. Is there a reason for this?

Link to comment
Share on other sites

1 hour ago, Nathan said:

 

Do you have a delay programmed between the mouse click and the F5 key?  If the system is busy with whatever activity is engendered by the click-on-control, it may be ignoring the F5.  

As a test, try the Timing command "Delay 3 Seconds" after the mouse click.  I know, three seconds is excessive, but the point is just to test whether the problem is in Macro Express or in feeding the application a keystroke it is not ready to handle. 

Link to comment
Share on other sites

Or code the macro to "watch" for something to change on the screen, indicating that the click-on-control has completed.  For example, the code below will loop until a particular color is found at a screen location.  The conditional loop avoids always having to wait for the maximum time that MIGHT be required, before typing the F5 key.  This loop waits nominally 50 seconds before typing F5, but will go to F5 almost instantly if the screen change is detected. 

//  
// Wait for tab to turn green
Mouse Move Screen 350, 420
Repeat Start (Repeat 500 times)
  Get Pixel: Under Mouse into %N1%
  If Variable %N1% = 2314301
    Repeat Exit
  End If
  Delay 100 Milliseconds
Repeat End
//  
Text Type F5

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...