Re: Machile level exception
- Posted by doncole2009 Jan 19, 2009
- 1165 views
constant FIRST_INDEX=1050, LAST_INDEX=1052 procedure check(integer self, integer event, sequence params) ?event ?params[1] ?params[2] if params[1]=120 then--f9 showWindow(Window1,SW_MINIMIZE) elsif params[1]=121 then--f10 showWindow(Window1,SW_NORMAL) end if -- clear the buffer -- poke( FIRST_INDEX, peek( LAST_INDEX ) ) this dosen't work I qet a machine level execption end procedure setHandler(Screen,w32HKeyDown,routine_id("check"))
This only works once on all further keyDowns nothing happens.
Don Cole
Don:
First maybe it would help if you said what you were trying to do ?
What the heck is the FIRST_INDEX, LAST_INDEX suppose to represent ?
Thank you Bernie,
FIRST_INDEX and LAST_INDEX represent the keyboard buffer as per keys.e
On further review I have found that the machine level execption occures because I am trying to use a dos (.ex) program in a window (.exw) program.
What I am trying to do is this:
Press F9 and SW_HIDE the window. Press F10 and have the window reappear. Somewhere in between the keyboard buffer must be cleared.
poke( FIRST_INDEX, peek( LAST_INDEX ) ) works in dos but not in windows.
So what I don't know how to do is clear the keyboard buffer in windows.
Don Cole