Jump to content

progressbar for a runwait


TuMiM
 Share

Recommended Posts

Is there a way to make a progress bar that is not by percentage. One that will just keep running until a runwait completes?

Case $msg = $Button1
               ProgressOn("test", "test")
    Runwait("\\Server\netlogon\kix32.exe \\Server\netlogon\vpnscript.kix","", @SW_HIDE)
        ProgressOff()
Link to comment
Share on other sites

Is there a way to make a progress bar that is not by percentage. One that will just keep running until a runwait completes?

Case $msg = $Button1
               ProgressOn("test", "test")
    Runwait("\\Server\netlogon\kix32.exe \\Server\netlogon\vpnscript.kix","", @SW_HIDE)
        ProgressOff()

might try a run command,

i.e. $PID = Run("your command")

While $PID

Sleep ( 1000 )

;ProgressSet command

$PID = ProcessExists($PID)

Wend

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

What would the progressset command be for that?

ProgressOn("test", "test")
        $PID = Run("\\Server\netlogon\kix32.exe \\Server\netlogon\vpnscript.kix","", @SW_HIDE)
        While $PID
        Sleep ( 1000 )

        ProgressSet($pid)

        $PID = ProcessExists($PID)
        Wend

        
        ProgressOff()

The above doesn't do anything in the progress bar. It just stays empty. I know i am doign something wrong. What?

Link to comment
Share on other sites

ProgressOn("test", "test")
        $PID = Run("\\Server\netlogon\kix32.exe \\Server\netlogon\vpnscript.kix","", @SW_HIDE)
        While $PID
        Sleep ( 1000 )

        ProgressSet($pid)

        $PID = ProcessExists($PID)
        Wend

        
        ProgressOff()

The above doesn't do anything in the progress bar. It just stays empty. I know i am doign something wrong. What?

ProgressOn("test", "test")
$PID = Run("\\Server\netlogon\kix32.exe \\Server\netlogon\vpnscript.kix", "", @SW_HIDE)
$x = 0
$Forward = 1
While 1
    Sleep(200)
    If $Forward Then
        If $x < 100 Then
            $x = $x + 10
        Else
            $Forward = 0
        EndIf
    Else
        If $x > 0 Then
            $x = $x - 10
        Else
            $Forward = 1
        EndIf
    EndIf
    ProgressSet($x)
    
    $PID = ProcessExists($PID)
WEnd


ProgressOff()
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

ProgressOn("test", "test")
        $PID = Run("\\Server\netlogon\kix32.exe \\Server\netlogon\vpnscript.kix","", @SW_HIDE)
        While $PID
        Sleep ( 1000 )

        ProgressSet($pid)

        $PID = ProcessExists($PID)
        Wend

        
        ProgressOff()

The above doesn't do anything in the progress bar. It just stays empty. I know i am doign something wrong. What?

Can anyone help me out here?
Link to comment
Share on other sites

  • Developers

try:

While ProcessExists($PID)
    Sleep(200)
    If $Forward Then
        If $x < 100 Then
            $x = $x + 10
        Else
            $Forward = 0
        EndIf
    Else
        If $x > 0 Then
            $x = $x - 10
        Else
            $Forward = 1
        EndIf
    EndIf
    ProgressSet($x)
WEnd

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

GUICtrlCreateProgress() will enabe you to create a progressbar in a GUI that is created in AutoIt3.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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...