 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Does this interest you. |
| Very much |
|
27% |
[ 3 ] |
| Yes |
|
0% |
[ 0 ] |
| Somewhat |
|
18% |
[ 2 ] |
| Not really |
|
18% |
[ 2 ] |
| No |
|
36% |
[ 4 ] |
|
| Total Votes : 11 |
|
| Author |
Message |
Deller
Joined: 21 Nov 2007 Posts: 209 Location: 0x01101110
|
Posted: Wed Apr 23, 2008 5:34 pm Post subject: Awesome Hotkey combination. |
|
|
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. |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Apr 24, 2008 8:52 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
nli - MsgBox Guest
|
Posted: Thu Apr 24, 2008 10:38 am Post subject: |
|
|
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!!  |
|
| Back to top |
|
 |
mai9
Joined: 18 Mar 2008 Posts: 26 Location: Barcelona, Catalonia
|
Posted: Thu Apr 24, 2008 2:28 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
airjrdn
Joined: 25 Feb 2008 Posts: 35
|
Posted: Thu Apr 24, 2008 3:00 pm Post subject: |
|
|
| 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" |
|
| Back to top |
|
 |
nli - msgbox Guest
|
Posted: Thu Apr 24, 2008 3:05 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
Deller
Joined: 21 Nov 2007 Posts: 209 Location: 0x01101110
|
Posted: Thu Apr 24, 2008 11:33 pm Post subject: |
|
|
| 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.
 |
|
| Back to top |
|
 |
mai9
Joined: 18 Mar 2008 Posts: 26 Location: Barcelona, Catalonia
|
Posted: Thu Apr 24, 2008 11:45 pm Post subject: |
|
|
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....  |
|
| Back to top |
|
 |
airjrdn
Joined: 25 Feb 2008 Posts: 35
|
Posted: Fri Apr 25, 2008 1:15 am Post subject: |
|
|
| Paste your code so we can see it. |
|
| Back to top |
|
 |
Deller
Joined: 21 Nov 2007 Posts: 209 Location: 0x01101110
|
Posted: Fri Apr 25, 2008 1:17 am Post subject: |
|
|
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
|
|
|
| Back to top |
|
 |
pockinator
Joined: 06 Dec 2007 Posts: 33
|
Posted: Fri Apr 25, 2008 2:04 pm Post subject: |
|
|
| 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!  |
|
| Back to top |
|
 |
mai9
Joined: 18 Mar 2008 Posts: 26 Location: Barcelona, Catalonia
|
Posted: Sun Apr 27, 2008 2:48 pm Post subject: |
|
|
| 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 Sun Apr 27, 2008 2:51 pm; edited 2 times in total |
|
| Back to top |
|
 |
airjrdn
Joined: 25 Feb 2008 Posts: 35
|
Posted: Sun Apr 27, 2008 2:50 pm Post subject: |
|
|
| You need the tilda in each one, not just the first one. |
|
| Back to top |
|
 |
mai9
Joined: 18 Mar 2008 Posts: 26 Location: Barcelona, Catalonia
|
Posted: Sun Apr 27, 2008 2:54 pm Post subject: |
|
|
| 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! |
|
| 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
|