It is currently Sat Dec 14, 2019 2:14 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 51 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Sat Dec 06, 2014 11:49 pm 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
Keeper GSPOC (Great Steaming Pile Of Crap) source code project for PB 5.24.

I use this to keep track of serial numbers, logins, passwords, registration data etc using a simple EditorGadget interface that saves it as RTF data and it does what I need. It is the big mother version of SerialMuncher/Password muncher, but without the funny name:(

Still needs polishing, parts updating but it's getting there. Use the hell out of it and provide feedback (if you like) but it's made for my needs.

http://members.westnet.com.au/bangfeast/Files/Keeper.7z

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Sun Dec 07, 2014 2:36 am 
Offline
Addict
Addict
User avatar

Joined: Mon May 14, 2007 2:13 am
Posts: 979
Location: Darling River
I have downloaded it Fang, because I want to look at your sqLite coding, I hope that it is not too steamy. :)

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Sun Dec 07, 2014 2:53 am 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
electrochrisso wrote:
I have downloaded it Fang, because I want to look at your sqLite coding, I hope that it is not too steamy. :)


Oh, it's definately steamy ROFL!

Didn't you feel the Murray Darling, the Yarra and all the others lower their banks??? (All the steam production!!)

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Sun Dec 07, 2014 11:21 am 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
Just finished cleaning up variables, error messages, procedure names etc. Also added in the Import feature.

Only thing left to do is printing and figuring out a nice looking routine to fire up the buttons without having to have three graphics per action.

Can't think of anything else.

Same link as first message.

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Sun Dec 07, 2014 11:24 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Fri Apr 25, 2003 5:24 pm
Posts: 7581
Fangbeast, I just noticed "not Sydney" in your avatar.
I grew up in Sydney, my boy. What's wrong with it? :twisted:

_________________
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Sun Dec 07, 2014 7:32 pm 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
PB wrote:
Fangbeast, I just noticed "not Sydney" in your avatar.
I grew up in Sydney, my boy. What's wrong with it? :twisted:


Well, you young whippersnappers who think Sydney is the bee's knees and can call us "my boy" because you wear long pants and call them shorts don't realise that drinking your water all these years has fermented your brains:):):)

Melbourne water rules Oz!! And let's face it, Sydney girls are vain!! Our entertainment and transport is better too:):)

Damn, can't think of anything else to insult Sydneites because I am too tired. MUst stp these 1am coding sessions.

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Sun Dec 07, 2014 7:38 pm 
Offline
Addict
Addict
User avatar

Joined: Fri Jan 21, 2011 8:25 am
Posts: 1021
Location: 'stralia!
Well guys you might want to stop arguing, Perth tops anything anyways. :lol:

_________________
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Mon Dec 08, 2014 12:23 am 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
Shield wrote:
Well guys you might want to stop arguing, Perth tops anything anyways. :lol:


Perth?? What's that?? I had a biscuit called Perth once, tasted like Sydney water:):)

HEhehehehehe...

/me falls off the chair laughing

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Mon Dec 08, 2014 3:23 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 06, 2008 12:54 pm
Posts: 379
Location: Brisbane, Qld, Australia
Looks like a handy utility - but compilation failed. Then I noticed it was written for PB 5.24. Up here in Qld I'm using 5.31. Qld, of course, has far more interesting politicians, past and present, than any other state.

_________________
Mike
www.showcuesystems.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Mon Dec 08, 2014 5:09 am 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
Quote:
but compilation failed. Then I noticed it was written for PB 5.24. Up here in Qld I'm using 5.31.


I'll put 5.31 on and test to see what needs changing. if it's API, i'm more rooted than a constituent's bum at voting time!

Quote:
Qld, of course, has far more interesting politicians, past and present, than any other state.


Interesting????? What's the difference between a politician and a vampire??? One is a blood sucking, feral, pus ridden undead fiend from hell sucking the life out of us. The other is an innocent vampire that can't help its' nature!!

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Mon Dec 08, 2014 6:43 am 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
Ozzie, chuck this procedure into this directory, overwriting the old one. It was the

CreateXMLNode(RootXMLNode(*XmlTree)) code that needed an extra parameter to look like this to work under 5.31

CreateXMLNode(RootXMLNode(*XmlTree),"")

