Réponse acceptée !
Salut,
mIRC:
Code :
alias salut timer 0 60 msg $my_target salut
TCL (pas sûr):
Code :
bind time - ''*0 * * * *'' message
bind time - ''*1 * * * *'' message
proc message { min hour day month year } {
putserv ''privmsg $my_target salut''
}
ou
timer 1 { my_proc }
proc my_proc { } {
putserv ''privmsg $my_target salut''
}
DLL C:
Code C/C++ :
#include <windows.h>
#include <string.h>
#include <stdio.h>
handle hfilemap;
lpstr mdata;
hwnd mirc_hwnd;
typedef struct {
dword mversion;
hwnd mhwnd;
bool mkeep;
} loadinfo;
void __stdcall loaddll(loadinfo* load) {
hfilemap=createfilemapping(invalid_handle_value,0,page_readwrite,0,4096,"mirc");
mdata=(lpstr)mapviewoffile(hfilemap,file_map_all_access,0,0,0);
mirc_hwnd=load->mhwnd;
}
int __stdcall unloaddll(int timeout) {
if (!timeout) {
unmapviewoffile(mdata);
closehandle(hfilemap);
return 1;
}
else return 0;
}
#define fct(x) int __stdcall winapi x(hwnd mwnd,hwnd awnd,char *data,char *parms,bool show,bool nopause)
fct(repeat) {
strcpy(data,"timer");
strcpy(params,"0 60 msg $my_target salut");
return 3;
}
Avec BOOL (winAPI) et non bool (C++).
Cordialement, uaip.