Search found 1117 matches

by cogier
Wednesday 29th March 2017 3:19pm
Forum: General
Topic: Did you know?
Replies: 91
Views: 423210

Re: Did you know?

You can shorten the line: -
If String.Comp(sTemp1, sTemp2, gb.IgnoreCase) = 0 Then Print "yes" Else Print "No"
To: -
If Comp(sTemp1, sTemp2, 1) Then Print "No" Else Print "yes"
Unless you particularly wanted to compare two UTF-8 strings
by cogier
Tuesday 28th March 2017 4:41pm
Forum: General
Topic: Did you know?
Replies: 91
Views: 423210

Re: Did you know?

Here is another find - Try this one: -
Public Sub Form_Open()
Dim sTemp1 As String = "hello"
Dim sTemp2 As String = "HELLO"

If sTemp1 == sTemp2 Then Print "Yes" Else Print "No"

End
The "==" is a non case sensitive comparison.
by cogier
Tuesday 21st March 2017 3:10pm
Forum: General
Topic: Problem with Exec and ">"
Replies: 4
Views: 8089

Re: Problem with Exec and ">"

Thanks Didier, it was me who added the 'Example' to the Shell$ help file!
by cogier
Tuesday 21st March 2017 8:39am
Forum: General
Topic: Problem with Exec and ">"
Replies: 4
Views: 8089

Re: Problem with Exec and ">"

The redirect '>' is a terminal command. It can only be used with Shell. When you use Exec there is no terminal so '>' has no meaning. The Pipe '|' command is another example.
by cogier
Thursday 16th March 2017 3:28pm
Forum: General
Topic: Did you know?
Replies: 91
Views: 423210

Re: Did you know?

I have found another little gem I thought I would pass on (even though you know it already!)

Open preferences [Ctrl]+[Alt]+P and switch on Local variable automatic declaration then in your empty 'Sub' type iCount = 6 and hey presto a Dim iCount as Integer automatically appears!
by cogier
Sunday 12th March 2017 4:11pm
Forum: General
Topic: Starting items
Replies: 8
Views: 11034

Re: Starting items

UPDATE: Form_Show() only shows the form immediately with gb.gui Form_Arrange() does not show the form until the the routine has finished Form_Open() does not show the form until the the routine has finished Form_Active() shows the form immediately with gb.gui and gb.qt4 You need one Label on a form ...
by cogier
Friday 10th March 2017 4:45pm
Forum: General
Topic: Starting items
Replies: 8
Views: 11034

Re: Starting items

Well done Didier that did the trick, I used Form_Show()

The missing note has been recaptured!
by cogier
Thursday 9th March 2017 10:01pm
Forum: General
Topic: Starting items
Replies: 8
Views: 11034

Re: Starting items

Ahh. So simple, why didn't I think of that? BUT it doesn't work!! The attached uses a Timer to get the result I am looking for. Simply change ' bWait As Boolean = True ' to 'bWait As Boolean = False ' to see that it doesn't react as expected. Please note the software is in the VERY early stages of d...
by cogier
Thursday 9th March 2017 4:56pm
Forum: General
Topic: Starting items
Replies: 8
Views: 11034

Starting items

Is there a way to get something to start AFTER the Form has been displayed other than using a Timer.

Example: - I want to display a Form then play a tune. If I put it in Public Sub Form_Open() it will not show the Form until the tune has played.
by cogier
Tuesday 14th February 2017 4:20pm
Forum: General
Topic: Using pipes in the Gambas Exec command.
Replies: 3
Views: 7308

Re: Using pipes in the Gambas Exec command.

The "|" pipe can't be used outside a Terminal so wont work with Exec. 'tmux' is a Terminal which is why it works. As you need to open a Terminal anyway why not just use the Shell command which will allow the use of the "|" pipe? Shell "ls -a | grep loc" or Shell "l...