Jump to content

Stickies - Sticky Notepad


eynstyne
 Share

Recommended Posts

Wrote this in a rush. I need to add font selection and a bunch of other things, but it looks kinda cool

You need these files. They can be put anywhere, but with the script file and must be in a folder called RESOURCES. Add to the desktop for convenience

Zipped - Contains Code & Resources

Any comments :whistle: , feedback :) , suggestions :) are welcome. Thanks in advance for actually taking the time to look at this...

:lmao: Eynstyne

The meat...

#include <GUIConstants.au3>
#include <file.au3>
Opt("Guioneventmode",1)

$Form1 = GUICreate("Notepad", 200, 100, 30, -1, $WS_BORDER + $WS_POPUP, $WS_EX_TOOLWINDOW + $WS_EX_TOPMOST)
$Pic1 = GUICtrlCreatePic(@scriptdir & "\RESOURCES\Sticky.bmp", 0, 0, 200, 100, 0)
$edit = GUICtrlCreateedit("", 10, 10, 175, 80, -1)
controlhide("Notepad","",$edit)
$Picclose = GUICtrlCreatePic(@scriptdir & "\RESOURCES\close.bmp", 180, 5, 12, 12, -1)
guictrlsetonevent(-1,"Closestickies")
$Picmin = GUICtrlCreatePic(@scriptdir & "\RESOURCES\min.bmp", 160, 5, 12, 12, -1)
guictrlsetonevent(-1,"minstickies")
$label = GUICtrlCreatelabel("", 10, 20, 180, 80, 0)
guictrlsetfont($label ,9, 400, 0, "Courier New")
guictrlsetonevent(-1,"SetFocus")
GUICtrlCreateLabel("", 163, 73, 50, 50, -1)
Guictrlsetonevent(-1,"Flip")
$Pic2 = GUICtrlCreatePic(@scriptdir & "\RESOURCES\pin" & Random(1,7,1) & ".bmp", 100, 3, 15, 15, -1, $GUI_WS_EX_PARENTDRAG)
GUISetState(@SW_SHOW)
$text = fileread(@scriptdir & "\AutoBack1.txt")
guictrlsetdata($edit, $text)
$count = 0
While 1

      $data = GuiCtrlRead($edit)
       $data2 = GUICtrlRead($label)     

       If $data <> $data2 Then GUICtrlSetData($label, $Data)


wend


func flip()
$count = $count + 1
guictrlsetimage($pic1, @scriptdir & "\RESOURCES\Stickynextpage.bmp")
GUICtrlSetData($edit, "")
sleep(10)
guictrlsetimage($pic1, @scriptdir & "\RESOURCES\Stickynextpage2.bmp")
sleep(10)
guictrlsetimage($pic1, @scriptdir & "\RESOURCES\Stickynextpage3.bmp")
sleep(10)
guictrlsetimage($pic1, @scriptdir & "\RESOURCES\Sticky.bmp")
sleep(10)
GUICtrlsetimage($pic2, @scriptdir & "\RESOURCES\pin" & Random(1,7,1) & ".bmp")
sleep(10)

$page = fileread(@scriptdir & "\AutoBack" & $count & ".txt")

if FileExists(@ScriptDir & "\AutoBack" & $count & ".txt") Then
$page = fileread(@scriptdir & "\AutoBack" & $count & ".txt")
if $page <> "" then
    guictrlsetdata($edit, $page)
    elseif $page = "" then
guictrlsetdata($edit,"")
endif

elseif not FileExists(@ScriptDir & "\Autoback" & $count & ".txt") Then
    if $data <> "" then
    _filecreate(@scriptdir & "\Autoback" & $count & ".txt")
    filewrite(@scriptdir & "\AutoBack" & $count & ".txt", $data)
    guictrlsetdata($edit,"")
elseif $data = "" Then
    $count = $count - 1
        guictrlsetdata($edit,"")
    EndIf
    EndIf

endfunc

func setfocus()
controlfocus("Notepad","",$edit)
endfunc

func closestickies()
guictrlsetimage($picclose, @scriptdir & "\RESOURCES\closeclick.bmp")
sleep(50)
guictrlsetimage($picclose, @scriptdir & "\RESOURCES\close.bmp")
$readtxt = Guictrlread($edit)
if $readtxt <> "" then
fileopen(@scriptdir & "\AutoBack" & $count & ".txt", 2)
filewrite(@scriptdir & "\AutoBack" & $count & ".txt", $readtxt)
fileclose(@scriptdir & "\AutoBack" & $count & ".txt")
else
exit
EndIf
endfunc

func minstickies()
guictrlsetimage($picmin, @scriptdir & "\RESOURCES\minclick.bmp")
sleep(50)
guictrlsetimage($picmin, @scriptdir & "\RESOURCES\min.bmp")
endfunc
Edited by eynstyne
F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]
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...