AutoHotkey Community

It is currently May 26th, 2012, 3:47 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 14 posts ] 

Does this interest you.
Very much
Yes
Somewhat
Not really
No
You may select 1 option

View results
Author Message
PostPosted: April 23rd, 2008, 5:34 pm 
Offline

Joined: November 21st, 2007, 10:27 pm
Posts: 239
Location: 0x01101110
This is not a script or function but an idea that i think people may be interested in.

I have thought of a really accesible hotkey.

Code:
Lbutton & {any key}::do anything


As silly as this seems to have a mouse hotkey, it is amazingly useful.
Think of how many times you would press the mouse at the same time as a key...............................................NEVER except for a game where you wouldnt use this hotkey anyway.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 24th, 2008, 8:52 am 
Interesting, though it may be uncomfortable to use the mouse and the keyboard at the same time.

You may be interested in this topic with an even more accessible hotkey where you don't even need the mouse: http://www.autohotkey.com/forum/viewtopic.php?p=190200


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 24th, 2008, 10:38 am 
Hi Deller

I've been using mouse/keyboard combinations for a long time and couldn't do without them now!! :)
This combination is very useful for any task involving text selection ie. select text with mouse, keep the button pressed and then press C (copy), V (paste)....etc.

This is what I use:
Code:
;;::*** Text Editing ***
LButton & C::                   ;; Copy selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{c up}^c
Return

LButton & V::                   ;; Paste selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{v up}^v
Return

LButton & X::                   ;; Cut selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{x up}^x
Return

LButton & Z::                   ;; Undo last action.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{z up}^z
Return


I've just bought a laptop (with no mouse), and the script still works using the touch-pad (doubletap-hold-C).

Quote:
As silly as this seems to have a mouse hotkey
Naa!! :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 24th, 2008, 2:28 pm 
Offline

Joined: March 18th, 2008, 12:31 am
Posts: 63
Location: Barcelona, Catalonia
nli - MsgBox wrote:
This is what I use:

I tried your code and when runing it doesn't allow me to single click!

That's it, simple as that. I can't click anywhere. I click and nothing happens.

It's very strange. It may be because of the mouse driver? I have a Genius NetScroll.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 24th, 2008, 3:00 pm 
Offline

Joined: February 25th, 2008, 4:13 pm
Posts: 37
mai9 wrote:
nli - MsgBox wrote:
This is what I use:

I tried your code and when runing it doesn't allow me to single click!

That's it, simple as that. I can't click anywhere. I click and nothing happens.

It's very strange. It may be because of the mouse driver? I have a Genius NetScroll.


Put a tilda in front of it:

~Lbutton & c::msgbox "hello"


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 24th, 2008, 3:05 pm 
mai9 wrote:
nli - MsgBox wrote:
This is what I use:

I tried your code and when runing it doesn't allow me to single click!

That's it, simple as that. I can't click anywhere. I click and nothing happens.

It's very strange. It may be because of the mouse driver? I have a Genius NetScroll.

Sorry mai9 :(
The example above was taken from my main script where there are other LButton hotkeys above it. You need to add a ~ to the first hotkey ie ~LButton. That should work, if not, add the tide mark to all the hotkeys.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 24th, 2008, 11:33 pm 
Offline

Joined: November 21st, 2007, 10:27 pm
Posts: 239
Location: 0x01101110
nli - MsgBox wrote:
Hi Deller

I've been using mouse/keyboard combinations for a long time and couldn't do without them now!! :)
This combination is very useful for any task involving text selection ie. select text with mouse, keep the button pressed and then press C (copy), V (paste)....etc.

This is what I use:
Code:
;;::*** Text Editing ***
LButton & C::                   ;; Copy selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{c up}^c
Return

LButton & V::                   ;; Paste selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{v up}^v
Return

LButton & X::                   ;; Cut selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{x up}^x
Return

LButton & Z::                   ;; Undo last action.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{z up}^z
Return


I've just bought a laptop (with no mouse), and the script still works using the touch-pad (doubletap-hold-C).

Quote:
As silly as this seems to have a mouse hotkey
Naa!! :)


I find it more useful to have then launch apps but thats also a really good use for them.
:lol:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 24th, 2008, 11:45 pm 
Offline

