I am using a simple shell command.
Dim nShell as new shell
nShell.Execute ("ls ~/desktop")
results=nShell.ReadAll // or nShell.result
no return Results
I have try with class as shell with data available and mode 1 and 2.
When i switch to mode=0 then i get results
Is any restriction with commands in shell?
why do you need nShell.mode=1 ?
using mode 1
subclass Shell and use Event Handlers DataAvailable and Completed
Axel i have try with subclass Shell and use Event Handlers DataAvailable and Completed
No Result back
Sorry Axel is osx.
From what i see is when i use the mode 1,2 the data have delay my code is like this
Is better to use a thread and mode=0 ?
[code]Sub GFolder(fi as FolderItem)
Dim FolderName,FileShellPath As String
Dim results as string
nShell.Execute ("du -sh "+FileShellPath)
results=GetSize(nShell.ReadAll) //<<< Here i want the results the (getsize) is catching the size and return the data
Dim CellName As text
For i As Integer = 0 To Listbox1.ListCount-1
CellName = Listbox1.Cell(i, 0).ToText
If CellName = FolderName Then Exit
If CellName <> FolderName Then
Listbox1.RowTag(Listbox1.LastIndex) = fi.ShellPath
Listbox1.Cell(Listbox1.LastIndex, 1) = fi.NativePath
Listbox1.Cell(Listbox1.LastIndex, 5) = fi.Length.ToText
maybe you need to create a property nshell (Super = your Shell Sublass)
Why not use the DataAvailable and Completed event ? In Mode 1, that is the normal way to proceed.
[quote=273571:@Axel Schneider]maybe you need to create a property nshell (Super = your Shell Sublass)
Well that was my mistake…Thank you Axel
Michel i think i need one more coffee !!