Opera and cry from the Gambas IDE

Post your Gambas programming questions here.
User avatar
BruceSteers
Posts: 1575
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Opera and cry from the Gambas IDE

Post by BruceSteers »

If you really do not like it you can change the code...

Line 105 of FWelcome.class has this...

bHasTear = PlaySound()

That runs the playsound method...
You could just comment out that line and recompile the ide.

Or edit the method...


Private Sub PlaySound() As Boolean

  Dim dNow As Date
  Dim iYear As Integer
  Dim dEaster As Date
  Dim sPlay As String
  Dim sTemp As String
  Dim bHasTear As Boolean
  
  dNow = Date(Now)
'  dNow = Date(2020, 12, 25)

  iYear = Year(dNow)
  dEaster = Date.EasterDay(iYear)
  
  If dNow = Date(iYear, 12, 25) Then
    sPlay = "bells.mp3"
  Else If dNow = Date(iYear, 8, 15) Or If dNow = dEaster Or If dNow = dEaster + 39 Then
    sPlay = "spiritus.mp3"
    bHasTear = True
  Else
    Return
  Endif

' Mod. play the intro sound only once but still show snow if christmas
  If Settings["/MusicPlayed", "-1"] = Month(dnow) Then Return bHasTear
  Settings["/MusicPlayed"] = Month(dNow)

  Component.Load("gb.media")
  $hPlayer = New MediaPlayer As "MediaPlayer"
  sTemp = Temp$()
  Copy "welcome" &/ sPlay To sTemp
  $hPlayer.URL = Media.URL(sTemp)
  $hPlayer.ProgressiveDownload = True
  $hPlayer.Play(True)

  Return bHasTear
  
End




the part in the middle...
' Mod. play the intro sound only once but still show snow if christmas
  If Settings["/MusicPlayed", "-1"] = Month(dnow) Then Return bHasTear
  Settings["/MusicPlayed"] = Month(dNow)


that is my modification , with that it plays once when i load gambas on the chosen days. then it does not play after.


or completely stop using gambas in outrage ;) lol whatever
If at first you don't succeed , try doing something differently.
BruceS
User avatar
gambafeliz
Posts: 141
Joined: Friday 2nd September 2022 7:50pm
Location: I live in the same city as Picasso

Re: Opera and cry from the Gambas IDE

Post by gambafeliz »

Sorry, you thought you were joking.

Look, Gambas IDE makes me so happy that I have mentally gone back to when I was 15 years old with Basic or when I was 22 years old in Visual Basic 3.0

The thing about sending messages and things like that, as the colleague already says, you can modify the IDE code, but, the truth in your defense, is that there are fun things or perhaps more acceptable things like snow and I remember it at Christmas and others like it today and I don't like it and it's even something that gets in the way of my day.

But from that to removing Gambas IDE, sorry and I respect your position, for me it is somewhat exaggerated, you lose more than you win.

And for 3 days that we are going to be in the world, I prefer to have fun.
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you. :)
User avatar
gambafeliz
Posts: 141
Joined: Friday 2nd September 2022 7:50pm
Location: I live in the same city as Picasso

Re: Opera and cry from the Gambas IDE

Post by gambafeliz »

The friend "BruceSteers" as always doing his day good for others.

Thanks for that information.
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you. :)
User avatar
BruceSteers
Posts: 1575
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

Re: Opera and cry from the Gambas IDE

Post by BruceSteers »

It will only play today , then play again in 40 days time (ascension day)
Then that's it till Christmas
If at first you don't succeed , try doing something differently.
BruceS
User avatar
thatbruce
Posts: 168
Joined: Saturday 4th September 2021 11:29pm

Re: Opera and cry from the Gambas IDE

Post by thatbruce »

Well, the only thing I dislike is that the sound grab is too short!
Another way for those who dislike it it to just replace the sound file with an empty file with the same name.
Have you ever noticed that software is never advertised using the adjective "spreadable".
User avatar
sjsepan
Posts: 68
Joined: Saturday 12th October 2019 10:11pm
Location: Leeper, PA, USA
Contact:

Re: Opera and cry from the Gambas IDE

Post by sjsepan »

An 'Easter Egg' on Easter; how novel :D
Steve
Post Reply