AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Beginner Question: Arrow Keys

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
RazorM



Joined: 28 Oct 2004
Posts: 10

PostPosted: Thu Oct 28, 2004 2:06 am    Post subject: Beginner Question: Arrow Keys Reply with quote

#q:: = <Start><q>

!q:: = <Control><q>

What is ?? where:

#??:: = <Start><UpArrow>

and

??q:: = <UpArrow><q> ....& can this be used as a command even?
Back to top
View user's profile Send private message
dijiyd



Joined: 31 Mar 2004
Posts: 90
Location: Philippines

PostPosted: Thu Oct 28, 2004 4:49 am    Post subject: Reply with quote

It's 'up', without the quotes. So it's:
Code:
#up:: ...

As for using up and q, you do this:
Code:
q & up::

Though, as I learned just now, q will not function regularly. You need to put a tilde (~) before q for it to type when you press it.

The problem with that, is, if you fire up the hotkey, it will still send q, so just be careful using it.
Back to top
View user's profile Send private message
RazorM



Joined: 28 Oct 2004
Posts: 10

PostPosted: Thu Oct 28, 2004 6:04 am    Post subject: Also Reply with quote

What should be in Line1 to make a simultaneous click on both mouse buttons send an <Alt><Tab> key sequence?


RButtonLButton::
Send, !{tab}
return


Is it even possible?

ps. all the above commands are suppose to be in the AutoHotkey.ini file.

====================

This below works ONLY if I'm in the "Inbox" of MS Outlook...How can I make it work regardless of where I'm in on MS Outlook?


!LSHIFT::
IfWinActive, Inbox - Microsoft Outlook,
{
Send, {SHIFTDOWN}{CTRLDOWN}o{CTRLUP}{SHIFTUP}{TAB}{DOWN}
return
}
Back to top
View user's profile Send private message
dijiyd



Joined: 31 Mar 2004
Posts: 90
Location: Philippines

PostPosted: Thu Oct 28, 2004 6:23 am    Post subject: Reply with quote

It should be:
Code:
rbutton & lbutton::

again, your rbutton won't function correctly because it is now a prefix. So place that tilde there to remedy that. Also, remember that rbutton is your prefix, meaning you can't do left-hold then right-click. It must be the inverse.

Also, there is a built-in alt tab command, as seen in the documentation:
Quote:
The mouse wheel can be made into an entire substitute for Alt-tab. Clicking the button will display the menu and turning the wheel will navigate through it:
MButton::AltTabMenu
WheelDown::AltTab
WheelUp::ShiftAltTab

So, you might want that instead if you have a mouse wheel.

For outlook... try this:
Code:
!LSHIFT::
SetTitleMatchmode, 2
IfWinActive, Microsoft Outlook,
{
Send, {SHIFTDOWN}{CTRLDOWN}o{CTRLUP}{SHIFTUP}{TAB}{DOWN}
}
return
Back to top
View user's profile Send private message
RazorM



Joined: 28 Oct 2004
Posts: 10

PostPosted: Thu Oct 28, 2004 8:12 am    Post subject: Thanks Dijiyid Reply with quote

What if instead of 2 keys using > !LSHIFT::

I wanted to use 3 keys using > [LShift][Control][s]

^LShift & s:: and ^ & LShift & s:: didn't work.
Back to top
View user's profile Send private message
dijiyd



Joined: 31 Mar 2004
Posts: 90
Location: Philippines

PostPosted: Thu Oct 28, 2004 8:52 am    Post subject: Reply with quote

If you want ctrl+shift+s, you do
Code:

+^s::

+ is the shift symbol, and ^ is the control symbol. Now, if you want to use the left shift or the left control, place a < before that symbol (or the keys at the right, with >).

I don't think & works with more than 2 keys.
Back to top
View user's profile Send private message
RazorM



Joined: 28 Oct 2004
Posts: 10

PostPosted: Fri Oct 29, 2004 1:03 am    Post subject: Extra function executed Reply with quote

