Search found 156 matches

by cogier
Tuesday 28th March 2017 4:41pm
Forum: General
Topic: Did you know?
Replies: 24
Views: 1927

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: 474

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: 474

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: 24
Views: 1927

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: 688

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: 688

Re: Starting items

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

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

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 09th March 2017 4:56pm
Forum: General
Topic: Starting items
Replies: 8
Views: 688

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: 583

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 "ls -a | grep loc" Wait or Shell "ls ...
by cogier
Monday 13th February 2017 6:36pm
Forum: General
Topic: gb.args - alternate form of usage.
Replies: 8
Views: 747

Re: gb.args - alternate form of usage.

@cogier: if you want to convert an array to a string, you can always use .Join. No need to use a loop :) Thanks jornmo for that. I also noticed: - Dim arrParams As String[] Dim strParam As String arrParams = Args.All could have been simplified with Dim arrParams As String[] = Args.All Dim strParam ...