how can make progress bar following the work state?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
adrian_9382
Posts: 11
Joined: 02 Oct 2017, 02:24

how can make progress bar following the work state?

09 Oct 2017, 06:35

HI everyone ! i have a script to read excel value after to do some action , i hope make a progress bar to show the states
make a progress bar i can do that but i don't know how to following the states with progress bar ? can someone help me ! thanks
this is my code :


FileSelectFile, filepath
objExcel := ComObjCreate("Excel.Application")
objWorkbook := objExcel.Workbooks.Open(filepath)

X=1
loop
{
strCell := objExcel.Cells(X, 1).text
MsgBox, % strCell
;run notepad
;send, {enter}
;Send, % strCell


;run notepad
;click 287,880
;sleep,1000
;click 436,156
;send, ^a
;send, {delete}
;Send, % strCell
;send, {enter}
;sleep,6000

x:=x+1
if (strcell =""){
objExcel.Quit
return
}
}


return
exitapp
User avatar
Jovannb
Posts: 268
Joined: 17 Jun 2014, 02:44
Location: Austria

Re: how can make progress bar following the work state?

09 Oct 2017, 06:42

Hi,

here is an example, how I show my users that something is going on and that they have to be patient:

Code: Select all

#SingleInstance force
; start that anywhere in your code
StartTime := A_TickCount
settimer, showprogress, 1000

; your program code here

sleep, 1000*5			; to demonstrate the effect

return


; that shows your progress, in my case a green box with counting seconds 
showprogress:

ElapsedTime := A_TickCount - StartTime
SetFormat, float, 0.2 						; number formatting
Sec_Elapsed := elapsedtime/1000
toshow:=floor(sec_elapsed)

pos_y:=20
pos_x:=20
Progress, zh0 x%pos_x% y%pos_y% b w60 fs25 ct0000FF cw00FF00, ,%toshow% 

return
Try it, it is running (green box, left top at you screen)

J.B.
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
adrian_9382
Posts: 11
Joined: 02 Oct 2017, 02:24

Re: how can make progress bar following the work state?

09 Oct 2017, 07:04

Jovannb wrote:Hi,

here is an example, how I show my users that something is going on and that they have to be patient:

Code: Select all

#SingleInstance force
; start that anywhere in your code
StartTime := A_TickCount
settimer, showprogress, 1000

; your program code here

sleep, 1000*5			; to demonstrate the effect

return


; that shows your progress, in my case a green box with counting seconds 
showprogress:

ElapsedTime := A_TickCount - StartTime
SetFormat, float, 0.2 						; number formatting
Sec_Elapsed := elapsedtime/1000
toshow:=floor(sec_elapsed)

pos_y:=20
pos_x:=20
Progress, zh0 x%pos_x% y%pos_y% b w60 fs25 ct0000FF cw00FF00, ,%toshow% 

return
Try it, it is running (green box, left top at you screen)

J.B.


HI Jovannb thanks your reply , for the example if want to display the state so i must get excel last row is what right? after progress bar + 1 , +until the excel last row = 100%?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Bing [Bot], Giresharu, RussF and 193 guests