Jump to content

Manga Mark


BeBoP
 Share

Recommended Posts

Basicly this script(you do have to enter the values) keeps track of the volumes/chapters you've read. And if youre ever stuck as to where you left off reading last time a simple click of a button gives you a tool tip with all your volumes and chapters. I made this because i can't stick a book mark inside of the files on my computer xD, unlike a book I pysicly have in my hand. This isn't anything specail but I thought it might prove usefull.

(It acualizes now xD) pardon my spelling.

#include <Array.au3>
#include <GUIConstants.au3>
#Include <GuiCombo.au3>
opt("TrayMenuMode", 1)
; == GUI generated with Koda ==
HotKeySet("!m","MangaToolTip")
$var = IniReadSectionNames(@ScriptDir & "\manga.ini")
$Message = _ArrayToString ($var,"|",1,$var[0])
$TotalMangas = $var[0]
$MangaGUI = GUICreate("Manag Mark", 628, 122, 192, 125)
$Combo1 = GUICtrlCreateCombo("", 400, 24, 217, 21)
GUICtrlSetData(-1,"New manga|" & $Message,$var[1])
GUICtrlCreateLabel("Manga Name:", 328, 24, 71, 17)
GUICtrlCreateLabel("Manga Volume:", 328, 56, 78, 17)
GUICtrlCreateLabel("Manga Chapter:", 328, 88, 80, 17)
$Volume = IniRead ("manga.ini",$var[1],"Volume","N/A")
$Chapter = IniRead ("manga.ini",$var[1],"Chapter","N/A")
$Input1 = GUICtrlCreateInput($Volume, 408, 56, 65, 21, -1, $WS_EX_CLIENTEDGE)
$Input2 = GUICtrlCreateInput($Chapter, 408, 88, 65, 21, -1, $WS_EX_CLIENTEDGE)
$Save = GUICtrlCreateButton("Save", 552, 88, 65, 25)
$Button1 = GUICtrlCreateButton("Exit", 240, 88, 65, 25)
$Minimize = GUICtrlCreateButton("Minimize To Tray", 168, 48, 137, 25)
$Group1 = GUICtrlCreateGroup("Manga Volumes/Chapters...", 320, 0, 305, 121)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("Control/Info", 0, 0, 313, 121)
$Button2 = GUICtrlCreateButton("Display Manga Makrs", 168, 16, 137, 25)
GUICtrlCreateLabel("Mangas in program: " & $TotalMangas, 8, 24, 148, 17)
GUICtrlCreateGroup("", -99, -99, 1, 1)
GUISetState(@SW_SHOW)
MangaMark()
$Return = TrayCreateItem("Restore window")
TrayCreateItem("")
$TrayMark = TrayCreateItem("View Manga Marks")
TrayCreateItem("")
$Tray_Exit = TrayCreateItem("Exit")
TraySetState()
While 1
    $traymsg = TrayGetMsg()
    $msg = GuiGetMsg()
    Select
    Case $msg = $Combo1
$Volume = IniRead("manga.ini",GUICtrlRead($Combo1),"Volume","N/A")
        $Chapter = IniRead("manga.ini",GUICtrlRead($Combo1),"Chapter","N/A")
        GUICtrlSetData($Input1,$Volume) 
        GUICtrlSetData($Input2,$Chapter)    
    If  GUICtrlRead($Combo1) = "New manga" Then
                $Input = InputBox("New manga...","Enter new manga name","Name...")
            GUICtrlSetData($Combo1,$Input,$Input)
    EndIf
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1
        ExitLoop        
    Case $msg = $Minimize
        WinSetState($MangaGUI, "", @SW_HIDE)    
    Case $traymsg = $Return 
        WinSetState($MangaGUI, "", @SW_SHOW)
    Case $traymsg = $TrayMark
        MangaToolTip()
    Case $traymsg = $Tray_Exit
        ExitLoop    
    Case $msg = $Button2
        MangaToolTip()
    Case $msg = $Save
        _Save()
    Case Else
;;;;;;;;
    EndSelect
WEnd
Exit

Func MangaMark()
$var = IniReadSectionNames(@ScriptDir & "\manga.ini")
$Array = _ArrayCreate("")
For $i = 1 To $var[0]
    $Volume = IniRead ("manga.ini",$var[$i],"Volume","N/A")
$Chapter = IniRead ("manga.ini",$var[$i],"Chapter","N/A")
    $var[$i] = $var[$i] & " Volume: " & $Volume & " Chapter: " & $Chapter
    _ArrayAdd ( $Array, $var[$i] )
Next
Global $Message = _ArrayToString($Array,@LF,1,$var[0])
ControlSetText("Mangas Read", "", "Static1", $Message) 
EndFunc
Func MangaToolTip()
ToolTip($Message,0,0,"Manga Marks",1,1)
Sleep(3000)
ToolTip("")
EndFunc

Func _Save()
$_Save = MsgBox(36,"Warrning","Are you sure you want to save?",0)
    If $_Save = 6 Then 
    IniWrite("Manga.ini",GUICtrlRead($Combo1),"Volume",GUICtrlRead($Input1))
    IniWrite("Manga.ini",GUICtrlRead($Combo1),"Chapter",GUICtrlRead($Input2))
    EndIf
MangaMark()
EndFunc

The file included contains the source and complied version of the file and an ini that keeps track of the manga . (You probobly have to make an ini first or get the one I made i was too lazy to make the script make it in the begging)

Format of the ini:

[Manga Name]

Volume=#

Chapter=#

[Manga 2 Name]

Volume=#

Chapter=#

...

Edited by BeBoP
Link to comment
Share on other sites

Arg i just noticed the second post i dont know how it happend. Sorry >< ill try to delete it or something.

And thanks. (no its not my first more like something I pulled out of my... just didnt bother much with it does what i wanted it to do)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...