>>>Is there any way to issue more than one command when assigning it to the ON KEY command without directing it to run a procedure of commands elsewhere? can you issue more than one command on the same ON KEY command?
>>
>>Never tryed so I think it is inpossible. But you can make a procedure with all commands you need and ON KEY to it.
>
>
>What I want to do is issue a do form command and following that issue a button click once the form has been loaded
Call a little .prg which will instantiate the form and mess with its properties as you see fit, and then OKL that prg. You'd need to use some sort of a forms manager, or assign the form to a global variable or whatever - so it doesn't go out of scope as soon as your prg finishes.
Alternately, your OKL can be ExecScript(yourscript)... but keep in mind that variable that holds the script needs to be visible in the OKL context... which is pretty much out of any other context. In an OKL routine or script you can't really assume anything about what's accessible - which datasession are you running, is _screen.activeform null or not, and least of all - which variables may be visible. So make the prg as compact as possible, and count on globals only.