[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [StrongED] Programming question



In article <e9ad9b4f57.fjgraute@xxxxxxxxx>,
   Fred Graute <fjgraute@xxxxxxxxx> wrote:


> With Wimp_ProcessKey or OS_Byte it should be fairy simple to
> implement. Using StrongED_ExecCmds is more complicated so here's
> some sample code (in BASIC) to show what's required.

>   DIM Block% 256
>   
>   REM Set command string and work out its length (rounded up)
>   Command$ = "StrongED_ExecCmds EndOfText InsertStr(""Foobar"")"
>   MsgLen%  = ((20 + LEN(Cmd$)) + 3) AND NOT %11
>   
>   REM Set up message block with command to send
>   !(Block%+0)  = MsgLen%  : REM message length
>   !(Block%+4)  = 0        : REM task handle
>   !(Block%+8)  = 0        : REM my_ref
>   !(Block%+12) = 0        : REM your_ref
>   !(Block%+16) = &43b00   : REM message code
>   $(Block%+20) = Command$ : REM command string
>   
>   REM Pass command string to StrongED with a UserMessage
>   SYS "Wimp_Initialise",350,&4b534154,"Send StrongED command",0
>   SYS "Wimp_SendMessage",17,Block%,0
>   SYS "Wimp_CloseDown"
>   
>   END

> There are a few things to watch out for. If you have multiple
> copies of StrongED running then it will only work with one copy
> (the one that is first on the OS internal task list).

> Also StrongED should not lose input focus. Running the above
> example doesn't work on systems where the Filer takes focus on the
> first click. On such systems you'll to use an application launcher
> to start it, eg StrongMen.

Very good of you Fred, thanks a lot for that..

Cheers,

Bob.

-- 
Bob Latham
Stourbridge, West Midlands

-- 
To unsubscribe send a mail to StrongED+unsubscribe@xxxxxxxxxxx
List archives and instructions at
http://stronged.torrens.org/index.html