Jump to content
Macro Express Forums

Wait Time help needed....


Seabass

Recommended Posts

I build a few macros and i am running into some issues where i wan tthe thing to wait until a program is loaded to type something.... I tried the wait for ... with couple options, but it seems that it just run the macros script without waiting therefore messing up my stuff..... Yup, i am a newbie to this !!! Any help or trick will be appreciated ...!

Link to comment
Share on other sites

Use the Wait for Window command. If that isn't enough you can use a Delay command. You may also want to check out the Window Control commands to see if you can wait for a Window Control on your application to become visible, focused and/or enabled.

 

What is the difference between, visible, focused or enabled ??? hope this is not a stupid questions....

Link to comment
Share on other sites

From the Macro Express help:

Focused

This If statement is based on whether the control has focus or not. This control may be a Window Title, a button, an edit box or some other part of the window.

 

Note: Not all controls are written so that they can receive focus. If this is the case for the control you are using, then you would be better off using the Visible or Enabled options. Otherwise the If Control Focused option will always come back false and the If Not Control Focused option will always test as true.

 

Visible

This If statement is based on whether the control is visible or not. The control does not need to have focus, it just needs to be visible. This control may be a Window Title, a button, a toolbar, an edit box or some other part of the window. A control on a window that is hidden or minimized may still be visible to this command.

 

Enabled

This If statement is based on whether the window with the control is the active window or not. In addition it checks whether the control is enabled or not - if the control is grayed out or not.

Link to comment
Share on other sites

allright, so here is my challenge.... (it is for me anyway ! :blink: )

 

We developed a MS Access database and we are now looking at publishing report in a pdf format overnight every day.

 

At this point, we have a switchboard witha button named "Publish Report". The macro, launch Access, wait for the windows and then text type "Enter" as the button has focus once the switchboard is loaded.

 

Is there a way for me to run the MS Access report and print directly from Macro Express instead ??? We are using a Scansoft to generate the pdf file using the Printing functions. This create the pdf report we want and store in folder where we overwrite previous report....

 

Thanks

Link to comment
Share on other sites

Seabass you might consider using VBScript instead to trigger the report from an external script. This way you can use the Windows Scheduler to create the reports. With the Windows Scheduler you might even be able to do it such that no user even need be logged in. Or, of course you could have Access run that VBA on startup and just make sure it only does it if it hasn't been run yet today.

 

But if you use ME to launch Access you might try using the Wait for Mouse Icon command or watch for pixel colors to know hen it's ready to print.

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...