 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
emmi
Joined: 31 Jan 2005 Posts: 14
|
Posted: Tue Feb 22, 2005 2:29 pm Post subject: select the usage of ~ |
|
|
hi, i want to decide if the script uses the ~ or not.
this is my script:
~^V:: ; Strg+V
WinGetClass, ActiveClass, A
if ActiveClass in ConsoleWindowClass,CabinetWClass
{
WinGetPos, X, Y, Width, Height, C:\WINDOWS\System32\cmd.exe
MouseMove, 100,10
MouseClick, right
Send, e
Send, p
;Send {Enter}
}
return
i want the shortcut control+v for paste in a dos-shell. but if i use the
~^V:: i geht a ^V before autokey can paste. if i use only ^V all other applications doesn't work. how can i catch the command in the if paragraph ?
thanks for help
best regards
emmi |
|
| Back to top |
|
 |
gogogadgetcott Guest
|
Posted: Tue Feb 22, 2005 2:45 pm Post subject: IF... ELSE |
|
|
If activeclass is not console then just send Ctrl+V
| Code: |
^V:: ; Strg+V
WinGetClass, ActiveClass, A
if ActiveClass in ConsoleWindowClass,CabinetWClass
{
WinGetPos, X, Y, Width, Height, C:\WINDOWS\System32\cmd.exe
MouseMove, 100,10
MouseClick, right
Send, e
Send, p
Send {Enter}
}
else
{
Send, ^V
}
return
|
|
|
| Back to top |
|
 |
emmi
Joined: 31 Jan 2005 Posts: 14
|
Posted: Tue Feb 22, 2005 3:01 pm Post subject: |
|
|
thanks.
but this does not work in ultraedit and if i want to paste something in visual studio 7 i get a menu with many entries. |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Tue Feb 22, 2005 3:25 pm Post subject: |
|
|
| Code: | $^v:: ; Strg+v careful not to use Caps V, because some apps interpret it Ctrl-Shift-v
WinGetClass, ActiveClass, A
if ActiveClass in ConsoleWindowClass,CabinetWClass
{
WinGetPos, X, Y, Width, Height, C:\WINDOWS\System32\cmd.exe
MouseMove, 100,10
MouseClick, right
Send, e
Send, p
;Send {Enter}
}
else
Send ^v
return |
Have not tried it, but should work. The effect in desrcribed in the help faq: "How can a hotkey be made exclusive to certain program(s)? In other words, I want a certain key to act as it normally does except when a specific window is active." _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
emmi
Joined: 31 Jan 2005 Posts: 14
|
Posted: Tue Feb 22, 2005 3:31 pm Post subject: |
|
|
Send, ^v
does not work  |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Tue Feb 22, 2005 3:36 pm Post subject: |
|
|
| emmi wrote: | Send, ^v
does not work  | Where?
I have a script which is definitely working:
| Code: | ; Excel copy cell contents
$^+c::
WinGet, sf_sProcessName, ProcessName, A
If sf_sProcessName = EXCEL.EXE
Send, {F2}^+{HOME}^c{ESC}
else
Send, ^+c
Return |
_________________ Is there another word for synonym? |
|
| Back to top |
|
 |
emmi
Joined: 31 Jan 2005 Posts: 14
|
Posted: Tue Feb 22, 2005 3:38 pm Post subject: |
|
|
| hm |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Tue Feb 22, 2005 5:24 pm Post subject: |
|
|
| Code: | setkeydelay,5,5
send, {control down}v{control up} |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|