AutoHotkey Community

It is currently May 26th, 2012, 4:22 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: March 24th, 2009, 8:51 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2009, 9:01 pm 
also that, i want to move more files without launching the program again. Just simple pressing the "whatever-key" again


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2009, 11:06 pm 
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.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2009, 12:22 am 
Offline

Joined: July 27th, 2008, 7:31 am
Posts: 47
Location: England
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2009, 12:26 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5479
Location: the tunnel(?=light)
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

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2009, 4:13 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2009, 4:56 pm 
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


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2009, 7:12 pm 
thanks alot sinkfaze :D 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::" ?


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Cerberus, poserpro, SKAN, tterB, Yahoo [Bot] and 14 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group