Seabass Posted January 28, 2008 Report Share Posted January 28, 2008 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 ...! Quote Link to comment Share on other sites More sharing options...
kevin Posted January 28, 2008 Report Share Posted January 28, 2008 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. Quote Link to comment Share on other sites More sharing options...
Seabass Posted January 28, 2008 Author Report Share Posted January 28, 2008 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.... Quote Link to comment Share on other sites More sharing options...
kevin Posted January 29, 2008 Report Share Posted January 29, 2008 From the Macro Express help: FocusedThis 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. Quote Link to comment Share on other sites More sharing options...
Seabass Posted January 30, 2008 Author Report Share Posted January 30, 2008 allright, so here is my challenge.... (it is for me anyway ! ) 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 Quote Link to comment Share on other sites More sharing options...
kevin Posted January 30, 2008 Report Share Posted January 30, 2008 Macro Express cannot print the report. It can, however, automate another application to print the report. Look at this thread for more information: Launch program to print a file. Quote Link to comment Share on other sites More sharing options...
Cory Posted February 1, 2008 Report Share Posted February 1, 2008 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.