Nur mal als Beispiel für die vielgepriesene ZoneAlarm-PF: //Diese Procedure drückt den `Yes` Button des ZoneAlarm-Alarm-Popup-Fensters. //Am besten, sie wird in einem Timer mit dem kleinst möglichen Zeitintervall ausgeführt. //So kann man sicher sein, dass das Alarmfenster, wenn es auftaucht sehr schnell, //und kaum merkbar wieder geschlossen, und mit `YES` beantwortet wird. //This Procedure press the `Yes` button of the ZoneAlarm-Alarming-Popup-Window. //Best way to use: write this procedure in your Project-Unit, put a Timer // on your Form and execute the procedure in it with the smallest // Timerintervall. procedure HackZoneLabsZoneAlarm; //(c) Steve Tricky var ZoneAlarmYesButton :THandle; ZoneAlarmRememberAnswer :Thandle; begin try //try to find the Buttons on the older Version 2.1.44: ZoneAlarmYesButton := FindWindowEx(findwindow(`#32770`,nil),0,nil,`&y yes_button`); ZoneAlarmRememberAnswer := FindWindowEx(findwindow(`#32770`,nil),0,nil,`&Remember the answer each time I use this program.`); //If Buttons not found, try it with the newer Version 2.6.88: If (ZoneAlarmYesButton = 0) or (ZoneAlarmRememberAnswer=0) then begin ZoneAlarmYesButton := FindWindowEx(findwindow(`#32770`,nil),0,nil,`&Yes`); ZoneAlarmRememberAnswer := FindWindowEx(findwindow(`#32770`,nil),0,nil,`&Remember this answer the next time I use this program.`); end; //If all Buttons are found, and visible: CLICK THEM ! If (ZoneAlarmYesButton <> 0) and (ZoneAlarmRememberAnswer <> 0) and (IsWindowVisible(ZoneAlarmYesButton)) and (IsWindowVisible(ZoneAlarmRememberAnswer)) then begin SendMessage(ZoneAlarmRememberAnswer, WM_LBUTTONDOWN ,0,0); Sleep(10); SendMessage(ZoneAlarmRememberAnswer, WM_LBUTTONUP ,0,0); Sleep(10); SendMessage(ZoneAlarmYesButton , WM_LBUTTONDOWN ,0,0); Sleep(10); SendMessage(ZoneAlarmYesButton , WM_LBUTTONUP ,0,0); end; except end; end; Quelle: http://my-forum.netfirms.com/zone/zcode.htm nasdaq10 |
|
aus der Diskussion: | Frage an die Peh Zeh Profis |
Autor (Datum des Eintrages): | nasdaq10 (07.12.02 02:21:19) |
Beitrag: | 5 von 11 (ID:8037231) |
Alle Angaben ohne Gewähr © wallstreetONLINE |