Jump to content
Sign in to follow this  

How to Drag a file from Win Explorer and drop it to another Window?

Recommended Posts

I need to drop a file to a specific area on an application's open window. It is not a MS program and use many non-ms control and icon based interaction.

Right now, I can open this application to full screen and can find the coords of the destination area for dropping the file but I have touble finding the coords for the source file.

Here is what I have done:

I use the following code to open a Win explorer:

Run( "explorer.exe C:\")

WinWaitActive("C:\", "", 5)

ControlSetText("C:\", "", "Edit1", $workingDirectory)

ControlSend("C:\", "", "Edit1", "{ENTER}")

and the following code to select the source file I want:

$fileIndex =ControlListView($workingDirectory, "", "SysListView321", "FindItem", $sourceFile)

ControlListView($workingDirectory, "", "SysListView321", "Select", $fileIndex)

ControlFocus ( $workingDirectory, "", "SysListView321" )

But now what do I do? how do I find the coords for the source file so I can drag it to the destination?

Thanks for any suggestions.

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...