Jump to content

How to get a file x,y position to drag and drop in another window


MAS
 Share

Recommended Posts

Hello Great AutoIt Members

 

I want to drag and drop a file from 1st window to a 2nd window of an application.

I use the MouseClickDrag() function, and it's working good if I specified the X,Y coordinates manually of the file to be dragged and dropped

my problem now is how I can get the file position (X,Y coords) in the screen automatically?

I've tried this code by browsing the file location in an IE browser object (since the GUI window will be empty other than my file and it'll be easy to get file position relative to the GUI window) but it's not working in win8

#include <IE.au3>

$oIE = _IECreateEmbedded()

$exp_hwnd = GUICreate("", 200, 200, 0, 0)

GUICtrlCreateObj( $oIE, 0, 0 , 200, 200 )

GUISetState ()

_IENavigate($oIE, @DesktopDir, 0)

sleep(1000)

MouseClickDrag( "left", 50, 50, 300, 300)

I hope anyone has any other solution to this simple problem.

thanks for any help

Edited by MAS
Link to comment
Share on other sites

If you get a solution to this, are you then going to say that this is not the real application so how to do it in some other application?

People are reluctant to waste time on something that seems odd, for example why navigate an IE browser to a local folder?

Why drag and drop a file?

Can you say what real world purpose you have for these things?

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

If you get a solution to this, are you then going to say that this is not the real application so how to do it in some other application?

People are reluctant to waste time on something that seems odd, for example why navigate an IE browser to a local folder?

Why drag and drop a file?

Can you say what real world purpose you have for these things?

 

it's a solution already but dragging from GUI with IE object is not working in win8, so I asked if anyone has some ideas about it

navigate IE to local folder to make the file inside that folder only appears alone without any toolbars as in ordinary windows file explorer so it'd be easy to locate the position of the file relatively to the position of the GUI window

real world can drag and drop files into applications to auto upload them.

I got that IE solution from Manadar at this topic

Link to comment
Share on other sites

So is your problem only this...

MouseClickDrag does not work at all in windows 8?

 

yep 

MouseClickDrag doesn't work in win8 in case of dragging from IE window

Edited by MAS
Link to comment
Share on other sites

hmmm, "send mouse button down", "mouse move", "send mouse button up"?

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
Share on other sites

Sorry, can't help.

Oh! Wait! Format and install win 7. :shifty::idiot:

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to comment
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
 Share

×
×
  • Create New...