Page 1 of 1
Shortest PB application?
Posted: Sat Feb 23, 2013 4:52 am
by Lubos
Code: Select all
; Minireminder. pb - my shortest PB application
;Minireminder.exe is placed in Startup folder. Shortcut of miniREMINDER.txt will placed on the Desktop after first run of program.
If OpenFile(0, "miniREMINDER.txt") ; Opens an existing file or creates one, if it does not exist yet.
If Lof(0)>6 ; Only window with a text will appear. Editing of windows is done through Notepad.
MessageBeep_(48) ; System sounds must be allowed (default setting of Windows), if not - the program is mute.
RunProgram("miniREMINDER.txt") ; Name (including path) of the text file is optional only before compilation of program.
EndIf
EndIf
It looks stupid but serves well!

Re: Shortest PB application?
Posted: Mon Feb 25, 2013 4:49 pm
by Mohawk70
Shortest PB application ?

Re: Shortest PB application?
Posted: Mon Feb 25, 2013 5:07 pm
by IdeasVacuum
End

Re: Shortest PB application?
Posted: Mon Feb 25, 2013 5:25 pm
by Lubos
[quote="Mohawk70"]Shortest PB application ?
As a joke possible, but if it is to be a meaningful application, ie the application that provide some service?

Re: Shortest PB application?
Posted: Mon Feb 25, 2013 5:58 pm
by Kiffi
there was already an improvement (perhaps from MachineCode?). Now it's gone?
Code: Select all
If FileSize("miniREMINDER.txt") > 6
MessageBeep_(48)
RunProgram("miniREMINDER.txt")
EndIf
Greetings ... Kiffi
Re: Shortest PB application?
Posted: Mon Feb 25, 2013 7:15 pm
by applePi
Shortest PB application :
;

Re: Shortest PB application?
Posted: Mon Feb 25, 2013 7:31 pm
by Lubos
applePi wrote:Shortest PB application :
;

If accept this absurd play then shortes code is zero code:
Exe file has 4 KB.

Re: Shortest PB application?
Posted: Mon Feb 25, 2013 7:46 pm
by Lubos
Kiffi wrote:
Code: Select all
If FileSize("miniREMINDER.txt") > 6
MessageBeep_(48)
RunProgram("miniREMINDER.txt")
EndIf
Well Kiffi. If miniREMIDER.text is created in advance, you are right.
I accept with your solution.
Re: Shortest PB application?
Posted: Tue Feb 26, 2013 9:14 am
by Lubos
For pranksters to explain:
Even though I know the "yellow cards" and "sticky notes" I prefer my own application for short reminders for several years. I submitted my utility for discussion in connection with the completion of my book "Surprising Basic". This book is intended for complete novices. Czech version is available at :
http://people.fsv.cvut.cz/~svobodal/pure/index.htm
Re: Shortest PB application?
Posted: Tue Feb 26, 2013 9:49 am
by MachineCode
Kiffi wrote:there was already an improvement (perhaps from MachineCode?). Now it's gone?
Code: Select all
If FileSize("miniREMINDER.txt") > 6
MessageBeep_(48)
RunProgram("miniREMINDER.txt")
EndIf
Yes, I deleted what you posted (with FileSize) because of this:
lubos wrote:Shortcut of miniREMINDER.txt will placed on the Desktop after first run of program.
Using FileSize won't create the text on first run, so it doesn't pass the criteria.
