Hi,
How do break out of x.times loop.
10.times do
findWindowLike(nil, /^Microsoft Internet Explorer$/, //) {|win|
puts #{win.getClassName}\t#{win.getWindowText}
#p win.getWindowRect
#p win
if(win.getParent().hwnd == $ie.hwnd) then
#p $ie.hwnd,
On 8/11/06, Manish Sapariya [EMAIL PROTECTED] wrote:
Hi,
How do break out of x.times loop.
Here's one answer to your question...
http://permalink.gmane.org/gmane.comp.lang.ruby.general/21817
___
Wtr-general mailing list
Wtr-general@rubyforge.org
Manish Sapariya wrote:
Hi,
How do break out of x.times loop.
10.times do
findWindowLike(nil, /^Microsoft Internet Explorer$/, //) {|win|
puts "#{win.getClassName}\t#{win.getWindowText}"
#p win.getWindowRect
#p win
if(win.getParent().hwnd == $ie.hwnd)
Manish, your break is working. But it is breaking out of your code
block, not your "times" loop.
{|win|
puts "#{win.getClassName}\t#{win.getWindowText}"
#p win.getWindowRect
#p win
if(win.getParent().hwnd == $ie.hwnd) then
#p $ie.hwnd, win.getParent().hwnd
popupwin=win
p
Lonny Eachus wrote:
Manish, your break is working. But it is breaking out of your code
block, not your times loop.
{|win|
puts #{win.getClassName}\t#{win.getWindowText}
#p win.getWindowRect
#p win
if(win.getParent().hwnd == $ie.hwnd) then
#p $ie.hwnd,
Just as a general reminder to the list. If you're getting the digest version, be careful about sending back the subject header, digest headers are useless in categorizing and threading the emails. The original subject header you're responding to is in the digest, ideally copy/paste that in place
Charley Baker wrote:
Just as a general reminder to the list. If you're getting the digest
version, be careful about sending back the subject header, digest
headers are useless in categorizing and threading the emails. The
original subject header you're responding to is in the digest,
ie.back is tested in navigate_test.rb, which works for me in trunk.
Aidy, does this test work for you?
Bret
Charley Baker wrote:
Hey Aidy,
The back method does a straight call to ie's GoBack method, and
according to the comments throws that exception only if for some
reason it can't
I have to deal with some pages that contain nested frames, with source
from different domains. Some are http and some https. In some cases,
while trying to access these frames, I get "access denied":
irb(main):044:0 ie.show_frames
there are 4 frames
frame index: 1 name: header
frame
...if possible more
information about how to call arbitrary _javascript_ functions without firing an
event from a page element.
Here's oneway to call an
arbitrary java function that works like a charm for
me.
window=$ie.ie.Document.parentWindowwindow.execScript('myjavafunction')
To give
Thanks,
It did work.
Regards,
Manish
Jeff Wood wrote:
Or, you could use a simple throw-catch pair.
% irb
irb(main):001:0 catch :done do
irb(main):002:1*
irb(main):003:1* 10.times do |x|
irb(main):004:2*
irb(main):005:2* [1,2,3].each do |y|
irb(main):006:3*throw :done if
11 matches
Mail list logo