Jump to content
Macro Express Forums

Capture & Paste - Simple yet Imposable


Recommended Posts

Here I set with a smallclip that just defies the laws of gravity.

 

Window Activate: Document - WordPad

Wait for Window Title: Document - WordPad

Text Type (Simulate Keystrokes): <CONTROL>a<DELETE>

Mouse Left Click

Clipboard Paste

 

There is more to it but this is the basic clip. I have a capture that from a source I use all the time that will not work. The 3rd line should delete the text the 5th should do a past. It will not. But if I manually click in the wordpad window it will do the delete and past.I have tried every thing in the last couple of hours.

Link to comment
Share on other sites

The 3rd line does a select all

Now that the text is selected, you need to copy it the the clipboard with either:

<control>c or MacroExpress command Clipboard Copy

 

Window Activate: Document - WordPad

Wait for Window Title: Document - WordPad

Text Type (Simulate Keystrokes): <CONTROL>a<DELETE>

Mouse Left Click

Clipboard Paste

 

The 3rd line should delete the text the 5th should do a past. It will not. But if I manually click in the wordpad window

it will do the delete and past.I have tried every thing in the last couple of hours.

Link to comment
Share on other sites

Thanks for help.

I should have listed the macro, all. I do the capture just be for the code I had in the topic. Here is the macro as far aas I'm at.:

 

Window Activate: ProCD PhoneBooks

Wait for Window Title: ProCD PhoneBooks

Delay: 185 milliseconds

Text Type (Simulate Keystrokes): <ALTD>vmoc<ALTU>

Window Activate: Document - WordPad

Wait for Window Title: Document - WordPad

Text Type (Simulate Keystrokes): <CONTROL>a

Text Type (Simulate Keystrokes): <DELETE>

Mouse Left Click

Clipboard Paste

 

As you see I do the capture just above the code you saw. Problem is that the capture can only be made using the source program. The capture is there, that's not the problem. It stops at the point it should past in the WordPad window. I know it sees WordPad because the top bar turns from gray to bright blue, the affect when you active a window. Also when macro stops I then click in the window it places the text into the WordPad window. So it is stops just before placement.

 

I have tried delays of a sorts. I have even tried mouse move.

 

I have being using ME for years and It's is always at this point,timing, that I put it back on the self. But this time that's not an option since It would effect me business greatly. Know I'm at a point mind or matter. Yes it does matter unfortunately more than mind.

Link to comment
Share on other sites

I finally got it to work. No that's a lie. A little elf came in the middle of the night and fix my computer. I don't know what he changed, but I tried the same code last night many times over what no results. I might mention that the macro I created an hour prior to this problem was working great. And when I ran into these problems. I tested it to find it wasn't working now.

 

I know all and 80 can be temperamental. Or maybe it's me. Last night this same code through up on me and today it works fine. Please someone tell me,I'm begging, what can create this problem. It does appear that it is most likely coming from the computer itself. But I had turned everything off except for the program I restarted many times over.

Link to comment
Share on other sites

Use delays. You need to give the program a chance to finish some of the tasks.

Window Activate: Document - WordPad
Wait for Window Title: Document - WordPad
Text Type (Simulate Keystrokes): <CONTROL>a
Delay 0.1 seconds
Text Type (Simulate Keystrokes): <DELETE>
Delay 0.1 seconds
Mouse Left Click
Clipboard Paste

You either need to pay attention to well placed delays (example above) or slow down all keystrokes (example below). Programs (Wordpad) can accept straight typing ('abc123') very quickly. But some activities take longer such as Ctrl-a to highlight everything. To a human these things seem like they occur instantly but it may be hundreds or even thousands of times slower to process Ctrl-a compared to typing a keystroke.

 

Window Activate: Document - WordPad
Wait for Window Title: Document - WordPad
Keystroke Speed: 100 milliseconds
Text Type (Simulate Keystrokes): <CONTROL>a<DELETE>
Mouse Left Click
Clipboard Paste

You will need to adjust the Keystroke Speed according to your computer and applications.

 

Another option is to slow down all keystrokes by changing the 'Delay after keystrokes in the Text Type command' preference found in Options, Preferences, Playback. By default this is set to 300 microseconds. (Note that 300 microseconds is equivalent to 0.3 milliseconds, the unit of speed in the Keystroke Speed command).

 

To determine the optimum values for the Delays, Keystroke Speed or Delay after keystrokes requires some experimentation. Set the value(s) high, test the macro(s) and then lower the values.

Link to comment
Share on other sites

>>Set the value(s) high, test the macro(s) and then lower the values. <<

We do use delays but I suspect not effectively. My high would you say 350 ms. Also if I understand delay rightat the point of the command delay time is changed. But after the next command runs. It seems to me that timing is back to normal. If that is not true. Then I would need a way to bring it back to normal and I have attempted to test using delay set to zero. Am I right in my assumptions that delay is only a temporary command by command delay.

Link to comment
Share on other sites

  • 4 months later...

I'm sorry. I'm new to the forum and I'm reading the threads.

 

I saw this one and I think I see a problem and, though the thread is stale, I'd like to report what I'm seeing.

 

In the macro there's the line:

 

Mouse Left Click

 

But in the snippit the mouse isn't located on the field.

 

There's mention that if you click on the word doc the macro works. I'm thinking that in the other cases the mouse is, as far as this macro is concerned, randomly located.

 

-dana

Link to comment
Share on other sites

  • 1 month later...

Just adding on a bit to what Kevin said. You not only need to add delays between actions, but also between keystrokes. I think the <ALTD>vmoc<ALTU> part might be the problem here. As it is, it will just blast 4 keystrokes within a few ms. You might need to separate all the keystrokes, e.g.:

 

<ALTD>v<ALTU>

Delay 0.1 seconds

<ALTD>m<ALTU>

Delay 0.1 seconds

(...and so on...)

 

Or you can try the Keystroke Speed command as Kevin suggested.

 

>>Set the value(s) high, test the macro(s) and then lower the values. <<

We do use delays but I suspect not effectively. My high would you say 350 ms. Also if I understand delay rightat the point of the command delay time is changed. But after the next command runs. It seems to me that timing is back to normal. If that is not true. Then I would need a way to bring it back to normal and I have attempted to test using delay set to zero. Am I right in my assumptions that delay is only a temporary command by command delay.

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

×
×
  • Create New...