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 

[Solved] My hotkey doesn't work!!

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



Joined: 12 May 2008
Posts: 21

PostPosted: Thu May 15, 2008 1:16 pm    Post subject: [Solved] My hotkey doesn't work!! Reply with quote

Hello,

Can you please help me make this hotkey work!
I want a hotkey that close my windows.
If I use the close button from my window, it goes in the system tray.
So to close it, I need to close all my tabs.

Here is my script :
Code:
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 2
SetKeyDelay, 100
SetMouseDelay, 200
; my hotkey
^!c::
;this is a hotkey I have to "close all the other tabs"
Send ^!w
Sleep, 200
;this is a hotkey I have to "close the activate tabs"
Send ^w
return

The problem is that when I use the hotkey control+alt+c, "Send ^!w" doesn't work so I only have my activate tab closed!

Thank you for your answer


Last edited by djodjolyon on Thu May 15, 2008 2:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
John W



Joined: 09 Apr 2007
Posts: 172

PostPosted: Thu May 15, 2008 1:44 pm    Post subject: Reply with quote

Tip: Use Alt+F, E to exit a normal application (activates menu file and chooses exit)

Code:
^!c::
SendInput, !fe
Return

_________________
John
Inactive - Until AutoHotkey is available for Linux.
Back to top
View user's profile Send private message Send e-mail
Razlin



Joined: 05 Nov 2007
Posts: 434
Location: canada

PostPosted: Thu May 15, 2008 2:14 pm    Post subject: Reply with quote

Another tip is that normall applications will close with alt F4

Code:
send !{F4}



so instead of sending your hotkey

^!c
use the windows built in... !F4



cheers
_________________
-=Raz=-
Back to top
View user's profile Send private message
djodjolyon



Joined: 12 May 2008
Posts: 21

PostPosted: Thu May 15, 2008 2:40 pm    Post subject: Reply with quote

I didn't think about Alt+F4.
It's for my windows explorer and I never tried that before, but it works great...
Stupid question!!!
Thanks everybody
Back to top
View user's profile Send private message
Guest






PostPosted: Fri May 16, 2008 12:19 am    Post subject: Reply with quote

use sendinput ^w
Back to top
djodjolyon



Joined: 12 May 2008
Posts: 21

PostPosted: Sat May 17, 2008 3:23 am    Post subject: Reply with quote

In fact, I don't want to use F4 because my keyboard isn't often on Fmode...

I found the problem I had actually...
It was that I made a mistake in the code... I put control instead of shift.

Thank you all for your answers
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