select previous and next clickline

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

select previous and next clickline

Ban Nguyen
Hello

What command do you use to select the previous and next clickline in the
scrolling list field.  Thank you

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: select previous and next clickline

David Squance
Ban Nguyen wrote:

>Hello
>
>What command do you use to select the previous and next clickline in the
>scrolling list field.  Thank you
>  
>
I think what you're looking for is 'word 2 of the clickline'. When you
evaluate 'the clickline' (eg type 'put the clickline' so that the msg
box opens and 'the clickline' appears in it), you will see 'line x of
field y' where x is the line number and y is the field number. Word 2 of
the click line is the line number, so your mouseup handler would need to
include a global variable to which word 2 of the clickline is assigned.
Then the previous button would subtract 1 from that variable and do
whatever to that line. Similarly, the next button would add 1 to the
variable.

I'm afraid I've lost your last post, so can't put example lines into
your script to illustrate, but hope this helps.
Dave
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

RE: select previous and next clickline

Ban Nguyen
In reply to this post by Ban Nguyen

Thank you David.  It helps me a lot....

By the way.  How can I create a volume control to control a song? And I
would like to create a progress bar for an audio.  You have any idea?
Thank you




-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of David
Squance
Sent: Monday, July 11, 2005 2:20 PM
To: How to use Revolution
Subject: Re: select previous and next clickline

Ban Nguyen wrote:

>Hello
>
>What command do you use to select the previous and next clickline in
the
>scrolling list field.  Thank you
>  
>
I think what you're looking for is 'word 2 of the clickline'. When you
evaluate 'the clickline' (eg type 'put the clickline' so that the msg
box opens and 'the clickline' appears in it), you will see 'line x of
field y' where x is the line number and y is the field number. Word 2 of

the click line is the line number, so your mouseup handler would need to

include a global variable to which word 2 of the clickline is assigned.
Then the previous button would subtract 1 from that variable and do
whatever to that line. Similarly, the next button would add 1 to the
variable.

I'm afraid I've lost your last post, so can't put example lines into
your script to illustrate, but hope this helps.
Dave
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: select previous and next clickline

Paul Looney-2
In reply to this post by Ban Nguyen

In a message dated 7/11/05 3:02:59 PM, [hidden email] writes:


>
> _______________________________________________
>

Beware of a clickLine "anomaly"; if you click on an empty line that is below
non-empty lines; for example: click on line 7 of a field with only 4 lines and
the clickLine returns 4, instead of 7; clicking in a scrolling field with now
text returns zero.
Paul Looney
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: select previous and next clickline

Sarah Reichelt
In reply to this post by Ban Nguyen
> What command do you use to select the previous and next clickline  
> in the
> scrolling list field.  Thank you

Instead of tracking the clickLine in a global, you might do better to  
have your button get the hilitedLines of the list field. If you allow  
multiple selections, this will be a comma-delimited list of line  
numbers. If you only allow a single line to be selected at a time,  
this will be a single line number.

As well as using this line number to play the current track, you can  
also use it to move up & down the list. Here is an example script for  
a "Previous" button:

on mouseUp
   put the hilitedLine of fld "List" into tLineNum
   if tLineNum > 1 then
     set the hilitedLine of fld "List" to tLineNum - 1
     -- do whatever you want to do when the previous line is selected
   end if
end mouseUp

This assumes you only allow a single selection at a time.
The "Next" script will be much the same, except it needs to check for  
trying to select more lines than the field holds.

Sarah

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution