Insert Time Doesn't work

Posted by Tanis on Sat 08 Feb 2003 12:33 AM — 5 posts, 19,978 views.

#0
I try 'control+D' and it doesn't insert the time??
Australia Forum Administrator #1
Do you mean in the inbuilt notepad? It did for me.
#2
Inserts the date and time at the cursor point, in the format of the current locale.

Eg.


Thursday, 15 June 2000, 8:49 AM


Keyboard Shortcut

CTRL+D

Copyright 1999 Gammon Software Solutions
#3
OH, so the time stamp only works in the notepad?
Won't post in the world window?

My spologies
Canada #4
As a workaround, you could write a single script line directly at the prompt. For example, in VBS:

/world.send "say The current time here is: " & now()

Here's a couple of things I did mostly for fun:

<aliases>
  <alias
   script="Reverse_String"
   match="*!REV*"
   enabled="y"
   ignore_case="y"
  >
  </alias>
  <alias
   script="Evaluate"
   match="^(.*?)Eval\[(.*?)\](.*?)$"
   enabled="y"
   regexp="y"
   ignore_case="y"
  >
  </alias>
</aliases>

Sub Reverse_String (AliasName, AliasLine, arrWildcards)
	If arrWildcards(1) = " " Then
		World.LogSend StrReverse(arrWildcards(2))
	Else
		World.LogSend arrWildcards(1) & StrReverse(arrWildcards(2))
	End If
End Sub

Sub Evaluate (AliasName, AliasLine, arrWildcards)
	World.LogSend arrwildcards(1) & Eval(ArrWildcards(2)) & Arrwildcards(3)
End Sub

The first reverses everything after the point where !REV is used on a line. The second Evaluates any math on a line where I used Eval[]. You could easily do something similar to the second, but instead match on text and replace it with the value of the VBS "Now" function.