Jump to content

Recommended Posts

Posted (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 by controlledchaos
  • Moderators
Posted

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

Is 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.
Posted

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

Posted (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 by KegRaider
Posted

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))

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...