pravin

I want to drag and Drop a element in my web application

18 posts in this topic

I want to drag and Drop a element in my web application using autoit. Basically i want to automate drag and drop functionality in my application using autoit.

Please help me in it 

Share this post


Link to post
Share on other sites



there is no possibility for drag and drop in autoit ? by using any mouse event or other options

Share this post


Link to post
Share on other sites

Sure there is, try things like MouseClickDragMouseDown, MouseMove and MouseUp.


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

can you help me with code for drag and drop please :)

Share this post


Link to post
Share on other sites
1 person likes this

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

thanks for the help

Share this post


Link to post
Share on other sites

No problem. See how far you get, it's pretty much a question of figuring out the coordinates to drag to/from and plug those into those commands. There's a few catches if you want to do it properly, such as making sure that your coordinates are correct even if you move windows or error checking to see if the windows are even there...

All in all, most people here would advise against using drag&drop mouse automation (or any sort of gui automation), as in use it as a last resort if you are certain that no other methods exist. It is finicky, it is hard to account for all gui contingencies, it could break if you accidentally use your mouse while the script is operating, etc. etc., all in all it's quite unreliable.

If you really want to interact with a website in a much more reliable and faster way, and have muuuuuuch more control, it may be worth it to check this out: https://www.autoitscript.com/autoit3/docs/libfunctions/IE Management.htm


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

I am new to this autoit let me try if any issues ..will post it

Share this post


Link to post
Share on other sites

can anybody help me with the step for use autoit for drag and drop or any tutorial video

Share this post


Link to post
Share on other sites

From the MouseClickDrag help file:

#include <AutoItConstants.au3>
; Left click drag from 0, 200 to 600, 700
MouseClickDrag($MOUSE_CLICK_LEFT, 0, 200, 600, 700)

If that's not enough, please describe your challenge.


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

thanks for the help will try and let u know

Share this post


Link to post
Share on other sites

the  mouse pointer is moving from source element to destination according to co-ordinate but element is not getting drag to destination ....

Share this post


Link to post
Share on other sites

You could try to put Opt("MouseClickDragDelay", 1000) on top of your script. (A second is usually much too long, but just for testing whether the problem is in the delay, and then dial it back.)

If that doesn't work, please show your code, and if possible a screenshot of your situation (block out any personal information!)


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

MouseClickDrag("left",60, 570, 800, 570,10) ....can put delay in between

Share this post


Link to post
Share on other sites

Try $MOUSE_CLICK_LEFT instead of "left", as shown in the helpfile (have you read it?).


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

i was using it but it didn't worked so used left in it

Share this post


Link to post
Share on other sites

More details. Moooore details.


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now