PDA

View Full Version : close winamp and open...



nopal
10-06-2006, 01:42 PM
Please I need help:huh :

I have in my project 2 buttons. In the first button I run the winamp.exe and when I click in the second button, I want to run another different programme(bsplayer.exe) and close automatically the winamp . How I do it?

thanks in advance

D0M1N0R
10-06-2006, 02:08 PM
This might be of some help

nopal
10-06-2006, 04:07 PM
Thank you, I solve my problem:

windows = Window.EnumerateTitles();
window_name = "winamp";
for handle, title in windows do
result = String.Find(title, window_name, 1, false);
if (result ~= -1) then
Window.Close(handle, CLOSEWND_TERMINATE);
end
end

D0M1N0R
10-06-2006, 04:28 PM
No Problem :yes