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 

select the usage of ~

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



Joined: 31 Jan 2005
Posts: 14

PostPosted: Tue Feb 22, 2005 2:29 pm    Post subject: select the usage of ~ Reply with quote

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
View user's profile Send private message
gogogadgetcott
Guest





PostPosted: Tue Feb 22, 2005 2:45 pm    Post subject: IF... ELSE Reply with quote

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

PostPosted: Tue Feb 22, 2005 3:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
SanskritFritz



Joined: 17 Feb 2005
Posts: 283
Location: Hungary, Budapest

PostPosted: Tue Feb 22, 2005 3:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
emmi



Joined: 31 Jan 2005
Posts: 14

PostPosted: Tue Feb 22, 2005 3:31 pm    Post subject: Reply with quote

Send, ^v

does not work Sad
Back to top
View user's profile Send private message
SanskritFritz



Joined: 17 Feb 2005
Posts: 283
Location: Hungary, Budapest

PostPosted: Tue Feb 22, 2005 3:36 pm    Post subject: Reply with quote

emmi wrote:
Send, ^v

does not work Sad
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
View user's profile Send private message
emmi



Joined: 31 Jan 2005
Posts: 14

PostPosted: Tue Feb 22, 2005 3:38 pm    Post subject: Reply with quote

hm
Back to top
View user's profile Send private message
jonny



Joined: 13 Nov 2004
Posts: 3004
Location: Minnesota

PostPosted: Tue Feb 22, 2005 5:24 pm    Post subject: Reply with quote

Code:
setkeydelay,5,5


send, {control down}v{control up}
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