| View previous topic :: View next topic |
| Author |
Message |
iacchos
Joined: 17 Dec 2009 Posts: 4
|
Posted: Thu Dec 17, 2009 11:57 am Post subject: How to autoreplace ":" character ? |
|
|
Hi,
I want to auto replace ":" key to "n" key (to "translate" a powerpoint remote control from english shortkey to french shortkey...)
I tried
-> has no effect
-> script is in error
Thanks for your help |
|
| Back to top |
|
 |
Guest
|
Posted: Thu Dec 17, 2009 12:14 pm Post subject: |
|
|
| u can use the scan code |
|
| Back to top |
|
 |
UncleScrooge
Joined: 14 Apr 2009 Posts: 75 Location: Italy
|
Posted: Thu Dec 17, 2009 12:18 pm Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
iacchos
Joined: 17 Dec 2009 Posts: 4
|
Posted: Thu Dec 17, 2009 12:32 pm Post subject: |
|
|
Sorry, but
| Code: | | :::MsgBox You've pressed ":" |
works fine, whereas
has no effect !!!!!
Stange
BR |
|
| Back to top |
|
 |
UncleScrooge
Joined: 14 Apr 2009 Posts: 75 Location: Italy
|
Posted: Thu Dec 17, 2009 12:36 pm Post subject: |
|
|
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 Thu Dec 17, 2009 12:46 pm; edited 2 times in total |
|
| Back to top |
|
 |
UncleScrooge
Joined: 14 Apr 2009 Posts: 75 Location: Italy
|
Posted: Thu Dec 17, 2009 12:38 pm Post subject: |
|
|
| iacchos wrote: | Sorry, but
| Code: | | :::MsgBox You've pressed ":" |
works fine, whereas
has no effect !!!!!
Stange
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 |
|
| Back to top |
|
 |
iacchos
Joined: 17 Dec 2009 Posts: 4
|
Posted: Thu Dec 17, 2009 12:45 pm Post subject: |
|
|
| 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
As I said,
| Code: | | :::MsgBox You've pressed ":" |
works fine. So
should be good to have a "n" for ":" hotkey ??
But this not works
More strange: with
the result is to have an hotkey "*" with aotoreplce to ":"
A pb with my french (azerty) keybord and Autohotkey ??
Last edited by iacchos on Thu Dec 17, 2009 12:50 pm; edited 1 time in total |
|
| Back to top |
|
 |
UncleScrooge
Joined: 14 Apr 2009 Posts: 75 Location: Italy
|
Posted: Thu Dec 17, 2009 12:47 pm Post subject: |
|
|
the above works
| iacchos wrote: | So
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 Thu Dec 17, 2009 12:59 pm; edited 3 times in total |
|
| Back to top |
|
 |
iacchos
Joined: 17 Dec 2009 Posts: 4
|
Posted: Thu Dec 17, 2009 12:52 pm Post subject: |
|
|
Yes
Thanks a lot ! |
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Thu Dec 17, 2009 4:32 pm Post subject: |
|
|
| A bit of history. |
|
| Back to top |
|
 |
|