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 

Help with a "working" script

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



Joined: 13 May 2008
Posts: 1

PostPosted: Tue May 13, 2008 1:41 pm    Post subject: Help with a "working" script Reply with quote

Folks,

I'm pretty new to the advanced functionality of AutoHotkey, and could use a little help. I have some code that works, but is not perfect. Basically, I want to use the right Windows key as another modifier key. That way LWin and RWin will do different things. This is what I have so far, which effectively maps RWin+u to ü:

Code:
RWinFlag = 0

~RWin::
{
  RWinFlag=1
}
return

RWin UP::
{
  RWinFlag=0
}
return

#u::
{
  if RWinFlag=1
  {
    SendInput, {ASC 0252}
  }
  else
  {
    SendInput, #u
  }
}
return


Any suggestions for improvement? The potentially recursive nature of SendInput, #u makes me nervous, but works better than when I was trapping and resending an unmodified 'u'.

Chris
Back to top
View user's profile Send private message
Guest






PostPosted: Tue May 13, 2008 2:06 pm    Post subject: Reply with quote

Improvement Nr.1: post in the right forum!

please, someone, move this to Ask for Help.

[ Moderator!: moved ]
Back to top
pockinator



Joined: 06 Dec 2007
Posts: 33

PostPosted: Tue May 13, 2008 2:22 pm    Post subject: Reply with quote

I don't know if this works because I don't have a right windows key on my keyboard, but wouldn't this work?
Code:
RWin & u::SendInput, {ASC 0252}
LWin & u::something else
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