Lobsterclock

Share your advanced PureBasic knowledge/code with the community.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Lobsterclock

Post by Fangbeast »

I found a theme for my Huawei mobile phone that had some cartooney digits in it that I used to make a flippin' huge clock for my old eyes.

Nothing special but I thought somebody might want it and improve it. Works fine here. Grab your own cartoon numbers and try it, I don't have a web site any more. (or ignore it heheheh)

Code: Select all

; Program windows, declarations and personal variables

UsePNGImageDecoder()

Define EventID, MenuID, GadgetID, WindowID

Enumeration 1
  #Window_Lobsterclock
EndEnumeration

#WindowIndex = #PB_Compiler_EnumerationValue

Enumeration 1
  ; Window_Lobsterclock
  #Gadget_Lobsterclock_hh0
  #Gadget_Lobsterclock_hh1
  #Gadget_Lobsterclock_Colon1
  #Gadget_Lobsterclock_mm0
  #Gadget_Lobsterclock_mm1
  #Gadget_Lobsterclock_Colon2
  #Gadget_Lobsterclock_ss0
  #Gadget_Lobsterclock_ss1
EndEnumeration

#GadgetIndex = #PB_Compiler_EnumerationValue

Enumeration 1
  #Image_Lobsterclock_hh0
  #Image_Lobsterclock_hh1
  #Image_Lobsterclock_Colon1
  #Image_Lobsterclock_mm0
  #Image_Lobsterclock_mm1
  #Image_Lobsterclock_Colon2
  #Image_Lobsterclock_ss0
  #Image_Lobsterclock_ss1
EndEnumeration

#ImageIndex = #PB_Compiler_EnumerationValue

