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
how can make progress bar following the work state?
-
- Posts: 11
- Joined: 02 Oct 2017, 02:24
Re: how can make progress bar following the work state?
Hi,
here is an example, how I show my users that something is going on and that they have to be patient:
Try it, it is running (green box, left top at you screen)
J.B.
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
J.B.
AHK: 1.1.37.01 Ansi, 32-Bit; Win10 22H2 64 bit, german
-
- Posts: 11
- Joined: 02 Oct 2017, 02:24
Re: how can make progress bar following the work state?
Jovannb wrote:Hi,
here is an example, how I show my users that something is going on and that they have to be patient:
Try it, it is running (green box, left top at you screen)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
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%?