Hi Bhavana I did try that but when I am passing global variable it is still
passing null with ControlSetText.

On Thu, Nov 12, 2009 at 1:21 AM, Basavana Gowda K S <bas.go...@gmail.com>wrote:

> Try using autoit.ControlSetText("Open URL", "", "Edit1", playUrl)
>
> and playUrl and $playUrl  are different variables they are not one and the
> same
>
>
>
> On Thu, Nov 12, 2009 at 11:05 AM, qalive365 <pradg...@gmail.com> wrote:
>
>>
>> Hi,
>>
>> I am using Watir in conjucntion with Autoit. I Capture a URL from XML
>> output and pass it to the Module method
>> which launches Winamp application and then use this URL to launch the
>> stream.
>>
>> Here is my code for the module:
>>
>>
>> require "watir"
>> require 'watir/testcase'
>> require "win32/process" # opening and closind applications
>> require "win32ole"
>> autoit=WIN32OLE.new("AutoItX3.Control")
>>
>>
>> # module to launch play url using winamp, needs to pass play url
>> module LaunchPlayUrl
>>    def LaunchPlayUrl.launchPlayUrl(playUrl)
>>       # Launch Winamp application
>>       autoit=WIN32OLE.new("AutoItX3.Control")
>>       autoit.Run('C:\Program Files\Winamp\winamp.exe')
>>       # another post indicated double quotes do not work as in
>> actual autoit script use single instead works.
>>       #Activate Winamp window
>>       autoit.WinWaitActive("Winamp 5.56")
>>       autoit.Send("^l")
>>       autoit.WinWaitActive("Open URL")
>>      autoit.ControlSend("Open URL", "", "Edit1", $playUrl)
>>      autoit.sleep(5000)
>>      autoit.ControlClick("Open URL", "&Open", "Button1")
>>   end
>> end
>>
>> Launches Winamp fine and also launches Edit Box to paste URL fine but
>> prints null in the edit box not passing the playUrl value, I tried
>> passing playUrl rather than $PlayUrl etc but does not work.
>>
>> Please help me figure out what I am doing wrong.
>>
>> Thanks
>>
>>
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to