CatchImage(#Image_Lobsterclock_hh0,     ?_OPT_Lobsterclock_hh0)
CatchImage(#Image_Lobsterclock_hh1,     ?_OPT_Lobsterclock_hh0)
CatchImage(#Image_Lobsterclock_Colon1,  ?_OPT_Lobsterclock_Colon1)
CatchImage(#Image_Lobsterclock_mm0,     ?_OPT_Lobsterclock_hh0)
CatchImage(#Image_Lobsterclock_mm1,     ?_OPT_Lobsterclock_hh0)
CatchImage(#Image_Lobsterclock_Colon2,  ?_OPT_Lobsterclock_Colon1)
CatchImage(#Image_Lobsterclock_ss0,     ?_OPT_Lobsterclock_hh0)
CatchImage(#Image_Lobsterclock_ss1,     ?_OPT_Lobsterclock_hh0)

DataSection
  _OPT_Lobsterclock_hh0:    : IncludeBinary "Images\Blank.png"
  _OPT_Lobsterclock_Colon1: : IncludeBinary "Images\Colon.png"
EndDataSection

Procedure.i Window_Lobsterclock()
  If OpenWindow(#Window_Lobsterclock, 69, 81, 847, 194, "Lobsterclock", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_Invisible)
      ImageGadget(#Gadget_Lobsterclock_hh0, 5, 5, 102, 180, ImageID(#Image_Lobsterclock_hh0))
      ResizeGadget(#Gadget_Lobsterclock_hh0, 5, 5, 102, 180)
      ResizeImage(#Image_Lobsterclock_hh0, 102, 180)
      SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_Lobsterclock_hh0))
      ImageGadget(#Gadget_Lobsterclock_hh1, 115, 5, 102, 180, ImageID(#Image_Lobsterclock_hh1))
      ResizeGadget(#Gadget_Lobsterclock_hh1, 115, 5, 102, 180)
      ResizeImage(#Image_Lobsterclock_hh1, 102, 180)
      SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_Lobsterclock_hh1))
      ImageGadget(#Gadget_Lobsterclock_Colon1, 225, 5, 84, 180, ImageID(#Image_Lobsterclock_Colon1))
      ResizeGadget(#Gadget_Lobsterclock_Colon1, 225, 5, 84, 180)
      ResizeImage(#Image_Lobsterclock_Colon1, 84, 180)
      SetGadgetState(#Gadget_Lobsterclock_Colon1, ImageID(#Image_Lobsterclock_Colon1))
      ImageGadget(#Gadget_Lobsterclock_mm0, 315, 5, 102, 180, ImageID(#Image_Lobsterclock_mm0))
      ResizeGadget(#Gadget_Lobsterclock_mm0, 315, 5, 102, 180)
      ResizeImage(#Image_Lobsterclock_mm0, 102, 180)
      SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_Lobsterclock_mm0))
      ImageGadget(#Gadget_Lobsterclock_mm1, 425, 5, 102, 180, ImageID(#Image_Lobsterclock_mm1))
      ResizeGadget(#Gadget_Lobsterclock_mm1, 425, 5, 102, 180)
      ResizeImage(#Image_Lobsterclock_mm1, 102, 180)
      SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_Lobsterclock_mm1))
      ImageGadget(#Gadget_Lobsterclock_Colon2, 535, 5, 84, 180, ImageID(#Image_Lobsterclock_Colon2))
      ResizeGadget(#Gadget_Lobsterclock_Colon2, 535, 5, 84, 180)
      ResizeImage(#Image_Lobsterclock_Colon2, 84, 180)
      SetGadgetState(#Gadget_Lobsterclock_Colon2, ImageID(#Image_Lobsterclock_Colon2))
      ImageGadget(#Gadget_Lobsterclock_ss0, 625, 5, 102, 180, ImageID(#Image_Lobsterclock_ss0))
      ResizeGadget(#Gadget_Lobsterclock_ss0, 625, 5, 102, 180)
      ResizeImage(#Image_Lobsterclock_ss0, 102, 180)
      SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_Lobsterclock_ss0))
      ImageGadget(#Gadget_Lobsterclock_ss1, 735, 5, 102, 180, ImageID(#Image_Lobsterclock_ss1))
      ResizeGadget(#Gadget_Lobsterclock_ss1, 735, 5, 102, 180)
      ResizeImage(#Image_Lobsterclock_ss1, 102, 180)
      SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_Lobsterclock_ss1))
      HideWindow(#Window_Lobsterclock, 0)
    ProcedureReturn WindowID(#Window_Lobsterclock)
  EndIf
EndProcedure

; All program declarations

Declare   Clockgadget(ObjectHandle.i, Message.i, EventNumber.i, TimePeriod.i)                      ; 

; Standard program data structure

#TitleBarClockTimer        = 624                                                                    ; Title bar clock timer event

; Standard program data structure

Structure ProgramData
  QuitValue.i                                                                                       ; Program quit value
  CurrentDate.s                                                                                     ; The current date minus the time component
EndStructure

; Global variables

Global Program.ProgramData                                                                          ; 

; Date and time testing, date display on title bar

Program\CurrentDate         = FormatDate("%dd/%mm/%yyyy", Date())                                   ; Get the current system date without the time component

; Setup day and month literal names

Global Dim NameOfDay.s(7)                                                                           ; Fill an array with the names of the days (Terry Hough I think)

  NameOfDay(0)      = "Sunday"
  NameOfDay(1)      = "Monday"
  NameOfDay(2)      = "Tuesday"
  NameOfDay(3)      = "Wednesday"
  NameOfDay(4)      = "Thursday"
  NameOfDay(5)      = "Friday"
  NameOfDay(6)      = "Saturday"

Global Dim DaysPerMonth(12)                                                                         ; Fill an array on how many days per month there are

  For X = 0 To 11     
    DaysPerMonth(X) = 31 
  Next

  DaysPerMonth(1)   = 28
  DaysPerMonth(3)   = 30
  DaysPerMonth(5)   = 30
  DaysPerMonth(8)   = 30
  DaysPerMonth(10)  = 30

Global Dim NameOfMonth.s(12)                                                                        ; Fill an array with the names of the months

  NameOfMonth(0)    = "January"
  NameOfMonth(1)    = "February"
  NameOfMonth(2)    = "March"
  NameOfMonth(3)    = "April"
  NameOfMonth(4)    = "May"
  NameOfMonth(5)    = "June"
  NameOfMonth(6)    = "July"
  NameOfMonth(7)    = "August"
  NameOfMonth(8)    = "September"
  NameOfMonth(9)    = "October"
  NameOfMonth(10)   = "November"
  NameOfMonth(11)   = "December"

Global Dim Years.s(19)                                                                              ; Fill an array with the years

  Years(0)          = "2002"
  Years(1)          = "2003"
  Years(2)          = "2004"
  Years(3)          = "2005"
  Years(4)          = "2006" 
  Years(5)          = "2007"
  Years(6)          = "2008"
  Years(7)          = "2009"
  Years(8)          = "2010"
  Years(9)          = "2011"
  Years(10)         = "2012"
  Years(11)         = "2013"
  Years(12)         = "2014"
  Years(13)         = "2015"
  Years(14)         = "2016"
  Years(15)         = "2017"
  Years(16)         = "2018"
  Years(17)         = "2019"
  Years(18)         = "2020"
  
; Extra image constants, follows on from the visual designer created code

Enumeration #ImageIndex                                                                            ; Follow on from visual designer created constants
  #Image_0                                                                                          ;                  
  #Image_1                                                                                          ;                        
  #Image_2                                                                                          ;                       
  #Image_3                                                                                          ;                  
  #Image_4                                                                                          ;                      
  #Image_5                                                                                          ;                     
  #Image_6                                                                                          ;                     
  #Image_7                                                                                          ;                   
  #Image_8                                                                                          ;                  
  #Image_9                                                                                          ;                          
EndEnumeration

; Load images into memory from the datasection references, follows on from the visual designer created code

CatchImage(#Image_0,                            ?_Image_0)                                          ; 
CatchImage(#Image_1,                            ?_Image_1)                                          ; 
CatchImage(#Image_2,                            ?_Image_2)                                          ;                 
CatchImage(#Image_3,                            ?_Image_3)                                          ; 
CatchImage(#Image_4,                            ?_Image_4)                                          ; 
CatchImage(#Image_5,                            ?_Image_5)                                          ; 
CatchImage(#Image_6,                            ?_Image_6)                                          ;                    
CatchImage(#Image_7,                            ?_Image_7)                                          ;                 
CatchImage(#Image_8,                            ?_Image_8)                                          ; 
CatchImage(#Image_9,                            ?_Image_9)                                          ; 

; Datasection references, follows on from the visual designer created code

DataSection
  _Image_0:                                 : IncludeBinary  "Images\0.png"                        ; 
  _Image_1:                                 : IncludeBinary  "Images\1.png"                        ; 
  _Image_2:                                 : IncludeBinary  "Images\2.png"                        ; 
  _Image_3:                                 : IncludeBinary  "Images\3.png"                        ; 
  _Image_4:                                 : IncludeBinary  "Images\4.png"                        ; 
  _Image_5:                                 : IncludeBinary  "Images\5.png"                        ; 
  _Image_6:                                 : IncludeBinary  "Images\6.png"                        ; 
  _Image_7:                                 : IncludeBinary  "Images\7.png"                        ; 
  _Image_8:                                 : IncludeBinary  "Images\8.png"                        ; 
  _Image_9:                                 : IncludeBinary  "Images\9.png"                        ; 
EndDataSection

; All my procedures

; Run an asynchronous clock in the window title bar

Procedure Clockgadget(ObjectHandle.i, Message.i, EventNumber.i, TimePeriod.i) ; (Baron Baldrick code)
  
  Select EventNumber.i
    
    ; User selected timer event number
    
    Case #TitleBarClockTimer
    
      LocalTimeDate.i = Date()
      
      CurrentDate.s = NameOfDay(DayOfWeek(LocalTimeDate.i))    + " "
      CurrentDate.s + Str(Day(LocalTimeDate.i))                + " "
      CurrentDate.s + NameOfMonth(Month(LocalTimeDate.i) - 1)  + " "
      CurrentDate.s + Str(Year(LocalTimeDate.i))
      
      HourVal.i   =   Hour(LocalTimeDate.i) 
      MinuteVal.i = Minute(LocalTimeDate.i)
      SecondVal.i = Second(LocalTimeDate.i)
      Hour12.i = HourVal.i % 12   ; Added to fix midnight 0 hour fault
      
      If Not Hour12.i            ;= 12 changed see above
        Hour12.i = 12             ; HourVal ; 0 will now display as 12 
        ;     Else  ; removed, see above
        ;       Hour12.i = HourVal.i % 12
      EndIf
      
      If HourVal.i > 11
        Suffix.s = " PM"
      Else
        Suffix.s = " AM"
      EndIf
      
      TimeString.s = "(12)  " + Str(Hour12.i) + ":" + RSet(Str(MinuteVal.i), 2, "0") + ":" + RSet(Str(SecondVal.i), 2, "0") + Suffix.s + ",  "
      TimeString.s + "(24)  " + FormatDate("%hh:%ii:%ss", LocalTimeDate.i)
      
      ; TimeString.s + "(UTC)  " + FormatDate("%hh:%ii:%ss", UtcTime)          ; Show UTC time
      
      ; SetWindowTitle(#Window_Keeper, #Fish  + 
      ; #Basename                             + 
      ; #Version                              + 
      ; Program\CompileCounters               + 
      ; ", Date: "                            + 
      ; CurrentDate.s                         + 
      ; ", Time: "                            + 
      ; TimeString.s                          + 
      ; ", Shortcuts: "                       + 
      ; GetShortCutText(#ShortcutKeys_KeyboardShortcuts))
      
      Hours.s     = Str(Hour12.i)
      Minutes.s   = RSet(Str(MinuteVal.i), 2, "0")
      Seconds.s   = RSet(Str(SecondVal.i), 2, "0")
      
      Select Left(Hours.s, 1)
        Case "0"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_0))
        Case "1"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_1))
        Case "2"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_2))
        Case "3"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_3))
        Case "4"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_4))
        Case "5"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_5))
        Case "6"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_6))
        Case "7"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_7))
        Case "8"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_8))
        Case "9"  : SetGadgetState(#Gadget_Lobsterclock_hh0, ImageID(#Image_9))
      EndSelect
      
      Select Right(Hours.s, 1)
        Case "0"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_0))
        Case "1"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_1))
        Case "2"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_2))
        Case "3"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_3))
        Case "4"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_4))
        Case "5"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_5))
        Case "6"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_6))
        Case "7"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_7))
        Case "8"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_8))
        Case "9"  : SetGadgetState(#Gadget_Lobsterclock_hh1, ImageID(#Image_9))
      EndSelect
      
      Select Left(Minutes.s, 1)
        Case "0"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_0))
        Case "1"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_1))
        Case "2"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_2))
        Case "3"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_3))
        Case "4"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_4))
        Case "5"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_5))
        Case "6"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_6))
        Case "7"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_7))
        Case "8"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_8))
        Case "9"  : SetGadgetState(#Gadget_Lobsterclock_mm0, ImageID(#Image_9))
      EndSelect
      
      Select Right(Minutes.s, 1)
        Case "0"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_0))
        Case "1"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_1))
        Case "2"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_2))
        Case "3"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_3))
        Case "4"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_4))
        Case "5"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_5))
        Case "6"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_6))
        Case "7"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_7))
        Case "8"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_8))
        Case "9"  : SetGadgetState(#Gadget_Lobsterclock_mm1, ImageID(#Image_9))
      EndSelect
      
      Select Left(Seconds.s, 1)
        Case "0"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_0))
        Case "1"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_1))
        Case "2"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_2))
        Case "3"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_3))
        Case "4"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_4))
        Case "5"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_5))
        Case "6"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_6))
        Case "7"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_7))
        Case "8"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_8))
        Case "9"  : SetGadgetState(#Gadget_Lobsterclock_ss0, ImageID(#Image_9))
      EndSelect
      
      Select Right(Seconds.s, 1)
        Case "0"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_0))
        Case "1"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_1))
        Case "2"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_2))
        Case "3"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_3))
        Case "4"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_4))
        Case "5"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_5))
        Case "6"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_6))
        Case "7"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_7))
        Case "8"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_8))
        Case "9"  : SetGadgetState(#Gadget_Lobsterclock_ss1, ImageID(#Image_9))
      EndSelect
      
  EndSelect
  
EndProcedure

; Main program event handler

If Window_Lobsterclock()
  Define quitLobsterclock = #False
  ; Create the permanent timer
  SetTimer_(WindowID(#Window_Lobsterclock), #TitleBarClockTimer, 1000, @Clockgadget())    ; 1000 = 1 second  
  ; 
  Repeat
    EventID  = WaitWindowEvent()
    MenuID   = EventMenu()
    GadgetID = EventGadget()
    WindowID = EventWindow()
    Select EventID
      Case #PB_Event_CloseWindow
        Select WindowID
          Case #Window_Lobsterclock : quitLobsterclock = #True
        EndSelect
    EndSelect
  Until quitLobsterclock
  CloseWindow(#Window_Lobsterclock)
EndIf
End

Amateur Radio, D-STAR/VK3HAF
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Lobsterclock

Post by Lunasole »

Hi. It doesn't work because of missing those included images
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Lobsterclock

Post by Fangbeast »

As above "Grab your own cartoon numbers and try it, I don't have a web site any more."

Do you know of a good utility to convert images to hex to store in the datasection?

Tried a couple in the forums years ago but they had bugs and I had other things to do.
Amateur Radio, D-STAR/VK3HAF
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Lobsterclock

Post by IdeasVacuum »

Well, not improved it but I have made it look a lot worst than intended with these boring images:
Images.zip :shock:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Lobsterclock

Post by IdeasVacuum »

Hi Fangles

ts-soft made an excellent drag & drop image-to-Data Section app. Works well with all PB versions I have used, including PB5.61:
BIN2DATA_PB.zip
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Lobsterclock

Post by Fangbeast »

IdeasVacuum wrote:Well, not improved it but I have made it look a lot worst than intended with these boring images:
Images.zip :shock:
It was only quick and crappy code for a humongous clock for my old eyes. Nothing special. And I thought programmers were able to find their own images (very evil grin)
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Lobsterclock

Post by Fangbeast »

IdeasVacuum wrote:Hi Fangles

ts-soft made an excellent drag & drop image-to-Data Section app. Works well with all PB versions I have used, including PB5.61:
BIN2DATA_PB.zip
Thanks, I will try that. Some of the stuff I tried in the past had bugs and as I didn't need them, I never reported them.

Fingers crossed:)
Amateur Radio, D-STAR/VK3HAF
AAT
Enthusiast
Enthusiast
Posts: 256
Joined: Sun Jun 15, 2008 3:13 am
Location: Russia

Re: Lobsterclock

Post by AAT »

Hi, Fangbeast, Thanks for your clock!

I think, it's not very good to see 99:15:34 insted of 9:15:34 :)
So, i replaced

Code: Select all

;      Hours.s     = Str(Hour12.i)
      Hours.s     = RSet(Str(Hour12.i), 2, " ")
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Lobsterclock

Post by Fangbeast »

AAT wrote:Hi, Fangbeast, Thanks for your clock!

I think, it's not very good to see 99:15:34 insted of 9:15:34 :)
So, i replaced

Code: Select all

;      Hours.s     = Str(Hour12.i)
      Hours.s     = RSet(Str(Hour12.i), 2, " ")
I know AAT. That was the first comment from my wife last night as she watched over my shoulder so I fixed it for myself:):)

Yoy must admit, it's pretty crappy code but can't do much at the moment till my ribs heal:)
Last edited by Fangbeast on Sat Sep 16, 2017 4:27 am, edited 1 time in total.
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Lobsterclock

