Jump to content

What is Wrong With This Damn Clock!


Guest BL@(K-R34P3R
 Share

Recommended Posts

Guest BL@(K-R34P3R

This is my first clock. What is wrong, I keep compiling with SciTE and I keep getting MsgBox errors, Help me!

;Creates a clock function. Tells the year, month, day, hour, minute, and second.

$sec = @SEC
$min = @MIN
$hour = @HOUR
$mon = @MON
$year = @YEAR

ClockFunc()

Func ClockFunc()

MsgBox(17, "AutoIt Clock!", "Second: " &$sec, "Minute: " &$min, "Hour: " &$hour, "Month " &$mon, "Year: " &$year)

EndFunc
Link to comment
Share on other sites

Try this:

;Creates a clock function. Tells the year, month, day, hour, minute, and second.

$sec = @SEC
$min = @MIN
$hour = @HOUR
$mon = @MON
$year = @YEAR

ClockFunc()

Func ClockFunc()

MsgBox(17, "AutoIt Clock!", "Second: " & $sec & " Minute: " & $min & " Hour: " & $hour & " Month: " & $mon & " Year: " & $year)

EndFunc

I didnt test it but it should work.

*** Matt @ MPCS

Edited by Matt @ MPCS
Link to comment
Share on other sites

MsgBox(0, "AutoIt Clock!", "Second: " & @SEC & @LF & "Minute: " & @MIN & @LF & "Hour: " & @HOUR & @LF & "Month " & @MON & @LF & "Year: " & @YEAR)

<{POST_SNAPBACK}>

This isn't the same. It removes the stop-sign icon and the cancel button. It also puts each record on a line of their own.

*** Matt @ MPCS

Link to comment
Share on other sites

I know. I did it the way I like it.  :ph34r:

Your code does not work, take a look at your extra commas...

Kendall

<{POST_SNAPBACK}>

You're right, I fixed it... it works now. Thanks!

@BL@(K-R34P3R

The code sample I posted above works now.

*** Matt @ MPCS

Link to comment
Share on other sites

Guest BL@(K-R34P3R

Thanks both of you. I'm going to go try it out right now. I tried figuring it out on my own, but I'm not used to those damn commas and stuff, now I know though.

Link to comment
Share on other sites

Guest Guidosoft

Thanks both of you. I'm going to go try it out right now. I tried figuring it out on my own, but I'm not used to those damn commas and stuff, now I know though.

<{POST_SNAPBACK}>

when I look at my clock I see a wavy swirl going around it and the whole room sort of twirls out of control and I see the clock and believe I HAVE THE POWER TO WARP TIME!!!!!!!! :lol::D:D:D:D

:ph34r::(:lol:

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...