PDA

View Full Version : Wait Command



Ron
October 13th, 2002, 12:55 PM
The wait command works as follows:
(warning: horrible ascii art)

1. if you selected wait for window:



+--- yes --> Exit;
|
+------<- no -[exeed max time ?]----<-+
| |
[ Window exists ? ] - no -> Sleep(500) >+
|
+-> yes -> Exit



2. Sleep(amount of time you requested)


<font size=-1>[ This Message was edited by: RonB on 2001-08-30 17:57 ]</font>

SteveV
October 13th, 2002, 12:55 PM
Are you sure you have the "wait for window" action targeted at the right window? As you probably know, Girder will wait for the target window for the specified number of milliseconds. If it doesn't "see" the window after this timeout period, it will continue with the next step in the MultiGroup.

Regards -- Steve

SteveV
October 13th, 2002, 12:55 PM
Oooops-my bad. Looks like I fail the reading comprehension portion of the exam :grin:

A couple of questions:

What value are you using in the "X/Timout [ms]" field?

Does Girder behave the same way if you enter a REALLY long time out value of 10000 (10 seconds)

What Girder version are you using.

I'm running version 3.023 and wait actions work as you'd expect them to.

Regards -- Steve

Mark F
October 13th, 2002, 12:55 PM
A question for RonB: How does the wait command work? Does it use a Sleep() command or does it loop, waiting for time to elapse?

Grant
October 13th, 2002, 12:55 PM
I'm trying to use a limited number of remote buttons to control MusicMatch JukeBox.

I have 4 buttons that I want to use to select certain playlists and then shuffle the list. To accomplish this, I've created a multi-command that 1) stops the player, 2) clears the current playlist, 3) loads the new list (by "Executing" the .m3u list), 4) then shuffling the list after waiting for the list to load.

Unfortunately, Girder doesn't seem to wait for the list to load. I'm not using "Wait for Window" just an arbirtary time limit. In fact, Girder seems to wait BEFORE loading (executing) the .m3u file.

What is going on here? Am I missing something in the way the Wait command works?

Grant
October 13th, 2002, 12:55 PM
I'm not actually waiting for a window. Since MMJB is already running and the playlist window already exists, I just want to wait an arbitrary time until the playlist loads into MMJB.

Grant
October 13th, 2002, 12:55 PM
This problem is very inconsistent. I've tried long delays. Sometimes it works, but most of the time it doesn't.

I think it's related to the fact that I'm using the "execute" command to load my playlist, then using the wait command. I think that while girder is waiting it won't yield. Unless the time is just right, the execute command waits until the wait command completes.

I tried increasing the MMJB process's priority and lowering girder's and that seemed to make it work better, but still not 100% of the time. This is NOT a workable solution, just a test of my hypothesis.

BTW, I'm running win2k, girder 3.0.23, mmjb 6.1

Grant
October 13th, 2002, 12:55 PM
An update...I've been job hunting so this girder stuff was on the back burner for a while...

Something in my computer/OS setup must have changed, because now girder does exactly what I want it to do. It waits the appropriate amount of time after I load (execute) the playlist before it shuffles it. I'm not sure exactly what I did to the setup, so I'm not sure if my problem is "fixed" or not. But for now I'm happy.