Post by Fangbeast »

IdeasVacuum wrote:Hi Fangles

ts-soft made an excellent drag & drop image-to-Data Section app. Works well with all PB versions I have used, including PB5.61:
BIN2DATA_PB.zip
Ahh, just tried it. The EXE version doesn't copy labels to the clipboard and only does one resource at a time. The 'Show' function includes the label.

I seem to remember RASHAD had something like this somewhere once that did multiple resources but I didn't need it so didn't use it either.
Amateur Radio, D-STAR/VK3HAF
AAT
Enthusiast
Enthusiast
Posts: 256
Joined: Sun Jun 15, 2008 3:13 am
Location: Russia

Re: Lobsterclock

Post by AAT »

Fangbeast, get well soon!
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Lobsterclock

Post by Lunasole »

Fangbeast wrote: As above "Grab your own cartoon numbers and try it, I don't have a web site any more."
Damn, I've missed your notify about images. Seems I'm becoming too old for all this ^^
Fangbeast wrote: Do you know of a good utility to convert images to hex to store in the datasection?
You can try that my madness: http://www.purebasic.fr/english/viewtop ... 27&t=65696
It's not made to store images, but it can pack whole sources with included images to post on forum (if size is reasonable of course)
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Lobsterclock

Post by Fangbeast »

