Jump to content
Sign in to follow this  
minbare

Beginner help neeeded. advanced drag and drop script

Recommended Posts

minbare

Let me begin by saying that I have no experiance with any script writeing what so ever. I have spent some hours the last 3 days trying to understand how autoIT works. I've read through the various tutorials on these forums and I think I have a resonable understanding of those. Moveing from those tutorials to writeing a fairly advanced (imo at least :P) script however, has proven to be somewhat of a headache for me. I know what I want the script to do, however I am lost as to how to translate it to a script. Below is a short write-up of what I want to do. If anyone could point me to some advanced tutorials or can tell me what commands I should be looking at, it would be very much appreciated. Even existing similar scripts with some well writen descriptions would be of great help to me.

Thanks

This is what I want the script to do:

The script should execute each time I click the right mouse button. It should do the following upon execution:

- record the on screen co-ordinates where the right click was executed

- left click the mouse to drag and drop and item from the original co-ordinates to a fixed co-ordinate in the lower left corner of the window

- return the mouse pointer to the original co-ordinates prior to the right click

- preferably the drag, drop and return should happen fast

Share this post


Link to post
Share on other sites
minbare

No. It's to make my work easier. I'm looking through tons of digital pictures each week and only very few are usefull. The others are dumped into a 'junk' folder.

Edited by minbare

Share this post


Link to post
Share on other sites
rmp459

could also be used to loot items in darkfall :P

Share this post


Link to post
Share on other sites
minbare

I guess so, even though I don't know darkfall. I simply need something to make my arm not fall off at the end of the week.

Share this post


Link to post
Share on other sites
Melba23

minbare,

Try this as a starter - look in the Help file for more details on each of the functions:

- record the on screen co-ordinates where the right click was executed - IsPressed & GUIGetCursorInfo

- left click the mouse to drag and drop and item from the original co-ordinates to a fixed co-ordinate in the lower left corner of the window - MouseClickDrag

- return the mouse pointer to the original co-ordinates prior to the right click - MouseMove back to where you started

- preferably the drag, drop and return should happen fast - Speed can be set in the code

If you run into problems, come back and show what code you have produced and we can help you sort it out.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
AdmiralAlkex

I would do it like this, much easier.

Opt("MouseClickDragDelay", 0)

Global $nTargetWidth = 123, $nTargetHeight = 123

HotKeySet("!z", "mousedragging")

While 1
    Sleep(250)
WEnd

Func mousedragging()
    $aPos = MouseGetPos()
    MouseClickDrag("primary", $aPos[0], $aPos[1], $nTargetWidth, $nTargetHeight, 0)
    MouseMove($aPos[0], $aPos[1], 0)
EndFunc

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.