Here's another simple one I'm sure...

~^down::
SetTitleMatchmode, 2
IfWinActive, ACDSee
{
Send, {NumpadSub}
return
}


This works the way it should except that it actually executes 2 things.
1. {NumpadSub} ....but also...
2. {down}

How can I make it not execute (2) above?


Last edited by RazorM on Fri Oct 29, 2004 3:40 am; edited 1 time in total
Back to top
View user's profile Send private message
dijiyd



Joined: 31 Mar 2004
Posts: 90
Location: Philippines

PostPosted: Fri Oct 29, 2004 2:34 am    Post subject: Reply with quote

Really? I don't know about that. There doesn't seem to be anything in your script that would send a space, and I tested it, it doesn't send any downs, neither. Try right-clicking on the tray menu then open. Then view>keyhistory and script info. Maybe you could find out there.
Back to top
View user's profile Send private message
RazorM



Joined: 28 Oct 2004
Posts: 10

PostPosted: Fri Oct 29, 2004 3:42 am    Post subject: Correction Reply with quote

Sorry...correction.....

This works the way it should except that it actually executes 2 things.
1. {NumpadSub} ....but also...
2. {down}
Back to top
View user's profile Send private message
RazorM



Joined: 28 Oct 2004
Posts: 10

PostPosted: Fri Oct 29, 2004 4:36 am    Post subject: View History Reply with quote

Okay...used it...& got this...

01 000 u 0.13 LButton _PA210448a.JPG - ACDSee v5.0
A2 01D d 1.39 Ctrl
28 150 h d 0.49 Down
A2 01D i u 0.00 Ctrl
28 150 u 0.13 Down
A2 01D u 0.30 Ctrl
6D 04A i d 0.02 Num -
6D 04A i u 0.00 Num -

Also, I got this also:

Type Off? Running Name
-------------------------------------------------------------------
m-hook ~LButton & RButton
reg #c
reg #x
reg ^!n
reg #n
reg #a
reg #g
reg #/
k-hook ~^left
k-hook ~^right
k-hook ~^up
k-hook ~^down
k-hook ~^\
reg ^+s

Does the key-hook come from using the tilde?

I'm still getting the same prob. in ACDSee though. When I use the <Ctrl><Down> or <Up> combo key, the image instead of zooming in or out, does so but first moves up/down before zooming.

Likewise w/ left/right as i have similar codes using these arrow keys too.
Back to top
View user's profile Send private message
dijiyd



Joined: 31 Mar 2004
Posts: 90
Location: Philippines

PostPosted: Fri Oct 29, 2004 8:58 am    Post subject: Reply with quote

Oh.. sorry. It's the tilde. When using modifier keys like ctrl, alt, shift, you don't need to put in the tilde, unless you want the script to run your command AND send your keys.

So it's just
Code:
^up::
Back to top
View user's profile Send private message
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10474

PostPosted: Fri Oct 29, 2004 11:32 am    Post subject: Reply with quote

And in case its of interest, the $ prefix can help make a hotkey context sensitive. Here is the example from the FAQ:

In the following example, NumpadEnter is made to perform normally except when a window titled "CAD Editor" is active. Note the use of the $ prefix in "$NumpadEnter", which is required to let the hotkey "send itself":
Code:
$NumpadEnter::
IfWinNotActive, CAD Editor
{
   Send, {NumpadEnter}
   return
}
; Otherwise, the desired application is active, so do a custom action:
Send, abc
return
Back to top
View user's profile Send private message Send e-mail
Razor
Guest





PostPosted: Mon Nov 01, 2004 1:35 am    Post subject: Thank you Chris Reply with quote

Hi Chris,

Tried this...& this is EXACTLY what I was looking for! Thanks a million.

It's kinda strange but I was thinking the code would be opposite....ie. If this is the program execute as...as opposed to.....If this isn't the program....

Now I can remap all my keys for my commonly used programs! Twisted Evil
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group