Re: handling command line parameters

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: handling command line parameters

Chipp Walters
Jon,

Try:

send "startPlayer" to me in 100 milliseconds

then

on startPlayer
   start player "myPlayer"
   call "trackPlayer"
end startPlayer

This gives your stack a chance to open, load in everything it needs, and
then run what you want.

Jon wrote:

> I've managed to handle command line parameters with my stack, but
> something is strange.  The script looks like this:
>
> on startup
>  if $1 <> "" then
>    OpenTheFile $1
>    start player "myPlayer"
>    call "trackPlayer"
>    end if
>  end startup
>
> The problem is that, while the file is indeed opened (by my OpenTheFile
> routine), the Player does not start.  Is there something about not
> running the Player "too early" in the life of a stack, before it has
> "woken up"?  When I run the same routine at any other time, the Player
> does start up.


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.6 - Release Date: 6/8/2005

_______________________________________________
use-revolution mailing list
[hidden email]
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: handling command line parameters

Jon-3
Chipp:

Thanks for the help.  It turns out that OpenStack works just fine.

:)

Jon


Chipp Walters wrote:

> Jon,
>
> Try:
>
> send "startPlayer" to me in 100 milliseconds
>
> then
>
> on startPlayer
>   start player "myPlayer"
>   call "trackPlayer"
> end startPlayer
>
> This gives your stack a chance to open, load in everything it needs,
> and then run what you want.
>
> Jon wrote:
>
>> I've managed to handle command line parameters with my stack, but
>> something is strange.  The script looks like this:
>>
>> on startup
>>  if $1 <> "" then
>>    OpenTheFile $1
>>    start player "myPlayer"
>>    call "trackPlayer"
>>    end if
>>  end startup
>>
>> The problem is that, while the file is indeed opened (by my
>> OpenTheFile routine), the Player does not start.  Is there something
>> about not running the Player "too early" in the life of a stack,
>> before it has "woken up"?  When I run the same routine at any other
>> time, the Player does start up.
>
>
>
_______________________________________________
use-revolution mailing list
[hidden email]
http://lists.runrev.com/mailman/listinfo/use-revolution
Loading...