Drag and Drop Problems withina Window.

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Robert

Drag and Drop Problems withina Window.

Post by Robert » Tue Jul 29, 2003 3:20 pm

Hello,

I am using Macro Schedular (Evaluation Copy) to automate some functionality within an application.

I have two problems...

1. I have noticed that the Playback speed is not actually in real-time. Marco Schedular will run onto the next command if it see's it available, even if I added a pause in the Records session. Is the only way around this to insert a "Wait" command?


2. Also, I cannot drag and drop an item from a browse tree within a Window to another section of that Window (the macro code looks fine). Drag and Dropping works fine elsewhere. Any ideas/solutions to this problem.

Many thanks,

Robert.

Lumumba

Post by Lumumba » Tue Jul 29, 2003 3:53 pm

The main issue for us (if we should support you in any possible way) will be: No code!

Even a statement like: "the macro code looks fine", won't give us a clue what's different between yours and ours (which runs fine).

Share it!

Robert

Post by Robert » Wed Jul 30, 2003 9:48 am

My apologies, here is the code, for the drag and drop that is not working,

// C:\Program Files\MJT Net Ltd\Macro Scheduler\F on F.scp
// Recorded on Tuesday, July 29, 2003, at 02:13 PM

//Recorded Events
Let>WW_TIMEOUT=5
CapsOff
MouseMove>61,209
Wait>1.19
RClick
Wait>0.28
MouseMove>150,220
Wait>0.6
LClick
Wait>0.11
MouseMove>45,127
Wait>1.43
LDown
MouseMove>403,303
Wait>1.8
LUp
WaitWindowOpen>Form Links
MoveWindow>Form Links,434,189
ResizeWindow>Form Links,413,380
Wait>0.91
MouseMove>720,524
Wait>1.82

Many Thanks,

Robert.

Lumumba

Post by Lumumba » Wed Jul 30, 2003 11:04 am

As drag and drop is simply a "manual" move of data from a to b, what about using the standard command move (assumed there's a pattern what to move) ?

I expect it would be less critical in regard of timing, moving interference, focus...

If the folders content is dynamic or you need a pre sort (date, size, attrib.,...) to be able to identify a file before you move it, use dir

Code: Select all

Let>source=C:
Let>target=D:

Run Program>cmd /c dir /A:-D /O:D /B /L C:\*.txt > C:\CDirList.txt
ReadLn>C:\CDirList.txt,1,File
Run Program>cmd /c move %source%\%File% %target%\%File%
This should move the "earliest" file (date&time) from C: to D:

cmd=NT/XP/W2K
command=W9x/ME

To get the syntax of a DOS command, run this from "Start\Run"
e.g. the delete command: del

cmd /k del /?

Robert

Post by Robert » Thu Jul 31, 2003 9:00 am

Unfortunatly, it is not like moving a file from Windows explorer to another Folder, it is moving a Form (represented in a browse tree) within a window in an application to another part of that window in the application.

The drag and drop can only take place in that winow in that app.

In other macro app's it works fine.

Any other suggestions would be gretaly appreciated,

Thanks,

Robert.

Lumumba

Post by Lumumba » Fri Aug 01, 2003 6:05 am

My test environment:
Winword
Plain doc with inserted clipart at top left coordinate
Focus on the clipart ("framed")
View = page layout

Code: Select all

CapsOff

LDown
MouseMove>171,428
LUp
Worked fine! Clipart moved to target position 171,428.

To be honest, to assure that everything will work as MSched "expects" it, I've recorded that move and reviewed it afterwards.

Robert

Post by Robert » Tue Aug 05, 2003 10:49 am

Many Many Thanks for all the help.............................

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