Joined: March 18th, 2008, 12:31 am
Posts: 63
Location: Barcelona, Catalonia
thanks to the ~ I could make the "msgbox hello" work, but I can't cut/copy/paste/undo no matter all LButtons have tildes or only the first. What else I could be doing wrong.... :|


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2008, 1:15 am 
Offline

Joined: February 25th, 2008, 4:13 pm
Posts: 37
Paste your code so we can see it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2008, 1:17 am 
Offline

Joined: November 21st, 2007, 10:27 pm
Posts: 239
Location: 0x01101110
i like to have mine with functions

Code:
~LButton::gosub, on
~LButton Up::gosub, off
return

on:
Hotkey, f, f, on
Hotkey, t, t, on
Hotkey, c, c, on
Hotkey, g, g, on
Hotkey, p, p, on
Hotkey, d, d, on
Hotkey, a, a, on
return


off:
Hotkey, f, f, off
Hotkey, t, t, off
Hotkey, c, c, off
Hotkey, g, g, off
Hotkey, p, p, off
Hotkey, d, d, off
Hotkey, a, a, off
return

f:
Run, C:\Program Files\Mozilla Firefox\firefox.exe
return

t:
Run, E:\
return

c:
Run, cmd
return

g:
Run, C:\Documents and Settings\USER\Desktop\Gadgets
return

p:
Run,C:\Program Files\Corel\Corel Graphics 12\Programs\CorelPP
return

d:
Run,C:\Documents and Settings\USER\My Documents
return

a:
Run, C:\Program Files\PSPad editor\PSPad.exe
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2008, 2:04 pm 
Offline

Joined: December 6th, 2007, 4:21 pm
Posts: 32
Deller wrote:
i like to have mine with functions

Code:
~LButton::gosub, on
~LButton Up::gosub, off
return

on:
Hotkey, f, f, on
Hotkey, t, t, on
Hotkey, c, c, on
Hotkey, g, g, on
Hotkey, p, p, on
Hotkey, d, d, on
Hotkey, a, a, on
return


off:
Hotkey, f, f, off
Hotkey, t, t, off
Hotkey, c, c, off
Hotkey, g, g, off
Hotkey, p, p, off
Hotkey, d, d, off
Hotkey, a, a, off
return

f:
Run, C:\Program Files\Mozilla Firefox\firefox.exe
return

t:
Run, E:\
return

c:
Run, cmd
return

g:
Run, C:\Documents and Settings\USER\Desktop\Gadgets
return

p:
Run,C:\Program Files\Corel\Corel Graphics 12\Programs\CorelPP
return

d:
Run,C:\Documents and Settings\USER\My Documents
return

a:
Run, C:\Program Files\PSPad editor\PSPad.exe
return


Hi Deller,
I really like the way that you coded those hotkeys. I've never thought of doing it like this myself; I'll be sure to include this method with other non-standard modifiers in my scripts. Thanks! :D


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2008, 2:48 pm 
Offline

Joined: March 18th, 2008, 12:31 am
Posts: 63
Location: Barcelona, Catalonia
airjrdn wrote:
Paste your code so we can see it.


it's the same as posted above, but here you are:

Code:
;;::*** Text Editing ***
~LButton & C::                   ;; Copy selected text.
;;msgbox "hello"
If GetKeyState ("LButton", "P")
   Send {LButton Up}{c up}^c
Return

LButton & V::                   ;; Paste selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{v up}^v
Return

LButton & X::                   ;; Cut selected text.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{x up}^x
Return

LButton & Z::                   ;; Undo last action.
If GetKeyState ("LButton", "P")
   Send {LButton Up}{z up}^z
Return


Last edited by mai9 on April 27th, 2008, 2:51 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2008, 2:50 pm 
Offline

Joined: February 25th, 2008, 4:13 pm
Posts: 37
You need the tilda in each one, not just the first one.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: April 27th, 2008, 2:54 pm 
Offline

Joined: March 18th, 2008, 12:31 am
Posts: 63
Location: Barcelona, Catalonia
mai9 wrote:
thanks to the ~ I could make the "msgbox hello" work, but I can't cut/copy/paste/undo no matter all LButtons have tildes or only the first. What else I could be doing wrong.... :|

As I said above I already tried that!


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: oldbrother 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