Aliisonline Posted November 7, 2010 Posted November 7, 2010 Me creating this script:#Include <Misc.au3>#include <GUIConstants.au3>GUICreate( "Get date", 210,190)$Date = GUICtrlCreateMonthCal ("",10, 10)GUISetState()While 1 Sleep ( 50 ) If _IsPressed("01") Then Run ('notepad.exe')WinWaitActive ("Untitled - Notepad")Send (GUICtrlRead($Date));RIGHT HERE I WANT TO SEND THE DATE IN MM/DD/YYYY format but it sends in YYYY/MM/DD forma, but don't know how ExitLoop EndIfWEnd
JoHanatCent Posted November 8, 2010 Posted November 8, 2010 (edited) 1 Way: #Include <Misc.au3> #include <GUIConstants.au3> GUICreate( "Get date", 210,190) $Date = GUICtrlCreateMonthCal ("",10, 10) GUISetState() While 1 Sleep ( 50 ) If _IsPressed("01") Then Run ('notepad.exe') WinWaitActive ("Untitled - Notepad") $date = GUICtrlRead($Date) $date = StringMid($date, 6, 3) & StringRight($date, 2) & "/" & StringLeft($date, 4) Send ($Date);RIGHT HERE I WANT TO SEND THE DATE IN MM/DD/YYYY format but it sends in YYYY/MM/DD forma, but don't know how :nuke: ExitLoop EndIf WEnd If your PC have that format just use: #include <Misc.au3> #include <GUIConstants.au3> #include <Date.au3> GUICreate("Get date", 210, 190) $Date = GUICtrlCreateMonthCal("", 10, 10) GUISetState() While 1 Sleep(50) If _IsPressed("01") Then Run('notepad.exe') WinWaitActive("Untitled - Notepad") $Date = GUICtrlRead($Date) ; Current date/time in the pc's format Send(_DateTimeFormat($Date, 2));RIGHT HERE I WANT TO SEND THE DATE IN MM/DD/YYYY format but it sends in YYYY/MM/DD forma, but don't know how :nuke: ExitLoop EndIf WEnd Edited November 8, 2010 by JoHanatCent
Aliisonline Posted November 9, 2010 Author Posted November 9, 2010 Thanks a lot buddy your first suggestion is GOOD. I said first one good cause in the first 1 i did not have to change anything and it send the date in MM/DD/YYYY format, the second one was gooooood also but in the second if i click the date less than 10 it don't display the leading zero before one digit (DD). Any way thanks a lot man. Right now it is almost 11:30 PM, in morning i will try to understand the syntax which you used to accomplish this task.
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