View Full Version : Adding a Pause between remote commands
robertc65
November 15th, 2004, 08:25 AM
I am trying to use Girder and a Tira-2 to select particular stations on RCA DirecTivo box. I am trying to use a multi-Command to accomplish this. For example to switch to FOX NEWS my commands are as follows.
output IR command for 3
output IR command for 6
output IR command for 0
Output the Enter command
It seems that the commands are being generated to fast for the TIVO box to keep up. Is there a way to add some wait time between each IR command. Is this the best way to do it or is there a better way?
danward79
November 15th, 2004, 09:46 AM
You could use the wait command in between each one. it is under the windows tab
ewingr
December 10th, 2004, 07:36 AM
I am finding that when I put a wait in, it does not do so.
I thought maybe I need to target a window for it to work. So, I target the window of what is loading (I want to do a mouse click on something in tht window when it opens...but to do so I need to wait). It doesn't wait.
So, I targeted explorer (the desktop). Still doesn't wait.
At least, I think tht's what's happening. I do see the command on Girder go right past teh wait command before the new window even gets open.
Any ideas?
Promixis
December 10th, 2004, 07:49 AM
Roger,
You don't need any targetting.
Can you upload a short gml with what you are doing?
ewingr
December 10th, 2004, 07:57 AM
Interesting.
Well, now I find that this is happening:
If I set teh sait to say 500, I can see that it waits. But if I set it to 1000, or more, it not only waits, but it never continues on. That seems to be the case based on this:
At 500, I can see it pause, and continue to the next command in girder before the window is finished loading. So, thte next command doesn't work.
When I set it to 1000, the command doesn't seem to work, and when I minimize the window, I see that the highlight is still on the wait command, so I presume that means it has stopped.
I have to say that the next command is my first time to use, so it could be a problem as well, but based on teh fact that the highlight is stopped on the wait, I presume it is not working.
I'll keep experimenting.
If any other thoughts...I apprecate the input.
ewingr
December 10th, 2004, 08:22 AM
Here is a small GML with what I'm doing:
Promixis
December 10th, 2004, 10:32 AM
Roger,
Look at the attached example. I think girder is finding another mainlobby window or something...
ewingr
December 20th, 2004, 12:53 PM
Thanks for the example.
I may be completely misunderstanding how this is supposed to work. When I download the example and try it, this is what I see:
On the first command, Notepad runs, and there is only the slightest pause (not 5 seconds)...and the OSD comes up, then closes after about 5 seconds. I would expect a 5 second pause before the OSD comes up. In fact, I changed the wait to 20000, and there was no difference in the pause. It's like if there is a command that runs before the wait, the wait is completely ignored.
ON the second example command, Notepad launch is disabled, and it is 5 seconds before the OSD comes up, then 5 seconds before it closes. So, the wait is NOT ignored, but there is no command executing before the wait is reached in the command list.
The first command is what I'm tryin to do, more or less (I'm doing something different from launching Notepad of course), and from what I see, it doesn't work right in the example either.
Promixis
December 20th, 2004, 03:27 PM
Wait, only waits until the window is found. The delay is a timeout, ie. max time to wait for the window to appear.
ewingr
December 21st, 2004, 03:24 PM
Oh, interesting. I must have misread the docs. It appeared to me it waited however long you set the wait to.
Now, in fact, I'm not sure if it is possiblyh stuck waiting, or not. I know that what I want it to do after the wait is not working (explicit mouse move, and click)...but that may be a problem I have with that command. Although, if I do it based on bringing a focus to a window that is minimized (as opposed to having to load ML), it works fine.
But, when I go over to Girder after the window loads, the highlight is on the WAIT command, as if it has stopped there. If it had gone on, would the highlight have moved?
This of course makes me think it isn't finding the window after it opens...but again, very same command used if the window is minimized, it finds it and works.
Promixis
December 21st, 2004, 06:32 PM
Hi Roger,
It would help me if you would outline in number form the steps you want to do... ie.
1.
2.
3.
etc...
ewingr
December 22nd, 2004, 11:41 AM
Sure.
1. Launch Main Lobby
2. Absolute mouse move to be over a button
3. Leftclick the button, resulting in moving to a different ML screen
Observations
It seems like I need to have it wait to do the position and left click, as that happens before the window is open. I in fact watch the highlights in Girder go all the way down before ML is even open So, I tried changing it to this:
1. Launch Main Lobby
2. Insert a wait
3. Absolutie Mouse Move to be over a button
4. Leftclick the button
In this case it appears that the command is stopping at the wait and never getting to 3 or 4. I based that on the fact that this is what I see: ML launches, and nothing else happens. I close ML, and look at Girder whcih I have open, and the highlight is stopped on the WAIT command.
ONe thing that is confusing is this: It says earlier in this thread that I don't have to target a wait; later it says the wait only waits until the window is open. How can it know what window to wait on if you don't target it. That being said, I have tried targeting, and that doesn't make any difference. Of course, who knows if my target is really accurate. It does 'find' it when I target...but, I've found that doesn't always mean I've targeted it correctly.
By the way Mike...I appreciate your input!
Promixis
December 22nd, 2004, 09:11 PM
No problem.. ;)
Can you download the winluaex plugin.
Then add a command in your multigroup using lua under gider/variable manipulation script...
TIME_Sleep (1000)
This will pause for 1 second. If you need longer, just add more TIME_Sleep (1000) commands.... this will definitely pause girder.
ewingr
December 24th, 2004, 05:17 AM
Thanks. I'll give that a try. I've been interested in exploring LUA...but haven't felt I had the time to learn the script.
Maybe this will give me a jump start.
ewingr
December 27th, 2004, 08:19 AM
That worked!
Thanks so much for your help.
quixote
December 27th, 2004, 11:12 AM
No problem.. ;)
Can you download the winluaex plugin.
Then add a command in your multigroup using lua under gider/variable manipulation script...
TIME_Sleep (1000)
This will pause for 1 second. If you need longer, just add more TIME_Sleep (1000) commands.... this will definitely pause girder.
Hi Mike. I'm just curious about the TIME_sleep command. If I create a loop that does something and TIME_sleeps for a half a second, it waits till the cumulative time has elapsed and then does everything at the end. Is there a way to, say, print "1", wait(500), print "2", wait(500), and so on, all in one LUA script?
Promixis
December 27th, 2004, 01:59 PM
for x = 1,10 do
print (x)
TIME_Sleep (500)
end
quixote
December 27th, 2004, 02:49 PM
That is pretty much exactly what I had. With this script it waits 5 seconds then prints 1 through 10.
Promixis
December 27th, 2004, 08:16 PM
thats what you see... the output window ques the prints.... but it doesn't happen that way.
quixote
December 28th, 2004, 01:20 AM
Thank you. I tested it and it works great. I have been working on implementing the artificial intelligence, as I was rambling about months ago and it's all coming together. I needed the delay for adjusting the volume on my TV. Soon I will rule the world MUAHAHAHAHAHAhahahahahaaaaaaaa
:wink:
danward79
December 28th, 2004, 04:10 AM
I do something similar with NR and Girder for my X10 sliders.
The sliders send a variable to girder, which as it is sliding is constantly changing.
Everytime girder receiver's it triggers a delay, which is constantly retriggered. When the timer times out, it means the slider has not moved for 500ms. It the works out the difference between the last level and the demanded level.
Using this info it then works out an absolute dim level.
Simple!
quixote
December 28th, 2004, 09:26 AM
I do something similar with NR and Girder for my X10 sliders.
The sliders send a variable to girder, which as it is sliding is constantly changing.
Everytime girder receiver's it triggers a delay, which is constantly retriggered. When the timer times out, it means the slider has not moved for 500ms. It the works out the difference between the last level and the demanded level.
Using this info it then works out an absolute dim level.
Simple!
Sounds really cool! I'm definately going to have to shell out some bucks for a PDA and check out Netremote eventually.
danward79
December 28th, 2004, 09:38 AM
You should. I want to get all my events and times adjustable thry nr soon, and obviously the alarm clock oneday!
Xleon
March 25th, 2005, 01:36 AM
I' can't get your suggestion to work for me for some reason....
I've installed the Winuaex plugin and added a command in my multigroup as directed above.
I then click on the script button and wrote...
TIME_Sleep(1000)
TIME_Sleep(1000)
...for a two second delay. I saved it as a GSF file, closed the script editor and saved the GML file. It doesn't appear to be waiting for 2 seconds. If I press the script button again, the script window is blank again, like it's not remembering the script that I wanted it to run whenever it reaches the command.
What am I doing wrong? Any pointers would be gratefully received..
I'm trying to achieve this below, so I hope the Time_Sleep method is the easiest choice to acomplish this.....
Send an IR command
Wait for 2 seconds
Send another IR command.
Rob H
March 25th, 2005, 03:43 AM
Sounds as though you may have forgotten to press the OK or Apply button in the script editor.
Xleon
March 25th, 2005, 09:12 AM
I feel such an idiot !!
Been using Girder for years and then make a dumb mistake like that! The script window opened up at the bottom of my screen and the lower window, along with the OK button, was off-screen so never even new it was there!!
Cheers. :oops:
Rob H
March 25th, 2005, 10:21 AM
I still forget sometimes, and then click on another command in the Girder window and lose all the changes.
Promixis
March 25th, 2005, 11:00 AM
I still forget sometimes, and then click on another command in the Girder window and lose all the changes.
That annoying problem is fixed in G4 :D
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.