B4J Question Athena B4J ACM Module

ThRuST

Well-Known Member
Licensed User
As my project Athena is getting closer to be released, I need help from the community to add code to the B4J Code Module.
It will be Freely available with the project as an attraction point.
It also helps spreading the awareness of B4X for the world.


Please contribute with your code snippets.


Rules
  • Specify menu option name for your code to be stored
  • Nice and tidy code
  • Comments for each important section
  • Your code can be used for free
  • Include documentation description separately what the code does

The module will be released under the Creative Commons license terms, which is bundled within the module file itself.

Please note that any code you provide might be modified to meet the quality requirements for Athena.

* Each floating menu holds 30 programmable slots. Each database holds 4 sections that holds 120 rows.
As there's four SQLite databases for flexibility allowing a total of 480 programmable slots.

The floating menu can be programmed with

  • Empty
  • HTML format (from HTML editor)
  • Shortcuts to Applications
  • Shortcuts to Folders
  • Code from code view that can be autopasted at the cursor (strings)
  • Images (can be stored and pasted for each and any slot)
  • Weblink (standard www links to webpages)

* Modules can be imported/exported with a cover and a license file for Free or Commercial purposes.

* Modules can be changed from the main floating menu (mouse #3) which takes two seconds only.

FloatingMenu.JPG
 
Last edited:

ThRuST

Well-Known Member
Licensed User
Menu1.JPG DirectoryChooser.JPG

Initialization #1 Example - Timer

B4X:
' Declaration of Timer variable
Private myTimer As Timer

B4X:
' Timer Initialization
myTimer.Initialize("myTimer", 1000)

B4X:
' Timer Started
myTimer.Enabled = True

B4X:
' Timer Stopped
myTimer.Enabled = False

Initialization #2 FileChooser

B4X:
' FileChooser Declaration
Public fc As FileChooser

B4X:
    ' FileChooser Init
    fc.Initialize
    fc.Title="Browse and select a file"
    fc.SetExtensionFilter("Text files", Array As String ("*.txt"))
    fc.InitialFileName = ""
    fc.InitialDirectory = "C:\"
     
    ' Shows FileChooser
    Dim filename As String = fc.ShowOpen(MainForm)
 
    ' Store Path & Filename only if a file was selected
    If File.GetName(filename) <> "" Then
        Log("Path: " & File.GetFileParent(filename))     ' Path
        Log("Filename: " & File.GetName(filename)) ' Filename
    End If

' Initialization #2 - DirectoryChooser

B4X:
' DirectoryChooser Declaration
Public dc As DirectoryChooser

B4X:
    ' DirectoryChooser Init
    dc.Initialize
    dc.Title = "Please browse and select a folder"
    dc.InitialDirectory = "C:\"
 
    ' Shows DirectoryChooser
    Dim folder As String = dc.Show(MainForm)

    ' Only if the user selects a directory
    If folder <> "" Then
     
        ' A new folder was selected
        Log(folder) ' Folder
     
    End If
 
Last edited:
Upvote 0

ThRuST

Well-Known Member
Licensed User
I should make a tutorial (video) this weekend lol

Btw this is what my whiteboard looked at Chalmers University a few years ago - a mess :D
 
Upvote 0
Top