controlledchaos Posted April 9, 2007 Posted April 9, 2007 (edited) hi, got a script that i need have the current date sent to a form. checked the help file but didnt find what i was looking for. any suggestions? thanks, melanie also offtopic - does anyone know how to get notepad to replace tabs with CR's?? i have a tab-delimited file that i need to be able read easier. Edited April 9, 2007 by controlledchaos
Moderators big_daddy Posted April 9, 2007 Moderators Posted April 9, 2007 hi, got a script that i need have the current date sent to a form. checked the help file but didnt find what i was looking for. any suggestions?thanks,melanieIs this a webpage form? If so see _IEForm* functions in the help file.also offtopic - does anyone know how to get notepad to replace tabs with CR's?? i have a tab-delimited file that i need to be able read easier.Use SciTE or Wordpad instead.
controlledchaos Posted April 9, 2007 Author Posted April 9, 2007 Is this a webpage form? If so see _IEForm* functions in the help file.Use SciTE or Wordpad instead.no its not a webpage form. i am exporting a file and its looking for a date range. it will change daily so i need the script to be able to pull the current date and stick it in the form. thanks
KegRaider Posted April 17, 2007 Posted April 17, 2007 (edited) no its not a webpage form. i am exporting a file and its looking for a date range. it will change daily so i need the script to be able to pull the current date and stick it in the form. thanks Hi Mate, First of all, I created a file on our PDC called installed.txt and formatted the head as follows... PC | YYYY/MM/DD | TIME | USER | =========|============|============|========| I have the following lines of code in my script to write to this file.... $file = FileOpen("\\server3\scripts$\logs\WLAN\installed.txt", 1) FileWrite ($file, @Computername & " | " & _NowCalcDate() & " | " &_NowTime() &" | " & @UserName & " |" & @CRLF) FileClose($file) This will give you an output like this... PC | YYYY/MM/DD | TIME | USER | =======|=========|=======|=====| WorkPC1 | 2006/07/01 | 2:09:02 PM | spidey | WorkPC2 | 2006/07/01 | 5:31:35 PM | batman | I don't have a need to read the file again, but, if you did then perhaps a quick search for "FileRead" and extract what you need there...good luck. Edited April 17, 2007 by KegRaider
eltorro Posted April 17, 2007 Posted April 17, 2007 It's your form?? Create an Input control or Label then you can use this to place the date in it. GuiCtrlSetData($Input1,StringFormat("%s/%s/%s",@MON,@MDAY,@YEAR)) Regards, [indent]ElTorro[/indent][font="Book"] Decide, Commit, Achieve[/font]_ConfigIO.au3Language Translation --uses Google(tm) MsgBox Move XML wrapper UDF XML2TreeView Zip functionality Split your GUI Save Print ScreenZipPluginEdit In Place listviewSome of my scripts on Google code
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