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 

Is it possible to Assign several keys at one assignment?

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



Joined: 08 Jan 2008
Posts: 29

PostPosted: Mon Jun 16, 2008 10:44 am    Post subject: Is it possible to Assign several keys at one assignment? Reply with quote

Hi Guys ,

Is it possible to Assign all those hotkeys as a group ?

Something like:
#[1-4]::
{
qty:= (the Key pressed)
gosub Do_it
winRestore, %t% ;Restoring the last window on the cycle
return
}


Thanks,

James

Code:
PgUp::
gosub Do_it
winRestore, %t%      ;Restoring the last window on the cycle
return

#1::
qty:=1
gosub PgUp
return

#2::
qty:=2
gosub PgUp
return

#3::
qty:=3
gosub PgUp
return

#4::
qty:=4
gosub PgUp
return
Back to top
View user's profile Send private message
canta



Joined: 30 May 2006
Posts: 49

PostPosted: Mon Jun 16, 2008 11:30 am    Post subject: Reply with quote

Is this what you mean?
Code:
#1::
#2::
#3::
#4::
qty:=1
gosub PgUp
return
Back to top
View user's profile Send private message Visit poster's website
heresy



Joined: 11 Mar 2008
Posts: 291

PostPosted: Mon Jun 16, 2008 11:46 am    Post subject: Reply with quote

canta wrote:
qty:=1
Correction

Code:
#1::
#2::
#3::
#4::
qty:=SubStr(A_ThisHotKey,2,1)
gosub PgUp
return

_________________
Easy WinAPI - Dive into Windows API World
Benchmark your AutoHotkey skills at PlayAHK.com
Back to top
View user's profile Send private message
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