Jump to content

Progress or some animation..


 Share

Recommended Posts

Hello,

I was wondering since that little WMI call takes like 10-20 seconds or sometimes more is tehre a way to add progress bar (i find it impossible here from what i saw in other programs so far, but maybe i'm wrong ) or some kinda Animation so user knows program is doing something?

$objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\CIMV2")
$colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)

My little company: Evotec (PL version: Evotec)

Link to comment
Share on other sites

Look up GUICtrlCreateProgress in the help file.

Well you misinterpreted my question i think. WHen you will create progress bar for progress bar to work you gotta update it's values so it changes from 1% to 5% and so on. How you want to do that if WMI call is in progress and you can't realy intercept it and put GUICtrlSetData ($progressbar1,$i), So you can just

1. Put 0% on start and when it ends just put 100% there but then what's the use of progress bar. That's why i don't see how it would work here.

2. I tried $ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10) but it acts weird. I can see it being created on my GUI .. then i see that WMI process is taking place (as i update status bar info / log window that it starts and i can clearly see my computer working on that WMI process) and then for like 15 seconds avi animation isn't doing anything. After a while (10-15seconds) i see speeded up animation going (for like 2seconds) on .. and then it goes normally until process ends. But maybe there's better way to achieve it?

I even thought just now to create another process that will be started that will do animation work and when process is done i would just kill it.

My little company: Evotec (PL version: Evotec)

Link to comment
Share on other sites

Well you misinterpreted my question i think. WHen you will create progress bar for progress bar to work you gotta update it's values so it changes from 1% to 5% and so on. How you want to do that if WMI call is in progress and you can't realy intercept it and put GUICtrlSetData ($progressbar1,$i), So you can just

1. Put 0% on start and when it ends just put 100% there but then what's the use of progress bar. That's why i don't see how it would work here.

2. I tried $ani1 = GUICtrlCreateAvi (@SystemDir & "\shell32.dll",150, 50,10) but it acts weird. I can see it being created on my GUI .. then i see that WMI process is taking place (as i update status bar info / log window that it starts and i can clearly see my computer working on that WMI process) and then for like 15 seconds avi animation isn't doing anything. After a while (10-15seconds) i see speeded up animation going (for like 2seconds) on .. and then it goes normally until process ends. But maybe there's better way to achieve it?

I even thought just now to create another process that will be started that will do animation work and when process is done i would just kill it.

You could use 'Splashtexton" and say like:

SplashTextOn("","Loading...", 200, 50, -1, -1, 33, "Arial", 15, 500)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...