Трябва да накарам икона да изчезне от системната област. Когато преместя мишката върху него, той изчезва. Мога ли да получа Inno Setup за симулиране на движенията на мишката? Намерих код на Pascal онлайн, но не мога да го накарам да работи в Inno. Може би пропускам нещо лесно.
uses
.... probably not all of these are necessary, but jwawinuser is at least....
JwaTlHelp32 {for running processes},
JwaWinType {for processes declarations},
JwaWinBase {just a guess: for closing process handles},
JwaWinSvc {for services declarations, always required},
jwawinuser {for clearing tray icon/notification area},
....
procedure CleanSystemTray;
{description Clean dead icons from system tray/notification area}
var
hNotificationArea: HWND;
r: RECT;
x: integer;
y: integer;
begin
hNotificationArea:=FindWindowEx(
FindWindowEx(FindWindowEx(FindWindowEx
(0,0,'Shell_TrayWnd', ''),0,'TrayNotifyWnd', ''),0,'SysPager',''),
0,
'ToolbarWindow32',
'Notification Area');
GetClientRect(hNotificationArea,r);
//Now we've got the area, force it to update
//by sending mouse messages to it.
x:=0;
y:=0;
while x < r.Right do begin
while y < r.Bottom do begin
SendMessage(hNotificationArea, WM_MOUSEMOVE, 0, (y shl 16) + x);
y:=y+5;
end;
x:=x+5;
end;
end;
untested translation
от този код. Но предпочитам да се доверя наthis project
. - person TLama   schedule 25.09.2014