-
Forum
-
T24 Technical Discussions
-
T24 Development & Customization
-
How can I write Progress Bar on unix screen.
How can I write Progress Bar on unix screen.
-
cemtezer
-
Topic Author
-
Offline
-
Senior Member
-
Less
More
-
Posts: 52
-
Thank you received: 1
-
-
-
-
12 years 4 months ago #13633
by cemtezer
Hi, my friends.
I want to learn how can i write a progress bar in jbasic.
for example our process number: 170
this bar is displayed on prompt screen.
already Thanks for helps.
Please Log in or Create an account to join the conversation.
-
jpb
-
-
Offline
-
Moderator
-
-
retired . . . ¯\_(ツ)_/¯
Less
More
-
Posts: 2859
-
Thank you received: 650
-
-
-
12 years 4 months ago #13638
by jpb
set ANZ.UP to your number of tasks, e.g. 170
do GOSUB GRAPH after each step
GRAPH:
******
*
* Graph of % completion of a task
*
CNTR += 1
NEW.PCT = INT( CNTR * 100 / ANZ.UP)
IF NEW.PCT NE OLD.PCT THEN
percent = NEW.PCT
caption = 'This is the bottom-line of your progress bar - add some text'
END
OLD.PCT = NEW.PCT
PRINT @(1,14):' |---|---|---|---|---|---|---|---|---|---| ':@(-4)
PRINT @(1,15):' 0 20 40 60 80 100':@(-4)
PRINT @(1,16):' ':caption:@(-4)
bar.length = INT( percent * 40 / 100)
bar = STR(' ',bar.length)
PRINT @(1,13):" ":@(-13):bar:@(-14):percent:' %':@(-4)
RETURN
The following user(s) said Thank You: cemtezer, prashen001
Please Log in or Create an account to join the conversation.
-
cemtezer
-
Topic Author
-
Offline
-
Senior Member
-
Less
More
-
Posts: 52
-
Thank you received: 1
-
-
-
-
12 years 4 months ago #13642
by cemtezer
thank you too much to share ur source.
Regards
Please Log in or Create an account to join the conversation.
-
Forum
-
T24 Technical Discussions
-
T24 Development & Customization
-
How can I write Progress Bar on unix screen.
Time to create page: 0.036 seconds