XIncludeFile "Modules\Export\_ExportDataItems.pbi" ; Export data data to a standard XML file

Code:
;==========================================================================================================================================================
; Export appointment data to a standard XML file
;==========================================================================================================================================================

Procedure ExportDataItems()

  ;------------------------------------------------------------------------------------------------
  ; Process the current table name and dump the contents to an XML file on disk
  ;------------------------------------------------------------------------------------------------
 
  QueryString.s = "SELECT * FROM Keeper"
 
  If DatabaseQuery(Program\DatabaseHandle,  QueryString.s)
   
    ;----------------------------------------------------------------------------------------------
    ; Process the next returned row
    ;----------------------------------------------------------------------------------------------
   
    While NextDatabaseRow(Program\DatabaseHandle)
     
      ;--------------------------------------------------------------------------------------------
      ; Have we created this XML tree already?
      ;--------------------------------------------------------------------------------------------
     
      If *XmlTree = 0
       
        *XmlTree = CreateXML(#PB_Any)                                                       ; Creates a new empty XML tree identified by the #XML number
       
        *RootXmlNode = CreateXMLNode(RootXMLNode(*XmlTree),"")                                 ; Creates a new XML node and inserts it into the given parent node.
       
        SetXMLNodeName(*RootXmlNode, #Program)                                              ; Changes the tagname of the given XML node (root in this case)
       
      EndIf
     
      ;--------------------------------------------------------------------------------------------
      ; Creates a new XML node and inserts it into main XML node of the tree.
      ;--------------------------------------------------------------------------------------------
     
      *RowNode = CreateXMLNode(MainXMLNode(*XmlTree),"")
     
      ;--------------------------------------------------------------------------------------------
      ; If the main node was created, dump all the columns using the column names as node names
      ;--------------------------------------------------------------------------------------------
     
      If *RowNode
       
        ;------------------------------------------------------------------------------------------
        ; Get the column names and write them first
        ;------------------------------------------------------------------------------------------
       
        NumberOfColumns.i = DatabaseColumns(Program\DatabaseHandle)
       
        ;------------------------------------------------------------------------------------------
        ; Iterate through the columns
        ;------------------------------------------------------------------------------------------
       
        For ColumnNamesLoop.i = 0 To NumberOfColumns.i -1
         
          CurrentColumn.s = DatabaseColumnName(Program\DatabaseHandle, ColumnNamesLoop.i)
         
          *ColumnNode = CreateXMLNode(*RowNode,"")                                             ; Creates a new XML node and inserts it into main XML node of the tree.
         
          SetXMLNodeText(*ColumnNode, TextToXml(GetDatabaseString(Program\DatabaseHandle,  ColumnNamesLoop.i)))
         
        Next                                                                                ; Next column
       
        ;------------------------------------------------------------------------------------------
        ; Main node wasn't created, exit out of this procedure
        ;------------------------------------------------------------------------------------------
       
      Else
       
        SetInfoBarArea("Headings",  "Error",  "Could not create the export data file.")
       
        ProcedureReturn
       
      EndIf
     
      ;--------------------------------------------------------------------------------------------
      ;
      ;--------------------------------------------------------------------------------------------
     
    Wend
   
    ;----------------------------------------------------------------------------------------------
    ;
    ;----------------------------------------------------------------------------------------------
   
    FinishDatabaseQuery(Program\DatabaseHandle)
   
    ;----------------------------------------------------------------------------------------------
    ;
    ;----------------------------------------------------------------------------------------------
   
    If *XmlTree
     
      FormatXML(*XmlTree, #PB_XML_ReFormat)
     
      SaveXML(*XmlTree, Program\TemporaryDirectory + #Program + "_Export.xml")
     
      FreeXML(*XmlTree)
     
      SetInfoBarArea("Headings",  "Info",  "Data exported to " + Program\TemporaryDirectory)
     
    EndIf
   
    ;----------------------------------------------------------------------------------------------
    ; The database query has failed for some reason
    ;----------------------------------------------------------------------------------------------
   
  Else
   
    SetInfoBarArea("Headings",  "Error",  "The database query failed or was empty. " + DatabaseError())
   
  EndIf
 
  ;------------------------------------------------------------------------------------------------
  ;
  ;------------------------------------------------------------------------------------------------
 
  TextFileId.i = CreateFile(#PB_Any, Program\TemporaryDirectory + #Program + "_Export.txt")
 
  ;------------------------------------------------------------------------------------------------
  ;
  ;------------------------------------------------------------------------------------------------
 
  If TextFileId.i <> 0
   
    ;----------------------------------------------------------------------------------------------
    ;
    ;----------------------------------------------------------------------------------------------
   
    If DatabaseQuery(Program\DatabaseHandle,  "SELECT Title, Information FROM Keeper")
     
      While NextDatabaseRow(Program\DatabaseHandle)
       
        TitleString.s       = KillQuote(GetDatabaseString(Program\DatabaseHandle, 0))
       
        InformationString.s = KillQuote(GetDatabaseString(Program\DatabaseHandle, 1))
       
        WriteStringN(TextFileId.i, "Title: " + TitleString.s)
       
        WriteStringN(TextFileId.i, "")
       
        WriteStringN(TextFileId.i, "Info:  " + InformationString.s)
       
        WriteStringN(TextFileId.i, "")
       
        WriteStringN(TextFileId.i, "")
       
        WriteStringN(TextFileId.i, "----------------------------------------------------------------------------------------------------")
       
      Wend
     
      FinishDatabaseQuery(Program\DatabaseHandle)
     
      MessageRequester("Export finished", "Keeper XML data and text files have been saved in this directory:" + Chr(10) + Chr(13) + Chr(10) + Chr(13) + Program\TemporaryDirectory)
    EndIf
   
    ;----------------------------------------------------------------------------------------------
    ;
    ;----------------------------------------------------------------------------------------------
   
    CloseFile(TextFileId) 
   
    ;----------------------------------------------------------------------------------------------
    ;
    ;----------------------------------------------------------------------------------------------
   
  EndIf
 
  ;------------------------------------------------------------------------------------------------
  ;
  ;------------------------------------------------------------------------------------------------

EndProcedure


_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Mon Dec 08, 2014 11:36 pm 
Offline
Addict
Addict
User avatar

Joined: Mon May 14, 2007 2:13 am
Posts: 979
Location: Darling River
Fangbeast wrote:
electrochrisso wrote:
I have downloaded it Fang, because I want to look at your sqLite coding, I hope that it is not too steamy. :)


Oh, it's definately steamy ROFL!

Didn't you feel the Murray Darling, the Yarra and all the others lower their banks??? (All the steam production!!)

Now I am too scared to look, the irrigation is already lowering the level too much. :lol:

_________________
PureBasic Rocks! Even More! And More!
PureBasic 5, Now We're Really Rockin!


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Tue Dec 09, 2014 3:29 am 
Offline
Enthusiast
Enthusiast

Joined: Sun Apr 06, 2008 12:54 pm
Posts: 379
Location: Brisbane, Qld, Australia
Compiles OK now under 5.31. Looks good - you've put a lot of work into this, so well done! Can't get it to save anything yet, but I'll follow the code to see what's going on, when I get some time.

_________________
Mike
www.showcuesystems.com


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Tue Dec 09, 2014 6:11 am 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
Quote:
Can't get it to save anything yet, but I'll follow the code to see what's going on, when I get some time.


Just tested it here under pb 5.23 to see how far back I could go, created a dummy record and it saved fine.

There will be a new build uploaded tonight.

1. Simple web gadget based printing added.
2. Print window has PrintNow and Preview job buttons.
3. The dratted control bar now hides the way it was supposed to, and saves state.

Problems:

1. Can't seem to get the password window to set focus to the password field, haven't figured out why yet.

2. Program is not in unicode mode because I had too much trouble when I converted my old database to a uncode one merely by importing it and I don't feel like sitting there for the next six months trying to figure it out.

That's all I can think of for now.

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
 Post subject: Re: Keeper GSPOC (simplistic info manager. Source project
PostPosted: Tue Dec 09, 2014 12:15 pm 
Offline
PureBasic Protozoa
PureBasic Protozoa
User avatar

Joined: Fri Apr 25, 2003 3:08 pm
Posts: 4507
Location: Not Sydney!!! (Bad water, no goats)
Updated source project (with primitive printing) uploaded. Link in first post.

_________________
Amateur Radio, D-STAR/VK3HAF


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 51 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye