Set date with SysDateTimePick32?
Moderators: JRL, Dorian (MJT support)
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
Set date with SysDateTimePick32?
How do I set the corect date from a Date picker?
This will not work:
SetControlText>Edit new,SysDateTimePick32,1,2006-01-01
Year-month-day is the date format on my sytem and the format that is presented in the dialog.
Thanks!
This will not work:
SetControlText>Edit new,SysDateTimePick32,1,2006-01-01
Year-month-day is the date format on my sytem and the format that is presented in the dialog.
Thanks!
Will this work?
Code: Select all
Let>RP_Windowmode=0
Run>cmd /c date 2006-01-01
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
Yes it's ClassName is SysDateTimePick32 and it is the first and only on in that window.
Like this one:
http://www.powerbasic.com/support/quick ... tetime.gif
There are also a bunch of "Edit" fields wich I can populate without any problem.
Like this one:
http://www.powerbasic.com/support/quick ... tetime.gif
There are also a bunch of "Edit" fields wich I can populate without any problem.
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
I think I'm out of ideas.
I have ERP software that I'm unable to update using SetControlText>. Speaking with the software vendor I was told that it fails because the software performs validation on the information in each of the fields. The validation doesn't allow the text to be set at the classname level. Perhaps because this is a date you're inputting, which probably requires some sort of validation, you are also experiencing a validation issue.
Can you get a date from the object using GetControlText>? If you can and yet you can't set the date using the same classname and instance values with SetControlText>, I might guess that you won't be able to use SetControlText> in this case.
I have ERP software that I'm unable to update using SetControlText>. Speaking with the software vendor I was told that it fails because the software performs validation on the information in each of the fields. The validation doesn't allow the text to be set at the classname level. Perhaps because this is a date you're inputting, which probably requires some sort of validation, you are also experiencing a validation issue.
Can you get a date from the object using GetControlText>? If you can and yet you can't set the date using the same classname and instance values with SetControlText>, I might guess that you won't be able to use SetControlText> in this case.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I expect SysDateTimePIc32 is exposing the date in it's caption property for convenience, but it doesn't surprise me that you can't just set it's caption text the other way. I doubt the developers of the control ever imagined anyone would want to set the date that way.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Or perhaps you can type into it, but only in a specif way - can you type into it at all manually? Can that not be simulated, or must it be done with the mouse?
If it must be controlled via the mouse perhaps use text capture or image recognition to find the appropriate buttons ...
If it must be controlled via the mouse perhaps use text capture or image recognition to find the appropriate buttons ...
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Pro Scripter
- Posts: 149
- Joined: Tue Mar 23, 2004 9:11 pm
Yes, it is possible to type into. But I like the SetControlText> way. It is so error freee. Using send text.. doesnt guarantee that You are typin in the right place.
My approach now is:
SetFocus>Edit new
Send Character/Text>
press Right
Send Character/Text>1966
press Right
Send Character/Text>05
press Right
Send Character/Text>19
press tab
But How can I know what field I am on. I would perfeer not to use image recognition. I dont trust it to get the right field 100%
Thanks
My approach now is:
SetFocus>Edit new
Send Character/Text>
press Right
Send Character/Text>1966
press Right
Send Character/Text>05
press Right
Send Character/Text>19
press tab
But How can I know what field I am on. I would perfeer not to use image recognition. I dont trust it to get the right field 100%
Thanks