Jump to content

Recommended Posts

Posted

no no! I got the script for the note from...ahm....i don't remember his hick but it is not mine so I didn't knew how to configure it!

View my blog :) 3dude's blog <= help with project :S

Posted (edited)

check the notes in the script u'll get the idea from there

[added new FUNCs Hotkey [ F10, F11 ] check them hope they're useful.

#include <guiconstants.au3>
#include <Misc.au3>
HotKeySet ("{F9}" , "_back")
HotKeySet ("{F10}" , "hide_main")
HotKeySet ("{F11}" , "show_main")

; =============== the Main GUI  ============
$main_GUI = GUICreate ("The Main GUI" , 150 , 120,-1,-1,$WS_CAPTION)
$show_caland = GUICtrlCreateButton ("Show Calander" , 20 , 10 , 100, 25)
$show_memo = GUICtrlCreateButton ("Make Note" , 20 , 80 , 100, 25)
$exit = GUICtrlCreateButton ("Exit" , 20 , 45 , 100, 25)
GUISetState (@SW_SHOW,$main_GUI)

; ========== the DATE GUI  ================
$date_GUI = GUICreate ( "My GUI get date", 200,220,-1,-1, $WS_CAPTION);$WS_POPUP
WinSetTrans("My GUI get date", "", 95)
$back = GUICtrlCreateButton ("Back" , 50 , 200 , 85, 20)
GUICtrlCreateMonthCal('', 0, 0, 200, 200)
GUISetState (@SW_HIDE , $date_GUI)

; ========== the Memo GUI  ================
    Opt("GUIResizeMode",102)
    Dim $InitText = "Click here to edit."&@CRLF&"Click on the edges to drag the memo."
    Dim $Width = 240
    Dim $Height = 200
    $dll = DllOpen("user32.dll");for use with _IsPressed
   
    $nMemo = GUICreate("MemoBlock Memo", 240,200,-1,-1,$WS_POPUP,$WS_EX_TOOLWINDOW)
    GUISetFont(8,400,0,"Verdana")
    GUISetBkColor(0xFFF177)
    $nMemoText = GUICtrlCreateEdit($InitText,10,10,220,170,$ES_WANTRETURN,0)
    GUICtrlSetBkColor(-1,0xFFF177)
    GUICtrlSetCursor ( -1, 5 )
    WinSetTrans($nMemo,"",200)
    GUISetState(@SW_HIDE,$nMemo)
    WinSetOnTop($nMemo,"",1)

While 1
    $nMsg = GUIGetMsg ()
    $t = GUIGetCursorInfo ($nMemo)
    Select
        Case $nMsg = $exit
            Exit
        Case $nMsg = $back
            GUISetState (@SW_HIDE,$date_GUI)
            GUISetState (@SW_HIDE,$nMemo)
            GUISetState (@SW_SHOW,$main_GUI)
        Case $nMsg = $show_caland
            _date()
        Case $nMsg = $show_memo
            _Memo()
        Case $t[4] = 8201 And $t[2] =1
            If GUICtrlRead ($nMemoText) = $InitText Then
            GUICtrlSetData($nMemoText,"")
            EndIf
    EndSelect
    
    ;get the initial window position and mouse position and use it to calculate the movement
    $wPos = WinGetPos($nMemo)
    $mPos = MouseGetPos()
    $x = $mPos[0]-$wPos[0]
    $y = $mPos[1]-$wPos[1]
    $Mouse = GUIGetCursorInfo($nMemo)
    If Not $Mouse[4] Then
        While _IsPressed(01,$dll)
            $nPos = MouseGetPos()
            $NewPosX = $nPos[0]-$x
            $NewPosY = $nPos[1]-$y
            If $NewPosX < 0 Then
                $NewPosX = 0
            ElseIf $NewPosX > @DesktopWidth - $Width Then
                $NewPosX = @DesktopWidth - $Width
            EndIf
            If $NewPosY < 0 Then
                $NewPosY = 0
            ElseIf $NewPosY > @DesktopHeight - $Height Then
                $NewPosY = @DesktopHeight - $Height
            EndIf
            WinMove($nMemo,"",$NewPosX,$NewPosY)
        WEnd
    EndIf
WEnd
DllClose($dll)

Func _back ()   
GUISetState (@SW_HIDE,$date_GUI)
GUISetState (@SW_HIDE,$nMemo)
GUISetState (@SW_SHOW,$main_GUI)
EndFunc

Func _date()
GUISetState (@SW_SHOW,$date_GUI)
GUISetState (@SW_HIDE,$main_GUI)
EndFunc

Func _Memo()
GUISetState (@SW_HIDE,$date_GUI)
;GUISetState (@SW_HIDE,$main_GUI)
GUISetState (@SW_SHOW,$nMemo)
EndFunc

Func hide_main()
    ; ==== this function will hide your main GUI  hot key F10 =======
GUISetState (@SW_HIDE,$main_GUI)
EndFunc

Func show_main()
    ; ==== this function will show your main GUI after it was hidden hot key F11 =======
GUISetState (@SW_SHOW,$main_GUI)
EndFunc
Edited by star2

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

Posted
Posted

Many of us do... :) I for one like to sleep in a bed. I find the computer parts to be a tad uncomfortable to lie on. And somewhat hot. :P

you've got that absolutely right !!! :blink:

[quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u]

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
×
×
  • Create New...