Simulating a Click in a List Field

Klaus Major klaus at major-k.de
Wed Aug 22 15:01:35 EDT 2007


Hi Gregory,

> Hello everyone,
>
> I've got a list field with a mouseUp handler in it that takes me to  
> different cards based on information in the line clicked.  How can  
> I simulate clicking the first line?  The best (sadly) that I could  
> come up with that works is this.
>
> 	click at the topleft of fld "My List Field"
>
> I also tried
>
> 	select line 1 of fld "My List Field"
> 	send mouseUp to fld "My List Field"
>
> but the selectedLine function in the mouseUp handler returns empty  
> for some reason.
>
> Is there a more obvious way than my clicking at the topleft?

try this, has always worked for me:

	set the hilitedlines of fld "My List Field" to 1
	send "mouseUp" to fld "My List Field"

> Regards,
>
> 	Gregory

Best

Klaus Major
klaus at major-k.de
http://www.major-k.de




More information about the use-livecode mailing list