Noshmon Posted March 7, 2011 Share Posted March 7, 2011 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 More sharing options...
PsaltyDS Posted March 7, 2011 Share Posted March 7, 2011 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 More sharing options...
Noshmon Posted March 8, 2011 Author Share Posted March 8, 2011 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 More sharing options...
JoHanatCent Posted March 8, 2011 Share Posted March 8, 2011 (edited) 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 March 8, 2011 by JoHanatCent Link to comment Share on other sites More sharing options...
Noshmon Posted March 8, 2011 Author Share Posted March 8, 2011 Hi Jo, Thanks for that. It works exactly as I need it to. Link to comment Share on other sites More sharing options...
JoHanatCent Posted March 9, 2011 Share Posted March 9, 2011 Hi Jo,Thanks for that. It works exactly as I need it to. Welcome! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now