I was under the impression that there were LSS instructions to create and remove hotkeys.. but I can't find the syntax in the help file anymore.
Any idea where it went ? (or was I daydreaming?)
Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo
INT g_iId = -1;
// Registers the Hotkey every time a process is opened.
VOID On_OpenProcess() {
DWORD dwParms[] = { 20, 0, 0 };
g_iId = RegisterHotkey( 'Z', MOD_CONTROL, HK_FUNC_CURPROCSCRIPTFUNCTION, dwParms, FALSE );
}
// Removes the Hotkey every time the process is closed.
VOID On_CloseProcess() {
UnregisterHotkey( g_iId );
g_iId = -1;
}
liqmysaq wrote:how come u changed the HK_# with dwParms and added in the DWORD dwParms[] = { 20, 0, 0 }; ? does this mean if i want a different HK_# i need to type in the DWORD line again and rename dwParms to dwParms1 or something? or will it work if i take out the DWORD line and change dwParms to 20 like u showed in the previous post.
liqmysaq wrote:how come u changed the HK_# with dwParms
liqmysaq wrote:and added in the DWORD dwParms[] = { 20, 0, 0 }; ?
mezzo wrote:Or simply reuse the array. Just enter new values in the array and use the name again. eg
dwParms[] = { 30, 0, 0 };
// register hotkey 1
dwParms[] = { 50, 0, 0 };
// register hotkey 2
dwParms[0] = 30;
…
dwParms[1] = 50;
…
This won’t work in L. Spiro Script; I support aggregations only on declaration.
The best route is to reuse the array you already declared, but do it this way:
Users browsing this forum: No registered users and 0 guests