ProgressBar Examples

Helpful script writing tricks and HowTo's
User avatar
jNizM
Posts: 1983
Joined: 30 Sep 2013, 01:33
GitHub: jNizM

ProgressBar Examples

23 Sep 2014, 07:59

Just a view ProgressBar Examples

Screenshot:
Image

Code:

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



More:
- ASCII Progress Bar ==> Old Forum /board/topic/90674-ascii-progress-bar/
[AHK] 1.1.25.01 x64 Unicode
[WIN] 10 Pro (Version 1607 | Build 14393.970) x64
My GitHub Profile | Donations are appreciated if I could help you
User avatar
joedf
Posts: 5244
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: ProgressBar Examples

23 Sep 2014, 08:51

Hmm didn't know about the marquee setting. Thanks ;)
tmplinshi
Posts: 1045
Joined: 01 Oct 2013, 14:57

Re: ProgressBar Examples

23 Sep 2014, 10:19

I like the PBS_MARQUEE Progressbar. Thanks.

Windows XP looks like this:

Image
User avatar
jNizM
Posts: 1983
Joined: 30 Sep 2013, 01:33
GitHub: jNizM

Re: ProgressBar Examples

24 Sep 2014, 08:06

Image
[AHK] 1.1.25.01 x64 Unicode
[WIN] 10 Pro (Version 1607 | Build 14393.970) x64
My GitHub Profile | Donations are appreciated if I could help you
jballi
Posts: 386
Joined: 29 Sep 2013, 17:34

Re: ProgressBar Examples

24 Sep 2014, 11:46

Looks useful. Thanks.
jballi
Posts: 386
Joined: 29 Sep 2013, 17:34

Re: ProgressBar Examples

07 Dec 2014, 08:58

Windows 7.

Assume PBS_SMOOTH style has been removed.

Ran into a weird problem. If I change the state of the progress bar from normal, i.e. PBST_NORMAL, to pause, i.e. PBST_PAUSE, it works most of the time. I would guess 85+%. However, the progress bar for the PBST_NORMAL state is also an animation and so if the bar is somewhere in it's animation, the request to change the state to PBST_PAUSE many times fails. I've resorted to calling the PBM_SETSTATE message twice (with a short sleep in between) and it does fix the problems some of the time but not all of the time.

I know this is not the help forum but this topic hits right on the situation so I'm posting it here. Does anyone have any ideas on the correct way to change the state from normal to pause and have it succeed 100% of the time? Thanks.



Edit: 20141207

This appears to be a Windows 7 bug. Microsoft is ignoring it (for now).

I found one workaround from Jim Barry on a Microsoft Windows forum which seems to do the trick. It appears that the progress bar only animates when moving forward so changing the position of the progress bar to the current position + 1 and then changing it back before changing the state fixes the problem. You can find the full post here.
ozzii
Posts: 277
Joined: 30 Oct 2013, 06:04

Re: ProgressBar Examples

09 Dec 2014, 03:25

Question:
I have this

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Can you help me to 'convert' to 'marquee' ?
User avatar
joedf
Posts: 5244
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: ProgressBar Examples

09 Dec 2014, 08:56

From the example script

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus

ozzii
Posts: 277
Joined: 30 Oct 2013, 06:04

Re: ProgressBar Examples

10 Dec 2014, 04:56

@joedf
I saw this. Tried but can't change it to work with my script.
This is why I seek for some help ;)
User avatar
joedf
Posts: 5244
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: ProgressBar Examples

10 Dec 2014, 09:37

Post your code, that will help ;)
User avatar
jNizM
Posts: 1983
Joined: 30 Sep 2013, 01:33
GitHub: jNizM

Re: ProgressBar Examples

10 Dec 2014, 09:40

he did joedf ^^
viewtopic.php?p=31800#p31800

but you use Progress Command and not Gui, Add, Progress,
[AHK] 1.1.25.01 x64 Unicode
[WIN] 10 Pro (Version 1607 | Build 14393.970) x64
My GitHub Profile | Donations are appreciated if I could help you
User avatar
joedf
Posts: 5244
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada, Quebec
Contact:

Re: ProgressBar Examples

10 Dec 2014, 09:52

Oh lol :facepalm: I got confused because I could not see the "GUI" command anywhere .. :P
ozzii
Posts: 277
Joined: 30 Oct 2013, 06:04

Re: ProgressBar Examples

17 Dec 2014, 08:03

So I must convert it into Gui then.
And also the CopyFileEx into User32.dll right ?
User avatar
jNizM
Posts: 1983
Joined: 30 Sep 2013, 01:33
GitHub: jNizM

Re: ProgressBar Examples

17 Dec 2014, 08:56

1. CopyFileEx is in Kernel32.dll (see here: CopyFileEx function)

2. From HelpFile: DllCall (Parameters)
DllFile may be omitted when calling a function that resides in User32.dll, Kernel32.dll, ComCtl32.dll, or Gdi32.dll. For example, "User32\IsWindowVisible" produces the same result as "IsWindowVisible".

Personally, I prefer the DllName, to know in which dll my function is stored.
[AHK] 1.1.25.01 x64 Unicode
[WIN] 10 Pro (Version 1607 | Build 14393.970) x64
My GitHub Profile | Donations are appreciated if I could help you
ozzii
Posts: 277
Joined: 30 Oct 2013, 06:04

Re: ProgressBar Examples

19 Dec 2014, 07:27

thanks for the explanation, but still too much complicated for me.
I will stick with my previous command.
Thanks again.
Peter2
Posts: 208
Joined: 21 Sep 2014, 14:38
Location: CH
Contact:

Re: ProgressBar Examples

19 Dec 2014, 09:48

jNizM wrote:Just a view ProgressBar Examples...
Code:
ProgressBar.ahk...

Thanks :clap: I will try it.
Peter (AHK Beginner) / Win 7 x64, AHK Version v1.1.22.xx
User avatar
kczx3
Posts: 351
Joined: 06 Oct 2015, 21:39

Re: ProgressBar Examples

23 Jan 2017, 09:40

I'm trying to use a marquee progressbar and am finding that the animation is not smooth due to the operations that occur after that point in my script. Seems like it's a problem to due the single threaded nature of AHK but I'm not sure. The code that occurs after I set the progressbar to marquee is a file loop where i open xlsx files, save as CSV, then open the CSV with an ADODB.Stream object to save as utf-8 since excel saves CSVs as ASCII.
euras
Posts: 129
Joined: 05 Nov 2015, 12:56

Re: ProgressBar Examples

30 Jan 2017, 04:56

How to do that Progressbar will work smoothly?
Like I click Submit button, some commands goes and progressbar goes smoothly too? Now it goes as a brick :/

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus


Return to “Tutorials”

Who is online

Users browsing this forum: Bing [Bot] and 5 guests