I have the following text to highlight something in an IE window, copy it to the clipborad, and then paste it into a variable. When I "run" it, it never seems to put anything into the variable, but when I "debug" and perform the last line, it works fine. How come? I also put "wait>2" in a few places but I get the same result...
---
MouseMove>68,273
Ldown>
MouseMove>249,279
Lup>
Press CTRL
Send Character/Text>c
Release CTRL
GetClipBoard>capture1
Cannot cut & paste except in debug
Moderators: JRL, Dorian (MJT support)
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
Note: No testing done here, just some quick thoughts right now.
Are you sure the front end is really working when you single step? When you do it manually, have you emptied the clipboard first? You may be using a value from an earlier process.
Check to make sure you have no trailing space on any lines, especially those with a variable name or Label name on the end.
It may be that you should MouseMoveRel> instead. Positioning may not be accurate enough with MouseMove itself.
Try to use keystrokes vs. mouse. Try tabbing to specific location if possible to select text before doing CTRL-C.
Or even better for keystrokes, consider doing View Source, then Search to locate text, then use shift + arrows. CTRL-C, and close View Source window.





Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!
Are you sure the front end is really working when you single step? YES
When you do it manually, have you emptied the clipboard first? YES
You may be using a value from an earlier process. NO- I AM SEEDING THE CLIPBOARD WITH A DIFFERENT VALUE AND HENCE CAN TELL THAT I AM GETTING THE VALUE FROM THE FRONT-END.
Check to make sure you have no trailing space on any lines, especially those with a variable name or Label name on the end. YES I DID AND IT ALL APPEARS FINE.
It may be that you should MouseMoveRel> instead. Positioning may not be accurate enough with MouseMove itself. I AM MAXIMIZING THE PAGE AND THE MOUSE ACTION WORKS CORRECTLY AS I GET THE VALID TEXT WHEN I SINGLE STEP THE 'GET CLIPBOARD' LINE.
Try to use keystrokes vs. mouse. Try tabbing to specific location if possible to select text before doing CTRL-C. I CANNOT AS THIS IS NOT TABBABLE TEXT IN THE WEBPAGE.
Or even better for keystrokes, consider doing View Source, then Search to locate text, then use shift + arrows. CTRL-C, and close View Source window. I CANNOT AS IT IS NOT STANDARD KEYBOARD CHARACTERS. FOR EXAMPLE 951591 EXISTS IN THE SOURCE AS
951591
When you do it manually, have you emptied the clipboard first? YES
You may be using a value from an earlier process. NO- I AM SEEDING THE CLIPBOARD WITH A DIFFERENT VALUE AND HENCE CAN TELL THAT I AM GETTING THE VALUE FROM THE FRONT-END.
Check to make sure you have no trailing space on any lines, especially those with a variable name or Label name on the end. YES I DID AND IT ALL APPEARS FINE.
It may be that you should MouseMoveRel> instead. Positioning may not be accurate enough with MouseMove itself. I AM MAXIMIZING THE PAGE AND THE MOUSE ACTION WORKS CORRECTLY AS I GET THE VALID TEXT WHEN I SINGLE STEP THE 'GET CLIPBOARD' LINE.
Try to use keystrokes vs. mouse. Try tabbing to specific location if possible to select text before doing CTRL-C. I CANNOT AS THIS IS NOT TABBABLE TEXT IN THE WEBPAGE.
Or even better for keystrokes, consider doing View Source, then Search to locate text, then use shift + arrows. CTRL-C, and close View Source window. I CANNOT AS IT IS NOT STANDARD KEYBOARD CHARACTERS. FOR EXAMPLE 951591 EXISTS IN THE SOURCE AS
951591
- Bob Hansen
- Automation Wizard
- Posts: 2475
- Joined: Tue Sep 24, 2002 3:47 am
- Location: Salem, New Hampshire, US
- Contact:
The following code worked OK for me:
I modifed the mouse values to force an area of "copyable" text to be selected. After doing some single stepping, I added/removed WaitWindowOpen>, WaitReady>, and SetFocus>, some Wait> commands, and it worked. I have not been able to make the time yet to "do an autopsy" on the coding.
I used the Tools, View System Windows, Copy Caption as Text options to get the Widow Name. Name was very long, so I truncated it with "*".
Re:
Back to this script....now I just need to remove some lines and/or change the Wait> values until I break it again......
Initially, like you, it was not working for me.WaitWindowOpen>mjtnet.com :: View topic - Cannot cut & paste except in debug*
SetFocus>mjtnet.com :: View topic - Cannot cut & paste except in debug*
Wait>2
MouseMove>296,259
Wait>1
Ldown>
Wait>1
MouseMove>534,331
Lup>
Wait>1
Press CTRL
Wait>1
Send Character/Text>c
Wait>1
Release CTRL
Wait>1
GetClipBoard>capture1

I modifed the mouse values to force an area of "copyable" text to be selected. After doing some single stepping, I added/removed WaitWindowOpen>, WaitReady>, and SetFocus>, some Wait> commands, and it worked. I have not been able to make the time yet to "do an autopsy" on the coding.

Re:
I also used the ">" (because of Copy/Paste), but have noted this behavior in the past. It seems like Macro Scheduler sees ">" as a command delimiter at the end of many single word commands. BUG? If yes, it certainly isn't critical. I have also noted that you can omit the ">" and commands may still work. Try some Goto> commands without the ">"Any reason why you use the LDown/LUp command not as specified (with that additional char)?

Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!
Bob
A humble man and PROUD of it!