EXEC progress

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

EXEC progress

bill-lancaster
I have a series of EXEC command line jobs.  The whole lot takes some time and it would be nice to have some indication of progress.
Because there's a series of EXECs, I'm using the 'Wait' function.  In this case it seems that 'Process_Read' doesn't report what's happening.
Any advice would be welcome

Gambas 3.9.2
Kubuntu 14.04
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EXEC progress

Matti
I don't know exactly what you want.
My idea would be to show a StatusBar saying which EXEC command is called.
And a ProgressBar after each EXEC command with an estimated value of progress.
Or am I completely wrong?

Am 22.03.2017 um 18:01 schrieb bill-lancaster:

> I have a series of EXEC command line jobs.  The whole lot takes some time and
> it would be nice to have some indication of progress.
> Because there's a series of EXECs, I'm using the 'Wait' function.  In this
> case it seems that 'Process_Read' doesn't report what's happening.
> Any advice would be welcome
>
> Gambas 3.9.2
> Kubuntu 14.04
>
>
>
> --
> View this message in context: http://gambas.8142.n7.nabble.com/EXEC-progress-tp58674.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EXEC progress

Jussi Lahtinen
In reply to this post by bill-lancaster
Process_Read simply reads output of the executed program. Is something
lost, which is expected to show up?


Jussi

On Wed, Mar 22, 2017 at 7:01 PM, bill-lancaster <[hidden email]>
wrote:

> I have a series of EXEC command line jobs.  The whole lot takes some time
> and
> it would be nice to have some indication of progress.
> Because there's a series of EXECs, I'm using the 'Wait' function.  In this
> case it seems that 'Process_Read' doesn't report what's happening.
> Any advice would be welcome
>
> Gambas 3.9.2
> Kubuntu 14.04
>
>
>
> --
> View this message in context: http://gambas.8142.n7.nabble.
> com/EXEC-progress-tp58674.html
> Sent from the gambas-user mailing list archive at Nabble.com.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EXEC progress

bill-lancaster
Yes, a progress bar or even just a label showing which operation is current.
hProc = Exec ["ffmpeg", "-i", sPathTape, etc, etc] Wait For Output As "Process"

with

Public Sub Process_Read()
Dim sData As String
    Read #Last, sData, -255
   Label1.caption = sData
End

doesn't show anything

This works, but is not very elegant

     hProc = Exec ["ffmpeg", "-i", sPathTape, etc, etc] For Input
     Do While hProc.State = 1
          Wait
     Loop
     Label1.caption = "process 1 completed"
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EXEC progress

Christof Thalhofer
In reply to this post by bill-lancaster
Am 22.03.2017 um 18:01 schrieb bill-lancaster:
> I have a series of EXEC command line jobs.  The whole lot takes some time and
> it would be nice to have some indication of progress.
> Because there's a series of EXECs, I'm using the 'Wait' function.  In this
> case it seems that 'Process_Read' doesn't report what's happening.
> Any advice would be welcome

Heres a small priject with code I use to display the output of shell
commands in a window. Maybe it's helpful:

http://gambas-club.de/viewtopic.php?f=13&t=5366#p11986


Alles Gute

Christof Thalhofer

--
Dies ist keine Signatur


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: EXEC progress

Jussi Lahtinen
In reply to this post by bill-lancaster
> Yes, a progress bar or even just a label showing which operation is
> current.
> hProc = Exec ["ffmpeg", "-i", sPathTape, etc, etc] Wait For Output As
> "Process"
>
> with
>
> Public Sub Process_Read()
> Dim sData As String
>     Read #Last, sData, -255
>    Label1.caption = sData
> End
>
> doesn't show anything
>

As expected, you declared the process for output, not for input..?



Jussi
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...