 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Phoenix007 Guest
|
Posted: Tue Mar 24, 2009 7:51 pm Post subject: MouseClickDrag with the push of a button? |
|
|
Hi all,i just started with autohotkey and i got a problem, i try to use "MouseClickDrag, L, x, x, 1638, 843"
What i want is, how do i keep the program open? When i execute the above file, it moves the file to 1638, 843 (y,x) and nothing else happends.
Say if i want to move more files and "drag" it to "Trash bin",(or whatever it is in english)Trash bin is located at 1638,843. Is there some way to launch the program and then it doesnt do anything untill i press a button? Lets say i want to delete a notepad note (its at desktop), without right clicking and go delete (i want to learn the basics).
So i launch the program and hit button"P" or anything double click or whatever. and the file gets dragged to 1638,843 and drops it there. Is this possible? If yes can you show me the script?
Thanks in advance!
Phoenix007 |
|
| Back to top |
|
 |
Phoenix007 Guest
|
Posted: Tue Mar 24, 2009 8:01 pm Post subject: |
|
|
| also that, i want to move more files without launching the program again. Just simple pressing the "whatever-key" again |
|
| Back to top |
|
 |
Phoenix007 Guest
|
Posted: Tue Mar 24, 2009 10:06 pm Post subject: |
|
|
or to make it more simpler, i want a program that can, at a push of a button; move a object(desktop icon) to a certain point on the screen. By dragging the object and drop it at the selected (x,y) location instantly.
Example: I launch the program, click on a object, and the object gets dragged instantly to the (x,y) location
Cmon that cant be so hard? if anyone do know how to script it, id greatly appreciate it. |
|
| Back to top |
|
 |
Robbo
Joined: 27 Jul 2008 Posts: 47 Location: England
|
Posted: Tue Mar 24, 2009 11:22 pm Post subject: |
|
|
You may want to take a look at this page:
http://www.autohotkey.com/docs/Hotkeys.htm
As for your suggestion of the "P" button:
| Code: | P::
MouseClickDrag, L, x, x, 1638, 843
Return |
_________________ All scripts are untested unless otherwise mentioned. |
|
| Back to top |
|
 |
sinkfaze
Joined: 18 Mar 2008 Posts: 5043 Location: the tunnel(?=light)
|
Posted: Tue Mar 24, 2009 11:26 pm Post subject: |
|
|
Untested:
| Code: | !x:: ; hotkey Alt + x
Click down ; sends a 'down' click to the mouse wherever it's located
Click up 1638, 843 ; releases from the 'down' state once the mouse is at those coordinates
return
|
_________________ Try Quick Search for Autohotkey or see the tutorial for newbies. |
|
| Back to top |
|
 |
Phoenix007 Guest
|
Posted: Wed Mar 25, 2009 3:13 pm Post subject: |
|
|
thanks alot guys works wonder, just to speed up process, is there any way to make the mouse returning back to the original point after placing the object there? i dont know the starting location but i know the drop location |
|
| Back to top |
|
 |
sinkfaze n-l-i Guest
|
Posted: Wed Mar 25, 2009 3:56 pm Post subject: |
|
|
| Code: | !x::
MouseGetPos Px, Py ; saves the mouse's current coordinates to variables
Click down
Click up 1638, 843
Click %Px%, %Py%, 0 ; moves the mouse to the coordinates contained in the variables without clicking
return |
|
|
| Back to top |
|
 |
Phoenix007 Guest
|
Posted: Wed Mar 25, 2009 6:12 pm Post subject: |
|
|
thanks alot sinkfaze now what i wonder is it pssoble to do it with the mouse? say mousebutton 4 or 5 or the mousewheel button as if now it is "!x::" can i make it "Mousebutton4::" ? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|