Search found 8 matches

by Jesse
Tue May 29, 2018 11:51 pm
Forum: General Discussion
Topic: Version 1.5 - Template Examples
Replies: 1
Views: 18610

Re: Version 1.5 - Template Examples

Well, I just worked out some improvements to the above. This version does not require you to supply a Max from a clipboard entry, instead it completely ignores what clipboard entry you invoke it upon and uses an InputBox to ask you what maximum value you want to use. My code defaults to 1e9 (that's ...
by Jesse
Tue May 29, 2018 11:09 pm
Forum: Actions
Topic: Handy random number generator (not cryptographically strong, just trivial)
Replies: 0
Views: 292

Handy random number generator (not cryptographically strong, just trivial)

Sometimes my roommate and I are coding up something in Secondlife, and we need a large random number to hardcode a channel not likely to be used by anybody else. It would be handy to just have a 3Dclip action to choose such a number for us, so I made one. :) Dim max,min If(IsNumeric(clipboard.value)...
by Jesse
Thu Aug 29, 2013 11:14 pm
Forum: Actions
Topic: Mac address: no punctuation, uppercase (VBscript)
Replies: 0
Views: 14409

Mac address: no punctuation, uppercase (VBscript)

Set s_reTrimWS = New RegExp
s_reTrimWS.Pattern = "[^0-9a-fA-F]"
s_reTrimWS.Global = True

Clipboard.Value = s_reTrimWS.Replace( UCase(Clipboard.Value), "" )
by Jesse
Thu Jul 26, 2012 2:24 am
Forum: Actions
Topic: Phone: 123-456-7890
Replies: 0
Views: 27973

Phone: 123-456-7890

Most places in north america need phone numbers formatted this way Set s_reTrimWS = New RegExp s_reTrimWS.Pattern = "[^0-9]" s_reTrimWS.Global = True Clipboard.Value = s_reTrimWS.Replace( Clipboard.Value, "" ) If(Len(Clipboard.Value) = 7) Then Clipboard.Value = "541" & Clipboard.Value If(Len(Clipboa...
by Jesse
Wed Jul 27, 2011 8:59 pm
Forum: Actions
Topic: WHITESPACE - trim
Replies: 0
Views: 13295

WHITESPACE - trim

Code: Select all

Set s_reTrimWS = New RegExp
s_reTrimWS.Pattern = "^\s+|\s+$"
s_reTrimWS.Global  = True
 
Clipboard.Value = s_reTrimWS.Replace( Clipboard.Value, "" )
by Jesse
Wed Jul 27, 2011 8:57 pm
Forum: Actions
Topic: MAC - Cisco
Replies: 0
Views: 13566

MAC - Cisco

Format any input mac address (collection of 12 hex digits ignoring any non-hex-digits as if they were messy punctuation) in lowercase dotted 4's the way Cisco gear likes it: Set s_reTrimWS = New RegExp s_reTrimWS.Pattern = "[^0-9a-f]" s_reTrimWS.Global  = True   Clipboard.Value = s_reTrimWS.Replace(...
by Jesse
Wed Jul 27, 2011 8:56 pm
Forum: Actions
Topic: CASE - lower
Replies: 0
Views: 13386

CASE - lower

Lowercase the current clipboard item, in VBscript:

Code: Select all

Clipboard.Value = LCase(Clipboard.Value)
of course, uppercase is the same story:

Code: Select all

Clipboard.Value = UCase(Clipboard.Value)
by Jesse
Wed Jul 27, 2011 8:53 pm
Forum: Feature Requests
Topic: [ADDED in 1.5] Sticky Items
Replies: 3
Views: 17386

Re: Sticky Items

Hooray for pushpin icon to pin or unpin items into the menu! :D