AutoHotkey Community

It is currently May 27th, 2012, 12:36 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: December 17th, 2009, 12:57 pm 
Offline

Joined: December 17th, 2009, 12:53 pm
Posts: 4
Hi,

I want to auto replace ":" key to "n" key (to "translate" a powerpoint remote control from english shortkey to french shortkey...)

I tried
Code:
:::n

-> has no effect
Code:
`:::n

-> script is in error :?

Thanks for your help


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 1:14 pm 
u can use the scan code


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 1:18 pm 
Offline

Joined: April 15th, 2009, 12:05 am
Posts: 75
Location: Italy
Code:
:::MsgBox You've pressed ":"
n::MsgBox You've pressed "n"

b::Gosub bye
Return

bye;
MsgBox You've pressed "b" for bye   ; just to get out
ExitApp


in SciTe:
Search=>Replace=> Find what? :::
Replace with n::

_________________
Intel Centrino @ 2.8GHz
4 GB RAM
WIN XP SP3


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 1:32 pm 
Offline

Joined: December 17th, 2009, 12:53 pm
Posts: 4
Sorry, but
Code:
:::MsgBox You've pressed ":"

works fine, whereas
Code:
:::n

has no effect !!!!!
Stange :twisted:

BR


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 1:36 pm 
Offline

Joined: April 15th, 2009, 12:05 am
Posts: 75
Location: Italy
or u could try:

Code:
:::Gosub SwapIt

b::Gosub bye
Return

bye:
MsgBox % "You've pressed 'b' for bye"
ExitApp

SwapIt:
MsgBox % "You've pressed  " . A_ThisHotkey
NewHotKey := (A_ThisHotkey = n) ? ":" : "n"
Hotkey, %A_ThisHotkey%, Off
Hotkey, %NewHotKey%, SwapIt
Return

_________________
Intel Centrino @ 2.8GHz
4 GB RAM
WIN XP SP3


Last edited by UncleScrooge on December 17th, 2009, 1:46 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 1:38 pm 
Offline

Joined: April 15th, 2009, 12:05 am
Posts: 75
Location: Italy
iacchos wrote:
Sorry, but
Code:
:::MsgBox You've pressed ":"

works fine, whereas
Code:
:::n

has no effect !!!!!
Stange :twisted:

BR

the first : is the hotkey while the following 2 :: are the hotkey assignment operator:
so if you want to use R

R::
SomeActions

use :

:::SomeActions

use n

n::SomeActions

and not ::n or even worse :::n

that's why ::: works just fine...

_________________
Intel Centrino @ 2.8GHz
4 GB RAM
WIN XP SP3


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 1:45 pm 
Offline

Joined: December 17th, 2009, 12:53 pm
Posts: 4
UncleScrooge wrote:
the first : is the hotkey while the following 2 :: are the hotkey assignment operator

I agree. I want to have "n" each time I type ":"
So, the expression should be
Code:
:::n

As I said,
Code:
:::MsgBox You've pressed ":"

works fine. So
Code:
:::n

should be good to have a "n" for ":" hotkey ??

But this not works :x

More strange: with
Code:
:::n

the result is to have an hotkey "*" with aotoreplce to ":" :x :x
A pb with my french (azerty) keybord and Autohotkey ??


Last edited by iacchos on December 17th, 2009, 1:50 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 1:47 pm 
Offline

Joined: April 15th, 2009, 12:05 am
Posts: 75
Location: Italy
Code:
:::Send n

the above works
iacchos wrote:
So
Code:
:::n

should be good to have a "n" for ":" hotkey ??

you must tell AHK what you wanna do... placing an "n" after the :: operator is not enough... I suggest you re-read carefully this

_________________
Intel Centrino @ 2.8GHz
4 GB RAM
WIN XP SP3


Last edited by UncleScrooge on December 17th, 2009, 1:59 pm, edited 3 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 1:52 pm 
Offline

Joined: December 17th, 2009, 12:53 pm
Posts: 4
Yes :D :D :D
Thanks a lot !


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 17th, 2009, 5:32 pm 
Offline

Joined: October 7th, 2006, 4:50 pm
Posts: 3157
Location: MN, USA
A bit of history.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: iDrug, Leef_me, Ohnitiel, rjgatito, XstatyK, Yahoo [Bot] and 20 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