Jump to content

Click Clock v1.0


z0mgItsJohn
 Share

Recommended Posts

Hello AutoIt Peoples.. :D I Just Made A Clock.. That Appears Where U Click.. No It Dose Not Follow.. The Mouse.. Enjoy

I Got To Go To Bed x3

Feel Free To Post Comments.. Bugs.. Etc.. :D

Source : Click Clock v1.0.Au3

#Include <GUIConstants.Au3>
#Include <Misc.Au3>
#Include <Date.Au3>
#NoTrayIcon
Opt ('GUIOnEventMode','1')

Global $Click = False, $Space = ('     ')

While ('1')
Sleep ('150')
Do
If _IsPressed ('01') Then
_Create_Clock ()
$Click = True 
ExitLoop
EndIf 
Until $Click = True 
ExitLoop
WEnd

Func _Create_Clock ()
WinMinimizeAll ()
Global $Pos = MouseGetPos ()
GUICreate ($Space & '.: Click Clock v1.0 :.','150','50', $Pos['0'] - '75', $Pos['1'] - '25','-1', $WS_EX_TOOLWINDOW)
GUISetBkColor ('0x000000')
GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit')
$Label = GUICtrlCreateLabel ('','21','15','150','100')
GUICtrlSetFont ('-1','14','','','Arial')
GUICtrlSetColor('-1','0xFF0000')
GUISetState (@SW_SHOW)
    
While ('1')
Sleep ('250')
$Current_Time = _NowTime ()
GUICtrlSetData ($Label, $Current_Time)
Sleep ('250')
WEnd
EndFunc

Func _Exit ()
Exit 
EndFunc

~ Enjoy ~

Latest Projects :- New & Improved TCP Chat

Link to comment
Share on other sites

  • 9 months later...

Hello AutoIt Peoples.. :lmao: I Just Made A Clock.. That Appears Where U Click.. No It Dose Not Follow.. The Mouse.. Enjoy

I Got To Go To Bed x3

Feel Free To Post Comments.. Bugs.. Etc.. :)

Source : Click Clock v1.0.Au3

#Include <GUIConstants.Au3>
#Include <Misc.Au3>
#Include <Date.Au3>
#NoTrayIcon
Opt ('GUIOnEventMode','1')

Global $Click = False, $Space = ('     ')

While ('1')
Sleep ('150')
Do
If _IsPressed ('01') Then
_Create_Clock ()
$Click = True 
ExitLoop
EndIf 
Until $Click = True 
ExitLoop
WEnd

Func _Create_Clock ()
WinMinimizeAll ()
Global $Pos = MouseGetPos ()
GUICreate ($Space & '.: Click Clock v1.0 :.','150','50', $Pos['0'] - '75', $Pos['1'] - '25','-1', $WS_EX_TOOLWINDOW)
GUISetBkColor ('0x000000')
GUISetOnEvent ($GUI_EVENT_CLOSE, '_Exit')
$Label = GUICtrlCreateLabel ('','21','15','150','100')
GUICtrlSetFont ('-1','14','','','Arial')
GUICtrlSetColor('-1','0xFF0000')
GUISetState (@SW_SHOW)
    
While ('1')
Sleep ('250')
$Current_Time = _NowTime ()
GUICtrlSetData ($Label, $Current_Time)
Sleep ('250')
WEnd
EndFunc

Func _Exit ()
Exit 
EndFunc

~ Enjoy ~

Yeah i like the idea im running vista i open click somewhere this comes up any help?

line 24 (Words Id rather not say)

quicreat ($space& '.: click clock v1.0:.','150','50',$pos['0] - '75', $pos['1'] - '25','-1', $WS_EX_TOOLWINDOW)

quicreat ($space& '.: click clock v1.0:.','150','50',$pos['0] - '75', $pos['1'] - '25','-1', ^ ERROR

Errow: variable used without being declard.

something like that anyways

Google Is For Real Men. Yahoo Is For Wimps!

Link to comment
Share on other sites

@LIMITER

Radical solution for includes :

script is better too...

Opt('GUIOnEventMode', 1)
#NoTrayIcon

Global $Click = False, $Space = ('     ')

While 1
    Sleep(150)
    While $Click = False
        If _IsPressed('01') Then
            _Create_Clock()
            $Click = True
            ExitLoop
        EndIf
    WEnd
    ExitLoop
WEnd

Func _Create_Clock()
    WinMinimizeAll()
    Global $Pos = MouseGetPos()
    GUICreate($Space & '.: Click Clock v1.0 :.', 150, 50, $Pos[0] - 75, $Pos[1] - 25, -1, 0x00000080)
    GUISetBkColor(0x000000)
    GUISetOnEvent(-3, '_Exit')
    $Label = GUICtrlCreateLabel('', 21, 15, 150, 100)
    GUICtrlSetFont(-1, 14, 400, 1, 'Arial')
    GUICtrlSetColor(-1, 0xFF0000)
    GUISetState(@SW_SHOW)

    While 1
        Sleep(250)
        $Current_Time = @HOUR & ':' & @MIN & ':' & @SEC
        GUICtrlSetData($Label, $Current_Time)
        Sleep(250)
    WEnd
EndFunc   ;==>_Create_Clock

Func _Exit()
    Exit
EndFunc   ;==>_Exit

#Region Include Func
; #FUNCTION# ====================================================================================================================
; Name...........: _IsPressed
; Description ...: Check if key has been pressed
; Author ........: ezzetabi and Jon
; ===============================================================================================================================
Func _IsPressed($sHexKey, $vDLL = 'user32.dll')
    ; $hexKey must be the value of one of the keys.
    ; _Is_Key_Pressed will return 0 if the key is not pressed, 1 if it is.
    Local $a_R = DllCall($vDLL, 'int', 'GetAsyncKeyState', 'int', '0x' & $sHexKey)
    If Not @error And BitAND($a_R[0], 0x8000) = 0x8000 Then Return 1
    Return 0
EndFunc   ;==>_IsPressed
#EndRegion Include Func

Cheers, FireFox.

Edited by FireFox
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...