[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [StrongED] Programming question
- To: stronged@xxxxxxxxxxx
- Subject: Re: [StrongED] Programming question
- From: Bob Latham <bob@xxxxxxxxxxxxxxxx>
- Date: Wed, 31 Oct 2018 13:11:52 +0000 (GMT)
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mightyoak.org.uk; s=default; h=Content-Type:References:In-Reply-To: Message-ID:Subject:Date:To:From:MIME-Version:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sg32O4SpgGHDzoeCTQAs41oUkVa2eFriLL9d7YzYne4=; b=LaDkSY69nFzcBomllnUuHouUX c7u4y+bWBAXEvEikpz4CT6Nusq03uhT/kqUEDuKroWIiGIVvZ+8lVSdR+IqfxTBqhy6EKRuhzwai+ UFrcOzsxY32ZdTICPTtdUVg9C6BxwxeLTi4lXAwTcHZyza8vDo8J2ZbIzBYQjRMoOTSjJo2H/5K23 RwZDabWI7LlJUhiKBANuW7kJ5Z+aKJD9VXFZ1ukx+14iw/B4QFyjTI7pLhfnGjBWKPme7AlIUrmrU iZZ5VgJ6t6bBLsohd0+1KfO1YuwoPPUauqOq9ewWgj4BbGBai9ggpkdHQuYh6EdVxuh7tQ6bAvKOB 7sO3g9v6A==;
- Envelope-to: stronged@xxxxxxxxxxx
- In-reply-to: <e9ad9b4f57.fjgraute@casema.nl>
- List-id: RISC OS StrongED mailing list
- References: <574f213357bob@mightyoak.org.uk> <626a424f57.fjgraute@casema.nl> <574f921060bob@mightyoak.org.uk> <e9ad9b4f57.fjgraute@casema.nl>
- Reply-to: StrongED@xxxxxxxxxxx
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