Jump to content
Macro Express Forums

Menu Won't Stay During Macro


terrypin

Recommended Posts

In my program MemoriesOnTV (MoTV), I can click a button called Menu and it pops up a list of 4 items. I can then activate one of them either by clicking it or using the Down Arrow key and pressing Enter. But in the equivalent ME macro, the menu just flashes up briefly and disappears - so any following commands fail. Added wide range of delays but no change. (The macro uses Mouse Moves and Left Clicks, as Controls do not work.)

 

Any suggestions please?

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

Thanks, appreciate your help. But I think maybe you've misunderstood. The button marked MENU is within the application, not ME. It simply pops up a list of actions. Here's a screenshot showing the button and its items after manually clicking it:

 

http://www.terrypin.dial.pipex.com/Images/...enuProblem1.jpg

 

As I said, in MoTV I can then click on one of the menu items, just as you can in countless other applications. But from within an ME macro, the menu just flashes up momentarily.

 

The ME command that should display the menu is Mouse Left Button Click. I've tried variations of code, with delays, waits, etc, but here's a typical example:

 

Mouse Move Screen 815, 466

Mouse Left Button Click

Text Type: <ARROW DOWN><ENTER>

 

The move to the button works OK, and the first left click, but the menu is not displayed long enough for anything else to be performed. Using another mouse move and left click instead of the 2 keystrokes gives same result.

 

I've since tried another macro program I've used for many years, called Stiletto (now obsolete, replaced by PowerPro), and that displays and holds the menu fine.

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

My first thought would be to do this:

Mouse Move Screen 815, 466
Mouse Left Button Click
Delay 0.5 Seconds
Text Type: <ARROW DOWN>
Delay 0.1 Seconds
Text Type: <ENTER>

However, you indicated that you have tried inserting delays without success.

 

When I have a hard time getting a macro to work with a particular application I throw in some extra long delays and I use a collection of sound files to help me know which macro command is running. Then when I get the macro to run (albeit slowly) I gradually reduce the amount of delay. Once I have optimized the delays, I remove or disable the sound commands.

 

You may try something like this:

Variable Set Decimal %D1% to 2.0

Sound Wave File: 1F3.wav
Mouse Move Screen 815, 466
Delay %D1% Seconds

Sound Wave File: 2F3.wav
Mouse Left Button Click
Delay %D1% Seconds

Sound Wave File: 3F3.wav
Text Type: <ARROW DOWN>
Delay %D1% Seconds

Sound Wave File: 4F3.wav
Text Type: <ARROW DOWN>
Delay %D1% Seconds

Sound Wave File: 5F3.wav
Text Type: <ENTER>

This will run slowly with 2 seconds between each step. But, if it works, you will know that you can write a macro that will work.

Link to comment
Share on other sites

Thanks. I tried delays like those in your first suggestion, and some longer ones, before posting originally. But I like your neat approach using a variable, so I'll have a crack at that.

 

I've hit an unrelated obstacle! I start ME as usual, then click its icon in my XP Home system tray to bring up the editor - but I'm repeatedly getting this error message window

macedit.exe - No Disk

There is no disk in the drive. Please insert a disk into drive H:

 

Never seen that before, and have no idea why ME should want me to have a DVD or CD disk in that drive! After many uses of 'Cancel' it disappears, only to pop-up again immediately, whatever my next step.

 

I'll do some general house-keeping, reboot, and try again. Any idea why it occurs please?

 

BTW, when I have ME working properly again, is there a clever way to paste your code directly into a new macro please?

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

I rebooted and was pleased to find that side issue has disappeared. (Still curious about it though.)

 

Unfortunately, even with D1 set to 5 or 10 seconds, the macro still fails. Using F8 to step through, the left click still produces only a very brief appearance of the menu.

 

BTW, typically what content do you use for your WAV files, and how long are they? I used one arbitrary file for each command, about 2 seconds long.

 

Any more ideas please?

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

The error message indicates that Windows could not access drive H:. Is your macro file on drive H:?

 

I would not expect the macro to work if you use the macro debugger to step through it. In fact, I would be surprised if it worked by launching the macro from the Macro Express Explorer. Are you launching it via a hotkey or some other activation?

 

Generally a macro will do anything you can do manually. You just need to make sure that your macro is actually doing what you would normally type or click.

 

The sound files that I use say 'one', 'two', 'three', etc. Unless you enable the 'Wait for wave file to finish' option in the Sound Wave File the length of the wav file does not matter. I only use them to know where the macro is without doing anything to interupt the keystrokes and mouse clicks.

Link to comment
Share on other sites

No, as I said, drive H: is a CD/DVD drive. Macros are same place they always were, on C: That's why I was surprised...

 

Why would you not expect Stepping or Run from Macro Explorer to work? Are there some restrictions/pitfalls associated with these?

 

I've also tried hotkey activation, but that fails at same point too.

 

--

Terry, West Sussex, UK

Link to comment
Share on other sites

No, as I said, drive H: is a CD/DVD drive. Macros are same place they always were, on C: That's why I was surprised...
I am puzzled too.
Why would you not expect Stepping or Run from Macro Explorer to work? Are there some restrictions/pitfalls associated with these?
Because of the way windows context menus work. Any action, like moving the mouse, clicking the mouse, typing certain keystrokes, or another window gaining focus all cause the context menu to disappear.
I've also tried hotkey activation, but that fails at same point too.
You should 'start over' and focus exclusively on getting the macro to run using a HotKey activation.
Link to comment
Share on other sites

Pleased to report that I have finally succeeded in getting this working. ;)

 

I did as you suggested, and focused on hotkey activation. Several key combinations failed. I think they must be in conflict with one of my many other programs. But with Win+Alt+r (for example), the macro works a treat.

 

The main thing I've learned from this exercise is not to rely on Run Now or Step Through (F8), which I had been doing.

 

Thanks for the help.

 

--

Terry, West Sussex, UK

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