Sign in to follow this  
Followers 0
Farrukh

How To Show A Autoit Progressabar With Vbscript?

4 posts in this topic

Hi all

I'm a newbie to AutoIt. I want to use AutoIt's controls in VbScript. I read about AutoItX and tried to find about this, but didn't find up till yet.

I want to show a progressbar and control it using the COM interface in VbScript. Is that possible?

Any help will be really appreciated.

Thanks

Farrukh

Share this post


Link to post
Share on other sites



I want to show a progressbar

Any help will be really appreciated.

Yuo don't need autoit for this >> vbs code (save as progress.vbs)

Dim oIE, oScreen, oPgCtl, h, w, i
Set oIE = CreateObject ("InternetExplorer.Application")

With oIE
   .menubar = 0 : .toolbar = 0
   .statusbar = 0  : .resizable = 0
   .navigate "about:<title>Progress</title><object " & _
        "classid=""clsid:35053A22-8589-11D1-B16A-00C0F0283628"" " & _
         "id=""PrgBar"" height=""20"" width=""500"">"
    While .busy : WScript.sleep 10 : Wend
    Set oScreen = .document.parentwindow.screen
    h = oScreen.availheight
    w = oScreen.availwidth
    .height = h/8 : .width = 3* (w/4)
    .top = h/10 : .left = w/10
    Set oPgCtl  = .document.applets("PrgBar")
    .visible = true
End With

With oPgCtl
   .min = 0
   .max = 250
   .appearance = 0 'OR 1
   .borderstyle = 0 'OR 1
   For i=.min to .max
     .value=CSng(i)
     Wscript.sleep 10
   Next
   MsgBox "Maximum reached: " &  .value
End With

oIE.quit

Progress_Bar.zip

Share this post


Link to post
Share on other sites

Hi Lapo

Thanks a lot for the script :). this is a very good script. although, I was not aware of this, but I had heard about this.

I was after some method without using IE automation. If there is any in AutoIt or any other thingy, please do let me know.

thanks again

Farrukh

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0