Sign in to follow this  
Followers 0
thenewkid

a littie scritp to take notes with

4 posts in this topic

ive make a littie script that i use every day it can be very usefull all feedback is wellcome and new ideas will be nice i cant think of any

enjoy

Opt("traymenumode",1)
Opt("WinTitleMatchMode", 2)
#include <GuiConstants.au3>

;icon
$shownotes = TrayCreateItem("Show notes")
$exittray = TrayCreateItem("exit")


; main form
$mygui = GuiCreate("my note taker", 119, 20,0,0,$WS_POPUPWINDOW,$WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
$Input_1 = GuiCtrlCreateInput("", 0, 0, 60, 20)
$Button_2 = GuiCtrlCreateButton("make note", 60, 0, 60, 20)
GuiSetState(@SW_HIDE)

; notes form
$Form_notes = GUICreate("", 677, 476, 193, 115,$WS_POPUPWINDOW,$WS_EX_TOOLWINDOW  );+ $WS_EX_TOPMOST)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 673, 449, $ES_READONLY + $ES_WANTRETURN)
$Button_Hide = GUICtrlCreateButton("Hide notes", 0, 456, 75, 17, 0)
$Button_Save = GUICtrlCreateButton("save notes", 600, 456, 75, 17, 0)
$Button_Del = GUICtrlCreateButton("Delete notes", 288, 456, 75, 17, 0)
GuiSetState(@SW_HIDE)

While 1
    ; THE LOOP
$pos = MouseGetPos()
If $pos[0] <= "100" And $pos[1] <= "30" Then
    GUISetState(@SW_SHOW, $mygui)
Else
    GUISetState(@SW_HIDE, $mygui)
EndIf
    
    $msg = GuiGetMsg()
    $msgtray = TrayGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        _Exit()
    Case $msg = $Button_2
        setnotes()
    Case $msgtray = $exittray
        _exit()
    Case $msgtray = $shownotes
        Shownotes()
    Case $msg = $Button_Hide
        GUISetState(@SW_HIDE, $Form_notes)
    Case $msg = $Button_Del
$iMsgBoxAnswer = MsgBox(308,"My note taker","Are you sure you want to delete your notes")
Select
    Case $iMsgBoxAnswer = 6 ;Yes
        GUICtrlSetData($Edit1,"")
    Case $iMsgBoxAnswer = 7 ;No
EndSelect
    Case $msg = $Button_Save
    $read = GUICtrlRead($Edit1)
    FileWrite("My notes", $read)
    MsgBox(0,"my note taker","notes saved")
    EndSelect
WEnd
_exit()

Func _exit()
        $read = GUICtrlRead($Edit1)
    FileWrite("My notes", $read)
    MsgBox(0,"my note taker","notes saved")
    Exit
EndFunc

Func Shownotes()
    MsgBox(0,"my note taker","Your notes are")
    GUISetState(@SW_SHOW, $Form_notes)
EndFunc

Func setnotes()
    $note = GUICtrlRead($Input_1)
    $oldnotes = GUICtrlRead($Edit1)
    GUICtrlSetData($Edit1, $oldnotes & $note & @CRLF)
    GUICtrlSetData($Input_1,"")
    MsgBox(0,"my note taker","Note added")
EndFunc

some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

It doesn't work... You made the edit box read only and it doesn't even read from the saved file...

Edited by idusy

Share this post


Link to post
Share on other sites

when you run the script move the mouse to the topleft conner thats how you add notes

and ill make it read from the saved file later today after i finshed one of my other scripts


some of my scripts check them out and give feedback so i can learn from them :)autoclicker a autoclickernote taker a script to take notes with

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Now it should work fine!:rolleyes:

Opt("traymenumode",1)
Opt("WinTitleMatchMode", 2)
#include <GuiConstants.au3>

;icon
$shownotes = TrayCreateItem("Show notes")
$exittray = TrayCreateItem("exit")


; main form
$mygui = GuiCreate("my note taker", 119, 20,0,0,$WS_POPUPWINDOW,$WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
$Input_1 = GuiCtrlCreateInput("", 0, 0, 60, 20)
$Button_2 = GuiCtrlCreateButton("make note", 60, 0, 60, 20)
GuiSetState(@SW_HIDE)

; notes form
$Form_notes = GUICreate("", 677, 476, 193, 115,$WS_POPUPWINDOW,$WS_EX_TOOLWINDOW  );+ $WS_EX_TOPMOST)
$Edit1 = GUICtrlCreateEdit("", 0, 0, 673, 449, $ES_WANTRETURN)
$Button_Hide = GUICtrlCreateButton("Hide notes", 0, 456, 75, 17, 0)
$Button_Save = GUICtrlCreateButton("save notes", 600, 456, 75, 17, 0)
$Button_Del = GUICtrlCreateButton("Delete notes", 288, 456, 75, 17, 0)
GuiSetState(@SW_HIDE)

While 1
    ; THE LOOP
$pos = MouseGetPos()
If $pos[0] <= "100" And $pos[1] <= "30" Then
    GUISetState(@SW_SHOW, $mygui)
Else
    GUISetState(@SW_HIDE, $mygui)
EndIf
    
    $msg = GuiGetMsg()
    $msgtray = TrayGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        _Exit()
    Case $msg = $Button_2
        setnotes()
    Case $msgtray = $exittray
        _exit()
    Case $msgtray = $shownotes
        Shownotes()
    Case $msg = $Button_Hide
        GUISetState(@SW_HIDE, $Form_notes)
    Case $msg = $Button_Del
$iMsgBoxAnswer = MsgBox(308,"My note taker","Are you sure you want to delete your notes")
Select
    Case $iMsgBoxAnswer = 6 ;Yes
        GUICtrlSetData($Edit1,"")
    Case $iMsgBoxAnswer = 7 ;No
EndSelect
    Case $msg = $Button_Save
    $read = GUICtrlRead($Edit1)
    FileWrite("My notes", $read)
    MsgBox(0,"my note taker","notes saved")
    EndSelect
WEnd
_exit()

Func _exit()
        $read = GUICtrlRead($Edit1)
    FileWrite("My notes", $read)
    MsgBox(0,"my note taker","notes saved")
    Exit
EndFunc

Func Shownotes()
    MsgBox(0,"my note taker","Your notes are")
    GUISetState(@SW_SHOW, $Form_notes)
EndFunc

Func setnotes()
    $note = GUICtrlRead($Input_1)
    $oldnotes = GUICtrlRead($Edit1)
    GUICtrlSetData($Edit1, $oldnotes & $note & @CRLF)
    GUICtrlSetData($Input_1,"")
    MsgBox(0,"my note taker","Note added")
EndFunc
Edited by realkiller

Share this post


Link to post
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
Sign in to follow this  
Followers 0