PDA

View Full Version : child process



limboo
12-19-2008, 05:59 AM
Hi guys,

what i want is that when the app starts the encryption/decryption process it shows a statusdlg because crypto has no callback function :( and it must keep on going until the crypto is done and then stop

so what ive done is i've made a second little app and the only thing it does is keep on repeating the message
please wait, encrypting.
please wait, encrypting..
please wait, encrypting...
please wait, encrypting.
so on
but it takes some time to load that app so enumerateprocess or enumeratetitles won't work because the script has already finished before the app is even visible or in the tasklist
it works perfectly when the app has to encrypt/decrypt large things because then the app is already visible

thanks

limboo
12-20-2008, 12:28 PM
what is wrong with this script? because it won't work



File.Run("AutoPlay\\Docs\\encrypting\\littleapp.exe", "", "", SW_SHOWNORMAL, true);

instances_of_file = 0;
file_to_check_for = "littleapp.exe";
repeat

processes = Window.EnumerateProcesses();

for n, file_path in processes do
file = String.SplitPath(file_path);
if (String.Lower(file.Filename..file.Extension)) == file_to_check_for then
instances_of_file = instances_of_file +1;

end
end

until instances_of_file >= 1

Crypto.BlowfishEncrypt(""..input, ""..concat2, ""..key);

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