Jump to content

GUICtrlCreateMonthCal format headache


 Share

Recommended Posts

Hi all,

I'm trying to use GUICtrlRead to read the selected date from a calendar. That is then intended to be used as a filename. I've tried using GUICtrlCreateDate but I need the calendar embedded as opposed to a drop down. I have no experience in arrays as of yet so I haven't tried using StringSplit. Could this be an option? If so a description of what the code is doing would be helpful as I'm eager to learn.

I don't think that you'll need the code but I'll be happy to post up upon request.

Thanks in advance

Link to comment
Share on other sites

If you are not using GuiCtrlCreateDate(), then how are you creating your calendar? Post a short demo script that just creates a simple GUI with your calendar in it and maybe displays the selection text you are getting (creating files, etc. is not required).

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Thanks for your reply.

GUICtrlCreateDate shows a drop out calendar. GUICtrlCreateMonthCal has a calendar embedded into the GUI.

GUICreate("Sample Calendar")

; This creates the calendar
$Calendar = GUICtrlCreateMonthCal(@YEAR & "/" & @MON & "/" & @YDAY,5,5,200,200)

$MsgBox   = GUICtrlCreateButton("Show Output",5,205)
$Exit     = -3


GuiSetState()
While 1
    Switch GUIGetMsg()
        Case $Exit
            ExitLoop

        Case $MsgBox
            $Output = GUICtrlRead($Calendar)
            MsgBox(0,"Calendar Output",$Output)
    EndSwitch
WEnd
Link to comment
Share on other sites

Hi all,

I'm trying to use GUICtrlRead to read the selected date from a calendar. That is then intended to be used as a filename.

Are you just trying to get it in a different format for the file name?

GUICreate("Sample Calendar")
; This creates the calendar
$Calendar = GUICtrlCreateMonthCal(@YEAR & "/" & @MON & "/" & @YDAY,5,5,200,200)
$MsgBox   = GUICtrlCreateButton("Show Output",5,205)
$Exit     = -3
GuiSetState()
While 1
    Switch GUIGetMsg()
        Case $Exit
            ExitLoop
        Case $MsgBox
            $Output = GUICtrlRead($Calendar)
            $Output = StringLeft($Output,4) & StringMid($Output,6,2)&StringRight($Output,2)
            MsgBox(0,"Calendar Output","Useable string = > " &$Output);<<< ?
    EndSwitch
WEnd

Spellings

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