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 

Exit application

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



Joined: 05 Sep 2008
Posts: 44

PostPosted: Tue Dec 09, 2008 2:28 am    Post subject: Exit application Reply with quote

Hi all

I have a new problem.
I create a stop button in my gui.
It is used to stop my scripts while they are running.

Quote:

ButtonTerminatePlayback:

Send ^!+v

Return


However, for each of my scripts, i end it of with

Quote:
^!+v :: ExitApp


It does not work. Instead, the scripts continue to run. Whats worse was that the scripts does not close and remain at my bottom task bar.
Any idead why? (*sidenote: i put this in every of my script so that the button can stop any scripts from running)
_________________
I have lost friends, some by death... others through sheer inability to cross the street.
Virginia Woolf (1882 - 1941),

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.
Back to top
View user's profile Send private message
evan
Guest





PostPosted: Tue Dec 09, 2008 2:39 am    Post subject: Reply with quote

try the following code, it works:
Code:
sleep 1000
send ^!+v

^!+v::ExitApp
Back to top
Krogdor



Joined: 18 Apr 2008
Posts: 1390
Location: The Interwebs

PostPosted: Wed Dec 10, 2008 1:13 am    Post subject: Reply with quote

Code:
SetTitleMatchMode, RegEx
WinGet, Windows, List, \.ahk - AutoHotkey$
Loop, %Windows%
  WinClose, % "ahk_id " Windows%A_Index%

Closes all open AutoHotkey windows, thereby ending the process. To exclude the script calling it, change it to:
Code:
SetTitleMatchMode, 2
WinGet, Windows, List, .ahk - AutoHotkey, , %A_LoopFileLongPath% - AutoHotkey
Loop, %Windows%
  WinClose, % "ahk_id " Windows%A_Index%
Back to top
View user's profile Send private message AIM Address
deportivo5



Joined: 05 Sep 2008
Posts: 44

PostPosted: Wed Dec 10, 2008 2:55 am    Post subject: Reply with quote

thx brothers!
I have solve it.
Now im ready to submit it in my presentation.
_________________
I have lost friends, some by death... others through sheer inability to cross the street.
Virginia Woolf (1882 - 1941),

(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination.
Back to top
View user's profile Send private message
Display posts from previous:   
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