AAT wrote:Fangbeast, get well soon!
taken 4 weeks so far, another 3 to go i've been told. Remind me never to fall at a railway station again. I can't seem to code with cracked ribs.

Some smartass will probably popup and say that I never could. (Shaddap Bericko!!)
Amateur Radio, D-STAR/VK3HAF
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Lobsterclock

Post by Fangbeast »

Damn, I've missed your notify about images. Seems I'm becoming too old for all this ^^
I'm way older than you and I look like a dessicated sheep's testicles to boot!!!

When I finish healing, i'll put reworked gui to RASHAD's converter but I also suffer from a lot of boredom and depression so it might be a while. Besides, my code is crap anyway:):)
Amateur Radio, D-STAR/VK3HAF
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Lobsterclock

Post by Lunasole »

Fangbeast wrote: When I finish healing, i'll put reworked gui to RASHAD's converter but I also suffer from a lot of boredom and depression so it might be a while. Besides, my code is crap anyway:):)
Well for me depression is fine state. I love it near the same as anything else (or maybe even more, because it allows to review many things from different point, which sometimes allows to be closer to truth. it can even bring great inspiration, and so on)
+ anyway it's impossible to be positive happy fool all the days

Just too long and too strong depression becomes a problem. When just doing nothing all the days and having "battery low" most of the time.
I suffered from such and generally was tired of that predictable reality and even more predictable people, and lot of such things.
From 2015 I tried smoking marijuana and it decreased depression a lot.
However to this autumn I really dislike that plant (mostly because I was smoking it really hard ^^ which caused several problems. though nothing irreversible), but you can try. Chances are high it will help, also for a list of reasons it's better than sit on antidepressant drugs.

What about code, while it works it's probably not a total crap^^
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Post Reply