Sign in to follow this  
Followers 0
z0mgItsJohn

Click Clock v1.0

4 posts in this topic

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

Share this post


Link to post
Share on other sites



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!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Replace

#include <GUIConstants.au3>

with

#Include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>

Cheers,

L|M|TER

Edited by LIMITER

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

@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

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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