[jawsscripts] Re: Auto updating in scripts

  • From: "John Martyn" <johnrobertmartyn@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Tue, 7 Feb 2012 09:47:28 -0800

I actually did find a solution just now, but it requires opening up a webpage 
that is visible, not with the false option. Check it out.
var
object o,
string currentVersion
let o = CreateObject ("internetexplorer.application")
o.visible="true"
o.navigate("www.somesite.com/currentVersion.htm")
;delay so IE comes up first
Delay(50,1)
;if you wanted to focus the window
;SetFocus (o.hWND)
;if you want the version, catch it from the page title which you would have to 
put in the html file each time
Let currentVersion = o.title

Then you can do something with this and tell it to download the current 
version. It would be at this point that you could focus internet explorer and 
do something like:
o.navigate("www.somesite.com/YourProgram"+currentVersion+"Setup.exe")
Of course I don't like the delay waiting for IE to come up, but this is one way 
of doing things. But the window needs to be visible to do something.
What do you all think?
John
-----Original Message-----
From: jawsscripts-bounce@xxxxxxxxxxxxx 
[mailto:jawsscripts-bounce@xxxxxxxxxxxxx] On Behalf Of Soronel Haetir
Sent: Tuesday, February 07, 2012 9:25 AM
To: jawsscripts@xxxxxxxxxxxxx
Subject: [jawsscripts] Re: Auto updating in scripts

Couldn't you use jaws' ComAttachEvents to hook the IE object's events 
(DocumentComplete coming to mind right away)?

Once you have a complete web page you should then be able to use the normal 
browser properties to walk the contents.

Note I don't know that the above will work, I usually operate in the native 
windows environment instead of hosted systems.  But it is at least where I 
would start.

On 2/7/12, John Martyn <johnrobertmartyn@xxxxxxxxx> wrote:
> Hi all,
> Perhaps this question is for the more advanced scripters.
>
> I have tried and tried and there doesn't seem to be a way to make it 
> so the program alerts you if a new script is available.
>
> The object using internet explorer doesn't give me any feedback on 
> what the page says or url does. If I could get an ok status if it 
> loaded the page correctly I could do something, but I lack the method.
>
> Which also brings me to the next point, even if you navigate the url 
> how would you know what version is available?
>
> I've played around with this one for a year or so and I'm stumped.
>
> Any ideas?
>
> Thanks,
>
> John Martyn
>
>
>
> __________ 
>
> View the list's information and change your settings at 
> //www.freelists.org/list/jawsscripts
>
>


--
Soronel Haetir
soronel.haetir@xxxxxxxxx
__________ 

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

__________�

View the list's information and change your settings at 
//www.freelists.org/list/jawsscripts

Other related posts: