Jump to content

Recommended Posts

Is it possible to build an exe for a progress bar that accepts several command line inputs. We use VBscript to install our standard apps and our patches and using an Progress bar would would allow for easier tracking of the install.

I.E. WshShell.Run "C:\Progress.exe Text, % complete"

Thanks,

Mike

Link to post
Share on other sites

Compile this.

I left all the arguments in place, but optional.

You first one would be fine as:

C:\Progress.exe Text 100

or if you wanted the window title=Title, %=40, Maintext=Main, subtext=Sub, x=500, y=400, and option as not on top:

Progress.exe Title 40 Main Sub 500 400 2

;progress.au3 precomplie
AutoItSetOption("TrayIconHide", 0);1 = Hide Icon
winclose("progressbar1");close other progress bar and show this one
AutoItWinSetTitle ("progressbar1") 
$maintext=""
$subtext=""
$x_pos=""
$y_pos=""
$opt=""


If $CmdLine[0]>0 Then
    $title= $CmdLine[1]
If $CmdLine[0]>1 Then $percent=$CmdLine[2]
If $CmdLine[0]>2 Then $maintext=$CmdLine[3]
If $CmdLine[0]>3 Then $subtext=$CmdLine[4]
If $CmdLine[0]>4 Then $x_pos=$CmdLine[5]
If $CmdLine[0]>5 Then $y_pos=$CmdLine[6]
If $CmdLine[0]>6 Then $opt=$CmdLine[7]
ProgressOn ( $title, "","",$x_pos , $y_pos,$opt)
ProgressSet ( $percent ,$subtext,$maintext )
While 1
    sleep(500)
Wend
EndIf

Edit.. oh yea, run it without arguments to remove from memory.

Edited by scriptkitty

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to post
Share on other sites

Thank you, this works perfectly. I was able to take what you gave me and convert it to work with splashtexton and was wondering if it was possible to get it working with controlsettext to stop the flickering?

Thanks again.

Mike

;splash.au3 precomplie
AutoItSetOption("TrayIconHide", 0);1 = Hide Icon
winclose("Splashtext1");close other progress bar and show this one
AutoItWinSetTitle ("Splashtext1") 

If $CmdLine[0]>0 Then
$message= $CmdLine[1]
SplashTextOn("Title", $message, 240, 120, -1, -1, 4, "")
While 1
Sleep(500)
wend
EndIf
Link to post
Share on other sites

Larry - is there any documentation on the values that can be used with the style parameter in AU3GUI?

thanx

:whistle:B) Au3GUI Documentation is an oxymoron. It is one of those programs that utilize a human help file.....Larry.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to post
Share on other sites

I probably should have held off until after I got a reply to the help request I just sent. :whistle:

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to post
Share on other sites

Those are flags that tell the Windows API how the window should look and behave.

Edit: More information on what some of the flags do can be found here.

The AU3_GUI_H.au3 file should of been somewhere in the archive that had AU3GUI.

Edited by Valik
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...