Search found 15 matches

by Philippe734
Tuesday 31st March 2020 9:35am
Forum: General
Topic: [Solved] Read last line from Process
Replies: 5
Views: 2149

Re: Read last line from Process

Solved: I was not on the right the way. In Process_Read() we need to use Line Input instead of Read for that context. hProc = Exec ["command"] For Read As "Contents" Public Sub Contents_Read() Dim sLine As String Repeat Line Input #hProc, sLine Until sLine = "textcondition" sOutput = sLine hProc.Kil...
by Philippe734
Sunday 29th March 2020 12:26pm
Forum: General
Topic: [Solved] Read last line from Process
Replies: 5
Views: 2149

Re: Read last line from Process

I known already it, I know read the help of Gambas ;) Read #Last, sLine, -256 It's not the answer I need. Currently, this line return the whole output. Considering a bash command which run in an infinite loop. I want only the last line of the standard output, test it with my condition and let the ru...
by Philippe734
Sunday 29th March 2020 8:28am
Forum: General
Topic: [Solved] Read last line from Process
Replies: 5
Views: 2149

[Solved] Read last line from Process

Hello, Considering the following concept bash: command | while read line; do if [ "$condition" == "$line" ]; then echo "$line" break fi done With an example: x=10 (while :; do echo "$x"; x=$(( $x + 1 )); done) | while read line; do if [ "256071" == "$line" ]; then echo "$line" break fi done I want t...
by Philippe734
Wednesday 25th March 2020 3:36pm
Forum: Lounge
Topic: B4A will soon be free and partially open source
Replies: 5
Views: 3160

Re: B4A will soon be free and partially open source

jornmo wrote:
Friday 07th February 2020 11:30pm
Yes! It is released now :!:
Does works fine on Linux, with which wine version?
by Philippe734
Wednesday 25th March 2020 3:29pm
Forum: Lounge
Topic: Ubuntu 18.04
Replies: 2
Views: 2825

Re: Ubuntu 18.04

cogier wrote:
Friday 27th April 2018 7:23am
Ubuntu 18.04 does not have Gambas in its repository!
Considering:
https://packages.ubuntu.com/search?suit ... ds=gambas3
Gambas3 is in Ubuntu's repository for 16.04, 19.04, 19.10 and 20.04 but not for 18.04, in your opinion, why ?
by Philippe734
Tuesday 24th March 2020 5:48pm
Forum: General
Topic: [Solved] Create settings conf file at beginning
Replies: 5
Views: 2118

Re: Create settings conf file at beginning

cogier wrote:
Tuesday 24th March 2020 5:21pm
You can force the settings to save with Settings.Save.
Perfect, thanks! But, it seems that we need to set value before save:
Private Sub WriteSettings()
  Settings["Topic"] = Value  
  If Not Exist(... /myapp.conf) Then
    Settings.Save
  Endif  
End
by Philippe734
Tuesday 24th March 2020 3:31pm
Forum: General
Topic: [Solved] Create settings conf file at beginning
Replies: 5
Views: 2118

[Solved] Create settings conf file at beginning

Hello, When I run my app for the first time in IDE, the following code don't create the settings conf file in .config/gambas3/ Public Sub Form_Open() WriteSettings End Private Sub WriteSettings() Settings["Stack"] = 55 End There is no error. The settings conf file is only created when I close my app...
by Philippe734
Tuesday 24th March 2020 3:18pm
Forum: General
Topic: [Solved] Open with default text editor
Replies: 4
Views: 1840

Re: Open with default text editor

  Shell "xdg-open PathToMyFile.txt"
Or
  EXEC ["xdg-open", "PathToMyFile.txt"]
by Philippe734
Tuesday 24th March 2020 1:10pm
Forum: General
Topic: [Solved] Open with default text editor
Replies: 4
Views: 1840

[Solved] Open with default text editor

Hello,
In my app, I wish to open a text file with the default text editor of the system. Please, how to do ? I know with bash, but is there a native Gambas command ?

Code: Select all

xdg-open myfile.txt
by Philippe734
Sunday 22nd March 2020 6:08pm
Forum: General
Topic: [Solved] Not end
Replies: 2
Views: 1373

Re: Not end

You're right, I was in the mistake. Thanks !