You are here

Limiting to 1 PortableApps.exe only.

5 posts / 0 new
Last post
Passerby007
Offline
Last seen: 17 years 3 weeks ago
Joined: 2007-03-20 05:33
Limiting to 1 PortableApps.exe only.

Hi there. Just want to enquiry something.
Is it possible to limit the number of times of Portable Apps.exe?

Example is that each time I click on the PortableAppsMenu.exe, it will jus keep on launching and launching in the system tray icon.
Thus if I accidentally click it 10times, there will be 10 tray icons there. And 10 applications of POrtableAppsMenu running in the Task Manager.

Is there a way to limit the number of the Portable APps menu to just once?

Regards,

iamacooldude
Offline
Last seen: 16 years 3 months ago
Joined: 2006-11-29 19:18
I have this added in my PAM

I have this added in my PAM mod here:https://portableapps.com/node/4844

It's not in John's official version(that I know of...)

Nobody should start to undertake a large project. You start with a small _trivial_ project, and you should never expect it to get large. If you do, you'll just overdesign and generally think it is more important than it likely is at that stage. Or worse,

Passerby007
Offline
Last seen: 17 years 3 weeks ago
Joined: 2007-03-20 05:33
I cant seem to find which part

Sorry but I cant find which part of the codes am I supposed to look for.
Can u show me where is it?
Thanks.

Regards,

iamacooldude
Offline
Last seen: 16 years 3 months ago
Joined: 2006-11-29 19:18
Do you want code or .exe?

Do you want code or .exe? The exe is at the link i gave, the code is there too, but the snipit is:

begin
messID := RegisterWindowMessage('UniqueAppName');
try
handle := CreateMutex(nil, true, 'UniqueKeyName' );
if GetLastError = ERROR_ALREADY_EXISTS then begin
PostMessage(HWND_BROADCAST, messID, 0, 0);
end else begin
Application.Initialize;
Application.Title := 'PortableApps Menu';
Application.CreateForm(TfrmMenu, frmMenu);
Application.CreateForm(TfrmAbout, frmAbout);
Application.CreateForm(TfrmAddApp, frmAddApp);
Application.Run;
end;
finally
if handle 0 then CloseHandle(handle);
end;

Nobody should start to undertake a large project. You start with a small _trivial_ project, and you should never expect it to get large. If you do, you'll just overdesign and generally think it is more important than it likely is at that stage. Or worse,

Passerby007
Offline
Last seen: 17 years 3 weeks ago
Joined: 2007-03-20 05:33
Thank you very much.

Thanks for the reply!

Log in or register to post comments