Re: move cursor to the end of a line in a field
On 12/23/20 12:57 PM, matthias rebbe via use-livecode wrote: That's the end of the *field* not the *line*. But it would work, because Douglas wrote that it is a single line field. Ah. I just assumed it was a bit of mistyping and should have been "single line of a field" ...and yes, I know what they say about assuming... -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
And if you have a multiline field and would like to go to the end of the current line use this: on rawKeyDown theKey if theKey = 65367 then put word 2 of the selectedLine of me into tLine select after line tLine of me else pass rawKeyDown end if end rawKeyDown > 23. des. 2020 kl. 22:49 skrev Tore Nilsen via use-livecode > : > > > >> 23. des. 2020 kl. 20:57 skrev Douglas A. Ruisaard via use-livecode >> : >> >> "rawKeyDown" tells me the raw key is 65367 ... but how do I "send" a rawkey >> value to the active field? Or, ideally, can someone tell me how to >> "emulate" the "END" key and position the cursor at the end of the contents >> of a single line field? > > You could try this in the field script: > > on rawKeyDown theKey > if theKey = 65367 then > select after me > else > pass rawKeyDown > end if > end rawKeyDown > > This will allow the normal behavior for all other keys when the field is > active. > > Best regards > Tore Nilsen > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
> 23. des. 2020 kl. 20:57 skrev Douglas A. Ruisaard via use-livecode > : > > "rawKeyDown" tells me the raw key is 65367 ... but how do I "send" a rawkey > value to the active field? Or, ideally, can someone tell me how to > "emulate" the "END" key and position the cursor at the end of the contents > of a single line field? You could try this in the field script: on rawKeyDown theKey if theKey = 65367 then select after me else pass rawKeyDown end if end rawKeyDown This will allow the normal behavior for all other keys when the field is active. Best regards Tore Nilsen ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
- Matthias Rebbe Life Is Too Short For Boring Code > Am 23.12.2020 um 21:50 schrieb Mark Wieder via use-livecode > : > > On 12/23/20 12:26 PM, Brian Milby via use-livecode wrote: >> To improve on my initial suggestion... >> select after char -1 of field 1 > > That's the end of the *field* not the *line*. But it would work, because Douglas wrote that it is a single line field. > > -- > Mark Wieder > ahsoftw...@gmail.com > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
On 12/23/20 12:26 PM, Brian Milby via use-livecode wrote: To improve on my initial suggestion... select after char -1 of field 1 That's the end of the *field* not the *line*. -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
- Matthias Rebbe Life Is Too Short For Boring Code > Am 23.12.2020 um 21:26 schrieb Brian Milby via use-livecode > : > > To improve on my initial suggestion... > > select after char -1 of field 1 > or to improve your 2nd suggestion.. select after fld 1 would do the same. ;) > Sent from my iPhone > >> On Dec 23, 2020, at 3:22 PM, matthias rebbe via use-livecode >> wrote: >> >> Douglas, >> >> you can use >> >> select after line x of fld y >> >> for this. >> For example to place the cursor after line 3 of fld "text" you would write >> >> select after line 3 of fld "text" >> >> >> Regards, >> >> Matthias >> >> >> - >> Matthias Rebbe >> Life Is Too Short For Boring Code >> >>> Am 23.12.2020 um 20:57 schrieb Douglas A. Ruisaard via use-livecode >>> : >>> >>> I need to position the cursor at the end of the contents of a single line >>> field. This can be "manually" done by pressing the "END" key while the >>> cursor is in that field. I want to do that positioning programmatically... >>> but ... >>> >>> I've searched all of the "...KeyDown" message options (e.g. commandKeyDown, >>> controlKeyDown, optionKeyDown) and the other "key" message options (e.g. >>> functionKey) and cannot find one which will tell me what the "END" key is... >>> a Windows resource tells me it is "35" >>> >>> "rawKeyDown" tells me the raw key is 65367 ... but how do I "send" a rawkey >>> value to the active field? Or, ideally, can someone tell me how to >>> "emulate" the "END" key and position the cursor at the end of the contents >>> of a single line field? >>> >>> Likely simple but I just can't work it out. Thanks in advance! >>> >>> Douglas Ruisaard >>> >>> Trilogy Software >>>(250) 573-3935 >>> >>> >>> >>> >>> ___ >>> use-livecode mailing list >>> use-livecode@lists.runrev.com >>> Please visit this url to subscribe, unsubscribe and manage your >>> subscription preferences: >>> http://lists.runrev.com/mailman/listinfo/use-livecode >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
off the top of my head, select char -1 to -1 of the focusedObject (or me if in the script of the field itself). Trouble is I am trying this in the field script itself and it doesn’t work, but if I enter select char -1 to -1 of field 7 in the message box it DOES work. Bob S > On Dec 23, 2020, at 11:57 AM, Douglas A. Ruisaard via use-livecode > wrote: > > I need to position the cursor at the end of the contents of a single line > field. This can be "manually" done by pressing the "END" key while the > cursor is in that field. I want to do that positioning programmatically... > but ... > > I've searched all of the "...KeyDown" message options (e.g. commandKeyDown, > controlKeyDown, optionKeyDown) and the other "key" message options (e.g. > functionKey) and cannot find one which will tell me what the "END" key is... > a Windows resource tells me it is "35" > > "rawKeyDown" tells me the raw key is 65367 ... but how do I "send" a rawkey > value to the active field? Or, ideally, can someone tell me how to > "emulate" the "END" key and position the cursor at the end of the contents > of a single line field? > > Likely simple but I just can't work it out. Thanks in advance! > > Douglas Ruisaard > >Trilogy Software > (250) 573-3935 > > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
To improve on my initial suggestion... select after char -1 of field 1 Sent from my iPhone > On Dec 23, 2020, at 3:22 PM, matthias rebbe via use-livecode > wrote: > > Douglas, > > you can use > > select after line x of fld y > > for this. > For example to place the cursor after line 3 of fld "text" you would write > > select after line 3 of fld "text" > > > Regards, > > Matthias > > > - > Matthias Rebbe > Life Is Too Short For Boring Code > >> Am 23.12.2020 um 20:57 schrieb Douglas A. Ruisaard via use-livecode >> : >> >> I need to position the cursor at the end of the contents of a single line >> field. This can be "manually" done by pressing the "END" key while the >> cursor is in that field. I want to do that positioning programmatically... >> but ... >> >> I've searched all of the "...KeyDown" message options (e.g. commandKeyDown, >> controlKeyDown, optionKeyDown) and the other "key" message options (e.g. >> functionKey) and cannot find one which will tell me what the "END" key is... >> a Windows resource tells me it is "35" >> >> "rawKeyDown" tells me the raw key is 65367 ... but how do I "send" a rawkey >> value to the active field? Or, ideally, can someone tell me how to >> "emulate" the "END" key and position the cursor at the end of the contents >> of a single line field? >> >> Likely simple but I just can't work it out. Thanks in advance! >> >> Douglas Ruisaard >> >> Trilogy Software >> (250) 573-3935 >> >> >> >> >> ___ >> use-livecode mailing list >> use-livecode@lists.runrev.com >> Please visit this url to subscribe, unsubscribe and manage your subscription >> preferences: >> http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
select char (the number of chars in field 1)+1 to -1 of field 1 Sent from my iPhone > On Dec 23, 2020, at 2:58 PM, Douglas A. Ruisaard via use-livecode > wrote: > > I need to position the cursor at the end of the contents of a single line > field. This can be "manually" done by pressing the "END" key while the > cursor is in that field. I want to do that positioning programmatically... > but ... > > I've searched all of the "...KeyDown" message options (e.g. commandKeyDown, > controlKeyDown, optionKeyDown) and the other "key" message options (e.g. > functionKey) and cannot find one which will tell me what the "END" key is... > a Windows resource tells me it is "35" > > "rawKeyDown" tells me the raw key is 65367 ... but how do I "send" a rawkey > value to the active field? Or, ideally, can someone tell me how to > "emulate" the "END" key and position the cursor at the end of the contents > of a single line field? > > Likely simple but I just can't work it out. Thanks in advance! > > Douglas Ruisaard > >Trilogy Software > (250) 573-3935 > > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: move cursor to the end of a line in a field
Douglas, you can use select after line x of fld y for this. For example to place the cursor after line 3 of fld "text" you would write select after line 3 of fld "text" Regards, Matthias - Matthias Rebbe Life Is Too Short For Boring Code > Am 23.12.2020 um 20:57 schrieb Douglas A. Ruisaard via use-livecode > : > > I need to position the cursor at the end of the contents of a single line > field. This can be "manually" done by pressing the "END" key while the > cursor is in that field. I want to do that positioning programmatically... > but ... > > I've searched all of the "...KeyDown" message options (e.g. commandKeyDown, > controlKeyDown, optionKeyDown) and the other "key" message options (e.g. > functionKey) and cannot find one which will tell me what the "END" key is... > a Windows resource tells me it is "35" > > "rawKeyDown" tells me the raw key is 65367 ... but how do I "send" a rawkey > value to the active field? Or, ideally, can someone tell me how to > "emulate" the "END" key and position the cursor at the end of the contents > of a single line field? > > Likely simple but I just can't work it out. Thanks in advance! > > Douglas Ruisaard > >Trilogy Software > (250) 573-3935 > > > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode