Clipboard being disabled after WaitScreenText command on V11

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Clipboard being disabled after WaitScreenText command on V11

Post by gtdalsanto » Thu Dec 04, 2008 6:56 pm

I have just upgraded to version 11, and have tried to run one of my scripts that worked under v10.1.17, and have found that the clipboard command gets disabled after a WaitScreenText command gets issued. My problem has occurred with a web page, so I tried with another application such as notepad, and it does the same thing.

Below, I open notepad, write a couple of lines, issue a ctrl-a/ctrl-c, and copy the clipboard into a variable (result1). Then I delete the lines in the notepad window, enter 2 new lines of data, reset the clipboard with putclipboard command, and then issue the WaitScreenText, followed by the ctrl-a/ctrl-c sequence that worked previously. The value in the clipboard is not the 2 new lines, but the data I put in the clipboard.

Below is the code I used to duplicate this problem. Let me know if I am doing something wrong here. It seems that this problem came up with another command in the beta, and that you had duplicated it. Possibly this is the same issue.

Thanks.

'
' start notepad
'
RunProgram>notepad.exe
SetFocus>Untitled*
WindowAction>1,Untitled*
wait>1
' initialize clipboard
PutClipboard>00000
'write some characters/lines to notepad
Send>aabbccddee
Send>CRLF
Send>ffgghhii
send>CRLF
' click on open space
wait>1
MouseMove>804,563
wait>0.1
lclick
'
' select all/ctrl-c
'
Wait>.5
Press Ctrl
Wait>.5
Send>a
Wait>.5
Release Ctrl
Wait>.5
Press Ctrl
Wait>.5
Send>c
Wait>.5
Release Ctrl
Wait>.5
' save lines to clipboard

GetClipBoard>result1

' now do the same preceded by WaitScreenText

wait>1
MouseMove>804,563
wait>0.1
lclick

' delete all lines in notepad doc
Wait>.5
Press Ctrl
Wait>.5
Send>a
Wait>.5
Release Ctrl
Wait>.5

Press DEL
wait>1

' write 2 new lines
Send>12345
Send>CRLF
Send>67890
send>CRLF

' initialize clipboard to something expected
PutClipboard>111111


wait>1
MouseMove>804,563
wait>0.1
lclick

' issue waitscreentext looking for number we just wrote
waitScreenText>234

' now perform a select all/ctrl-c and copy to clipboard our text
Wait>.5
Press Ctrl
Wait>.5
Send>a
Wait>.5
Release Ctrl
Wait>.5
Press Ctrl
Wait>.5
Send>c
Wait>.5
Release Ctrl
Wait>.5
GetClipBoard>result2
Wait>.5
MouseMove>100,597
Wait>0.2
LClick
Wait>0.1
' result2 does not contain the two lines writen
**BREAKPOINT**
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Dec 08, 2008 2:15 pm

Yes, same issue. We're aware of this issue and the developers of the text capture library are working on it.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

gtdalsanto
Pro Scripter
Posts: 51
Joined: Tue Oct 03, 2006 4:22 pm
Location: Akron, Ohio
Contact:

Post by gtdalsanto » Mon Jan 12, 2009 3:54 pm

This problem has been corrected in version 11.1
Gary T. DalSanto
Inventive Software Designs, LLC
[email protected]

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