AutoHotkey Community

It is currently May 26th, 2012, 1:43 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Exit application
PostPosted: December 9th, 2008, 3:28 am 
Offline

Joined: September 5th, 2008, 3:34 am
Posts: 44
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 9th, 2008, 3:39 am 
try the following code, it works:
Code:
sleep 1000
send ^!+v

^!+v::ExitApp


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 10th, 2008, 2:13 am 
Offline

Joined: April 18th, 2008, 7:57 am
Posts: 1390
Location: The Interwebs
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%


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 10th, 2008, 3:55 am 
Offline

Joined: September 5th, 2008, 3:34 am
Posts: 44
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.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Newl, patgenn123, Pietro, poserpro and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group