Watir, AutoIT, Window Title and Regular Expression

543 views
Skip to first unread message

Pallavi Sharma

unread,
Oct 29, 2009, 3:04:39 AM10/29/09
to watir-...@googlegroups.com
Hi

Watir auto it implementation is not working if i use the REGEXPTITLE of auto it with it. The same script written directly in AutoIT works although.

Does anyone knows why is this happening?

Is something wrong with my script or is this not supported?

Ruby Script:

require 'win32ole'  

autoit = WIN32OLE.new('AutoItX3.Control')
ret = autoit.WinWait("[REGEXPTITLE:.*pad.*]")
autoit.WinClose("[REGEXPTITLE:.*pad.*]")
   

AutoIT Script

WinWait("[REGEXPTITLE:.*pad.*]")
WinClose("[REGEXPTITLE:.*pad.*]")


Anyone here please help.

Thanks,

--
Pallavi

SMF SMF

unread,
Oct 29, 2009, 5:04:42 AM10/29/09
to watir-...@googlegroups.com
For me the Ruby Script: is working.
 
 
-----Thanks

Željko Filipin

unread,
Oct 29, 2009, 5:10:31 AM10/29/09
to watir-...@googlegroups.com
On Thu, Oct 29, 2009 at 8:04 AM, Pallavi Sharma <write2...@gmail.com> wrote:
> Watir auto it implementation is not working if i use the REGEXPTITLE of auto it with it. The same script written directly in AutoIT works although.

I have played with autoit a few months ago, also trying to use regular expressions. Watir installs a smaller version of autoit, that has only a subset of full autoit functionality, and egular expression support is not there.

Željko
--
watir.com - community manager
watirpodcast.com - host



Pallavi Sharma

unread,
Oct 29, 2009, 6:15:33 AM10/29/09
to watir-...@googlegroups.com
Oh Thanks Zeljko

thats what even i was thinking, but i wonder why for SMF SMF the ruby script works??

nyways thanks Zeljko.

--
Pallavi.

Željko Filipin

unread,
Oct 29, 2009, 6:19:31 AM10/29/09
to watir-...@googlegroups.com
2009/10/29 Pallavi Sharma <write2...@gmail.com>

> i wonder why for SMF SMF the ruby script works??

I did not understand this.

Željko

SMF SMF

unread,
Oct 29, 2009, 6:27:07 AM10/29/09
to watir-...@googlegroups.com
Hi Pallavi,
 
Just for information, AutoIt is installed in my machine also.
 
 
Thanks,
SMF

2009/10/29 Pallavi Sharma <write2...@gmail.com>

Pallavi Sharma

unread,
Oct 29, 2009, 6:29:52 AM10/29/09
to watir-...@googlegroups.com
Another person has replied and stated that the ruby script works with REGEXPTITLE option 

I am sorry i dont know the name, so SMF ; well fine but autoit is installed on my system also and the ruby script with REGEXPTITLE doesn;t work for me.

Is it that if you have complete auto it on the system then the ruby/watir script will work??

--
Pallavi.

SMF SMF

unread,
Oct 29, 2009, 6:33:37 AM10/29/09
to watir-...@googlegroups.com
In my machine I have AutoIT - autoit-v3-setup.exe and Watir - ruby186-26.exe

Pallavi Sharma

unread,
Oct 29, 2009, 6:33:51 AM10/29/09
to watir-...@googlegroups.com
Also, in the scripts i am trying to detect if a Notepad window is opened if yes then close it.

for me autoit script works but not ruby/watir.

--
Pallavi

On Thu, Oct 29, 2009 at 3:59 PM, Pallavi Sharma <write2...@gmail.com> wrote:

Pallavi Sharma

unread,
Oct 29, 2009, 6:38:35 AM10/29/09
to watir-...@googlegroups.com
Yes, same here. but still the ruby script doesn;t work for me.

As Zeljko has stated watir has not implemented complete autoit functinalities

Now my question here is if anyone can please answer:

If i have auto it complete installed and watir then should the ruby script work? coz its not working for me.

--
Pallavi.

Jarmo Pertman

unread,
Oct 29, 2009, 6:56:51 AM10/29/09
to Watir General
Why on earth has it done like that?!? Any good reasons why not to
include AutoIT with full functionality? Anyone?

Seems silly to do that silently and i see it just as a one more source
of possible nasty problems and debugging.

Jarmo

On Oct 29, 11:10 am, Željko Filipin <zeljko.fili...@wa-research.ch>
wrote:
> On Thu, Oct 29, 2009 at 8:04 AM, Pallavi Sharma <write2pall...@gmail.com>

Bret Pettichord

unread,
Oct 29, 2009, 12:54:39 PM10/29/09
to watir-...@googlegroups.com
My guess is that AutoIt has been updated since it was originally
packaged with Watir. AutoIt itself is not open-source software, so we
have to look at licensing issues before updating what we use.

Bret
Reply all
Reply to author
Forward
0 new messages