Jump to content
Macro Express Forums

1 part of a 3 part macro doesn't display


boristhemoggy

Recommended Posts

After about 2 years of using the same Notepad file to pop a macro into, suddenly 1 line of the 3 lines of text in the macro do not paste. 
I open a brand new Notepad file, and it pastes perfectly. I use the old one and it won't paste the middle line. 
So, I open a brand new notepad file, copy and paste all of the stuff from the old one, then go to use the macro again and ...middle line missed out! It's so weird! Other macros paste fine.
I hope someone can come up with an explanation cos it's driving me nuts. 

Link to comment
Share on other sites

Sorry, I'm surprised you can't read what I'm saying but...
A macro can hold text, so that when you press a key that text is pasted into something that can display text, such as a notepad file. 
The text I am pasting is just text, literally, just words. The text comes from the text that is held in the macro. 
The macro file is made up of 

Clipboard start copy
"My Text"
Clipboard end copy
Clipboard paste
Text type <ENTER>
Clipboard start copy
"My Text 2"
Clipboard end copy
Clipboard paste
Text type <ENTER>
Clipboard start copy
"My Text 3"
Clipboard end copy
Clipboard paste
Text type <ENTER>

It is "My text 2" which is failing to paste, as in, the text held as "My text 1" and "my text 3" is pasting into the notepad file, however "My text 2" does not. Unless I open a new notepad file, and then it does. 
As I say I've been using this system with the same files for over 2 years with no problem.

Link to comment
Share on other sites

1 hour ago, boristhemoggy said:

Sorry, I'm surprised you can't read what I'm saying but...

I did not understand either until you explained further.

I have no idea why it used to work and does not now work. Perhaps it is caused by a Windows update or installing a new application. Have you rebooted your computer recently?

Here are some ideas to try:

1. Try increasing the Delay after clipboard commands found in Options, Preferences, Delays. By default this is 250. Try a very large value, perhaps 1500, to see if it helps and then reduce the value.

2. Add Delays:

Clipboard start copy
"My Text"
Clipboard end copy
Delay 1 Seconds
Clipboard paste
Text type <ENTER>
Clipboard start copy
"My Text 2"
Clipboard end copy
Delay 1 Seconds
Clipboard paste
Text type <ENTER>
Clipboard start copy
"My Text 3"
Clipboard end copy
Delay 1 Seconds
Clipboard paste
Text type <ENTER>

Again, use large delays to see if it helps and if it does help reduce the amount of delay.

3. I do not use the Clipboard start copy and Clipboard end copy commands. This is how I would write this sample macro:

Text Type: My Text
Text Type: <ENTER>
Text Type: My Text 2
Text Type: <ENTER>
Text Type: My Text 3
Text Type: <ENTER>

Inside the Text Type commands that include My Text click the box that says "Use Clipboard to Paste Text".

You may still need some small delays. I usually need to add delays after typing <ENTER>:

Text Type: My Text
Text Type: <ENTER>
Delay 0.1 Seconds
Text Type: My Text 2
Text Type: <ENTER>
Delay 0.1 Seconds
Text Type: My Text 3
Text Type: <ENTER>
Delay 0.1 Seconds

 

Link to comment
Share on other sites

Sam's suggestions are very good.  Text Type will likely be more reliable for you.  You may want to set keystroke timing at the beginning of your macro.  I generally include the following two default timing commands at the beginning of every macro:

Keystroke Speed: 30 Milliseconds
Mouse Speed: 30 Milliseconds

Clipboard commands are notoriously sensitive to timing.  I suspect that is because the Windows operating system is involved  If Windows is busy doing something else a clipboard command may take much longer than usual to complete.  The macro may work fine 95 times out of 100 but fail the other 5 times.  Paste, or Ctlr-v, can also be unpredictable in some applications, though Notepad should not be a problem.  However, I could not get your example macro to fail even though I have the Options for clipboard delay set to zero.   

Link to comment
Share on other sites

That was my first thought, to wonder if the Notepad file was very large.  I guess I should have asked that to begin with, though that would have done no good -- obviously you didn't want an answer like "Use a smaller file." :huh:

It seems very likely file size could be involved, though don't ask me why.:unsure:  Stick with Sam's solution, possibly with the addition of the Keystroke Speed command I suggested.

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