Copy past to notepad in Repeat block Not working

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Joelyboy0991
Junior Coder
Posts: 24
Joined: Thu Oct 11, 2018 1:19 pm

Copy past to notepad in Repeat block Not working

Post by Joelyboy0991 » Fri Apr 19, 2019 12:52 pm

Hey Guys.

i have a issue that i cannot fathom!

i have this block of code: (ghetto yes but it works)

//Input notepad block
Wait>0.200
MouseMove>-1470,460
Wait>0.200
Lclick
Wait>0.200
LDown
Wait>0.200
MouseMove>-1340,490
Wait>0.200
LUp
Wait>0.200
Press LCTRL
Wait>0.200
Send>c
Wait>0.200
Release LCTRL
Wait>0.200
KillProcess>Notepad.exe
Wait>1
Run>notepad.exe
WaitWindowOpen>Untitled - Notepad
MoveWindow>Untitled - Notepad,-1834,221
ResizeWindow>Untitled - Notepad,178,636
Wait>0.200
Press LCTRL
Wait>0.200
Send>v
Wait>0.200
Release LCTRL
Wait>0.500

i have a block of code in a Srt with specific mouse moves etc, then i have the same amount of code but in a repeat block For Offsets For the MouseMoves.

the code works perfectonce it enters into the repeat>X (everything works BUT! the Copy into Notepad,
Or it isn't copying anything to the clip.

i don't understand everything works in the Repeat>X apart from this section
it does highlight the text on screen, it does open notepad.exe > Notepad is the focus Window but there is nothing to Ctrl+v

i also stop the script and the manualy try Ctrl+v and still nothing

how could the exact same block of code work once and then not work once in a repeat>X

If Needed i can Make a Video of what i am encountering

Much help needed thank you all!

Joelyboy0991
Junior Coder
Posts: 24
Joined: Thu Oct 11, 2018 1:19 pm

Re: Copy past to notepad in Repeat block Not working

Post by Joelyboy0991 » Fri Apr 19, 2019 1:42 pm

Here is a Link For a better understanding to what i am encountering

https://www.youtube.com/watch?v=5CSJc1p ... e=youtu.be

I hope someone can help


I have also done further testing with a recorded macro and i still got the same results the copy is not initiated
but only when it is ran in a repeat or a repeat inside a Srt

Code of recorded macro is below:
//Input notepad block
Run>notepad.exe
WaitWindowOpen>Untitled - Notepad
MoveWindow>Untitled - Notepad,-1834,221
ResizeWindow>Untitled - Notepad,178,636

//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
MouseMove>-1483,458
Wait>0.200
LDown
Wait>0.141
MouseMove>-1341,495
Wait>0.302
LUp
Wait>0.594
Press LCTRL
Wait>0.22
Send>c
Wait>0.172
Release LCTRL
Wait>0.200
LClick
WaitWindowOpen>Untitled - Notepad
MoveWindow>Untitled - Notepad,-1834,221
ResizeWindow>Untitled - Notepad,178,636
Wait>0.203
MouseMove>-1782,334
Wait>0.200
LClick
Wait>0.200
Press LCTRL
Wait>0.266
Send>a
Wait>0.141
Release LCTRL
Wait>0.200
Press LCTRL
Wait>0.266
Send>v
Wait>0.141
Release LCTRL

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1348
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Copy past to notepad in Repeat block Not working

Post by Dorian (MJT support) » Mon Apr 22, 2019 10:04 am

Does adding SetFocus make any difference? So you'd have :

WaitWindowOpen>Untitled - Notepad
MoveWindow>Untitled - Notepad,-1834,221
ResizeWindow>Untitled - Notepad,178,636
SetFocus>Untitled - Notepad

Wait>0.200
Press LCTRL
Wait>0.200
Send>v
Wait>0.200
Release LCTRL
Wait>0.500
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts