Jump to content
Macro Express Forums

Using Controls


patgenn123

Recommended Posts

I am interested in having macro Express click on a tab in a database using the control feature to focus in on that tab in the database. It seems to be not working.

 

Everytime this tab is clicked, I want the macro to do something. The "Get Control" feature is clicked in the activation window and the correct tab is named when the bullseye gathers the information.

 

However, when going to the tab and performing a little macro using notpad and text type saying "Hi. This is Pat", nothing pops up.

 

When I click the "Control On Top" radio button in the activation window of ME, it goes haywire and it doesn't care what tab I am at, it just keeps going and going when I click tab after tab, and it doesn't discriminate either. It doesn'f follow the rules to just focus on the specific tab I named in the bullseye to gather the control name.

 

Is there something wrong?

 

Pat

Link to comment
Share on other sites

I’m not exactly sure what you’re trying to do. Could you explain more?

 

It sounds to me like you want it to run a macro when you click on a tab. If this is the case this is not an activation handled by ME. If you are using MS Access I suggest you have an “On Click” event in VB run the macro. Otherwise there is no way to make ME fire a macro when you click on the tab.

 

If your activation was set to Control on Top then it would fire all the time as you described. Whether the tab is the active tab or not it is of course “On top” and will cause the macro to fire. I think you’re thinking that if the tab, if not the selected tab, is not “On top”. While this is true from your perspective as a user as long as it’s visible and the application is on top is how the ME evaluates it. You might have some luck changing the activation to Focus instead of On Top.

 

If your intention is to have a macro fire when that tab is selected in the DB you might see if you can fin a control in that tabbed area and set activation to it. If you click the tab all controls therein are immediately visible and that would work just the same for your purposes.

 

But again, I’m not exactly sure what your intent is. Often people come to me with problems getting something technical to work and their problem usually is that they’re going about it the wrong way. Generally I have to stop them and have them explain their intent and usually the problem is that they’re trying to get something to work in a way it was not designed and the solution is a different approach.

Link to comment
Share on other sites

Cory,

 

I have ACT! as the datatbase. With ACT! there are tabs that are at the bottom that you can click on. When the tab is clicked, there are those little hypen lines that surround the tab.

 

ACT! has addon companies that have additional products that you can buy. One of these is a program called "Clippie". What it does is put all fields in the clipboard.

 

With the fields in the layout design, there is a launch line that you can run a playable macro. With the clipboard "Clippie", it puts fields in the clipboard, and I want it to fire a macro when the dropdown field changes. When it changes, it puts the text of the field in the clipboard.

 

If there is a change, depending on what I have the macro do, it will possibly click on the tab to see the information in the tab.

 

That's it!

 

Thanks!

 

Pat

Link to comment
Share on other sites

OK, I think I undersand the general idea now. Still a little foggy on the details though.

 

I understand there is an plugin called Clippie that copies all the fields to the clipboard. How is it activated?

 

I understand that there is some sort of command line in Act. What would you use this for?

 

Why are you using a playable macro? Wouldn't you want the macro always waiting to activate when whatever trigger event happens? Sounds like a pain to have to type it in each time.

 

Personally I see people creating playable macros a lot and I think it's better to have all your macros in one file that's running all the time.

 

Now you mention a drop down field. This is different than the tab? It sounds like you're trying to monitor a drop down field for a change and if it changes you want to click on a tab and run clippie, is this correct? If it is your activation should be for that dropdown field, not the tab.

 

I'm sorry, I must be dense. The last version of Act I dealt with was the old DOS version so it's hard to visualize. Did I guess any of this right? Let me take one last stab. You want to monitor text in a dropdown box so that when it changes a macro fires, is that essentially correct? If it is I don't understand why you mention about running a playable macro from the command line.

Link to comment
Share on other sites

cORY,

 

Yes, this is exactly what I meant. Each field had the ability to launch an executable program. This means that since Macros can be playable, it can launch from any field provided there is something on the launch line to launch.

 

In combination with the "Clippie"(of which I can get a mouse to click on the icon in the menu bar to get the contact's info into a clipboard and then save it as a text file, then process text file using "if....", then fire the macro).

 

I want the tab to gain focus when info from the dropdown box is changed to cause the macro to do what it has to do. i want the tab to be focused and essentially clicked depending on if the text focuses the tab. I can have the tab focus or not focus depending on what the text says. I can have the macro fire or not fire depending on the text etc. etc. etc.

 

I just don't know how to focus the tab other than have the mouse click it. I know how to do that. I don't like mouse clicks because if the window is smaller than the whole screen, it doesn't click in the right place.

 

Pat

Link to comment
Share on other sites

Well you're in luck. There's a "Set Focus" control command. Just set focus to the tab control when the macro fires or what have you.

 

As far as firing I would think you woulnd't want to run the macro from a command line but rahter have it in your main marcr file tha'ts running all the time so that when the text in the drop down changes the macro would fire.

Link to comment
Share on other sites

Cory,

 

Here is what I have. It does not work and doesn't move the mouse.

 

<GETCONTROLP:01:ACT7.EXE:006:WindowsForms10.Window.8.app5ACT! 2005 for Windows - act2005in2007WindowsForms10.Window.8.app5WindowsForms10.Window.8.app5Contact DetailWindowsForms10.Window.8.app5WindowsForms10.SysTabControl32.app5Window

Forms10.Window.8.app5Application><CCLICK:F:01:0:T:>

 

The name of the tab is "Application" as evidenced by the Direct Editor. However it doesn't move the mouse to the tab. If you click the 'tab' button on the keyboard all the way through the fields, once it gets to the tabs, it doesn't recognize them and passes over them to start at the first field and recognizes that.

 

Is this a problem

 

Yes, I would like to know how it could fire with a dropdown field also. If I use "GET CONTROL" and move the bullseye to the field, it recognizes it, but where to go from there?

 

Pat

Link to comment
Share on other sites

Some direct answers:

1. When you tell ME to Mouse Click on Control it does not move the mouse. It simply executes a click on the control.

2. Why are you double clicking the control? Normally tabs are activated by a single left click.

3. You describe the tab key passing over the tab in the form. That’s OK, as long as it is apparent in the Get Control Utility and it can normally be clicked on it should be OK.

 

You say the tab is named “Application”. This is interesting. Is this where you launch your playable macro? If so I think you may be missing a general idea here about how ME is primarily intended to work. And it may be that you are making life difficult on yourself unnecessarily.

 

Normally a user will have one macro file that will contain hundreds of macros and ME will load on startup so that are always available. One never closes ME. ME’s macros are then activated by any of a number of means but most often it’s with a hotkey. Personally I like CTRL and CTRL+ALT in combination with the number pad so it doesn’t step on top of other application hotkeys.

 

In your application I envision that you need to get all your contact info onto the clipboard. In this case I would have the user move to the place with the desired information and fire the macro manually with CTRL+Keypad1. This macro would then directly launch you clipboard utility. See what I’m saying?

 

It seems to me you are trying to launch macros and the other utility from within Act. But if you’re using playable macros that are not already resident in memory the macros can not activate because ME and your playable macro is not running.

 

I’m just taking a stab at it here, maybe you are on the right track but some of your comments have left me scratching my head and if this is the case this would explain it. Let me know if I’m on or not here.

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