KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

Update - Kixforms Classic
Goto page Previous  1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri May 05, 2006 7:15 pm    Post subject: Reply with quote

btw - in case anyone was wondering, that last mask in the combo box like this:

[a-zA-Z][0-9][a-zA-Z]-[0-9][a-zA-Z][0-9]

That is a Canadian Postal code, like:

L2X-3K4

Which has a format of: LetterNumberLetter-NumberLetterNumber
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri May 05, 2006 8:17 pm    Post subject: Reply with quote

Shawn wrote:
damn, I keep forgetting to remove my variable CreateObject stuff Wink. No big secret or anything - I am testing a special version of Kixforms.Net that is almost 100% compatible with kf.classic. I am using this special version to ensure (as much as possible) whether kf.classic is looking/acting like dotnet. Whether this special version of kf.net ever gets released - I dont know.

I was kind of expecting the comment about the Shell method. Your not using the DOS prompt to launch the script (i assume) ?. I am thinking about adding a new parameter to the function like this:

$Text = $System.Shell("command", windowstyle, redirection)

-Shawn


I think I am. I'm using Admin Script Editor to execute the program. But I think it's good to have the new parameter to hide the cmd window.

Other than that, it looks great! I'm working on a sample that masks as you type. Will post it up shortly.
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri May 05, 2006 8:21 pm    Post subject: Reply with quote

D'oh, MaskedTextBox doesn't support OnTextChanged. Is it because it's not in there yet or will never be in there?

Last edited by pearly on Fri May 05, 2006 8:44 pm; edited 2 times in total
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri May 05, 2006 8:37 pm    Post subject: Reply with quote

I will posting a new dev. build shortly (with the window-style parameter for System.Shell) ...

Your right about TextChanged, of all the events MaskedTextBox should support - thats the one - that will be there shortly (in the next-next build).

-Shawn
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri May 05, 2006 8:43 pm    Post subject: Reply with quote

thanks for putting out the new builds!

Basically, using the masking feature I'm only allowing certain characters to be entered based on the previous character entered.

For example entering the 3 letter prefix for the months in a calendar.

Allowable values are

Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec

If the user enters "J", OnTextChanged event will append a new mask "[a,u]" for the next character (for Jan, Jun, Jul). Then when user enters "a", OnTextChanged event will append a new mask "[n]" and autocomplete the value to "Jan"
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri May 05, 2006 9:05 pm    Post subject: Reply with quote

Is this masking right?

Code:
$MaskTextBox.Mask = "2\000-[JFMASOND][aepuco][nbrylgptvc]-[0-3]0,[0-2]0:[0-5]0:[0-5]0"


This is suppose to be : [YEAR]-[3-LETTER MONTH]-[DAY],[HOUR]:[MIN]:[SEC]

When I feed in the data using a function that calculates the date and time, it doesn't seem to work.

$MaskTextBox.Text = "2006-May-05,14:14:52"

MasedTextBox show 2020-___-__,__:05:_1


Last edited by pearly on Fri May 05, 2006 9:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri May 05, 2006 9:16 pm    Post subject: Reply with quote

Lets see the code for the function. Think you need a minor tweak to the mask though ... for the minutes (iirc):

2\000-[JFMASOND][aepuco][nbrylgptvc]-00,[01]0:[0-5]0:[0-5]0
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri May 05, 2006 9:30 pm    Post subject: Reply with quote

Code:

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()
$Form.Size = 300,150
$Form.Text = "MaskedTextBox - Date/Time Stamp"
$Form.FontName = "Tahoma"
$Form.FontSize = 8.25

$MaskedLabel = $Form.Controls.Add("Label")
$MaskedLabel.Left = 5
$MaskedLabel.Top = 9
$MaskedLabel.Width = 100
$MaskedLabel.Text = "Date/Time Stamp :"
$MaskedLabel.TextAlign = "MiddleLeft"

$MaskedTextBox = $Form.Controls.Add("MaskedTextBox")
$MaskedTextBox.Left = $MaskedLabel.Right
$MaskedTextBox.Mask = "2\000-[JFMASOND][aepuco][nbrylgptvc]-[0-3]0,[0-2]0:[0-5]0:[0-5]0"
$MaskedTextBox.Right = $Form.ClientWidth - 5
$MaskedTextBox.Top = $MaskedLabel.Top

$GetDTSButton = $Form.Controls.Add("Button")
$GetDTSButton.Width = 135
$GetDTSButton.Left = $Form.Width/2 - $GetDTSButton.Width/2
$GetDTSButton.Top = $MaskedLabel.Bottom + 20
$GetDTSButton.Text = "Get Date/Time Stamp"
$GetDTSButton.OnClick = "GetDTSButton_Click()"

$Form.Center
$Form.Show

While $Form.Visible
 $= Execute($Form.DoEvents)
Loop

Exit 0

Function enDay
   If Len(Cstr(@MDAYNO)) = 1
      $enDay = "0" + Cstr(@MDAYNO)
   Else
      $enDay = Cstr(@MDAYNO)
   EndIf
EndFunction

Function enMonth
   If Len(Cstr(@MONTHNO)) = 1
      $enMonth = "0" + Cstr(@MONTHNO)
   Else
      $enMonth = Cstr(@MONTHNO)
   EndIf
EndFunction

Function enMonthName
   Select
      Case enMonth = "01"
         $enMonthName = "Jan"
      Case enMonth = "02"
         $enMonthName = "Feb"
      Case enMonth = "03"
         $enMonthName = "Mar"
      Case enMonth = "04"
         $enMonthName = "Apr"
      Case enMonth = "05"
         $enMonthName = "May"
      Case enMonth = "06"
         $enMonthName = "Jun"
      Case enMonth = "07"
         $enMonthName = "Jul"
      Case enMonth = "08"
         $enMonthName = "Aug"
      Case enMonth = "09"
         $enMonthName = "Sep"
      Case enMonth = "10"
         $enMonthName = "Oct"
      Case enMonth = "11"
         $enMonthName = "Nov"
      Case enMonth = "12"
         $enMonthName = "Dec"
   EndSelect         
EndFunction

Function enYear
   $enYear = Right(Cstr(@YEAR), 2)
EndFunction

Function GetDateTimeStamp
   Dim $dst
   
   $dst = Cstr(@YEAR) + Chr(45) + enMonthName + Chr(45) + enDay + Chr(44) + Cstr(@TIME)
   $GetDateTimeStamp = $dst
EndFunction

Function GetDTSButton_Click()
   $MaskedTextBox.Text = GetDateTimeStamp
EndFunction
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri May 05, 2006 9:36 pm    Post subject: Reply with quote

Works fine when I enter the text manually, but I push the button it chokes.

Oops, I found one problem. I accidently left in the Chr(44) and Chr(45). Removing it and made it a little better, but still no go.


Last edited by pearly on Fri May 05, 2006 9:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri May 05, 2006 9:36 pm    Post subject: Reply with quote

will check this script out ... I posted a new dev. build with an enhanced Shell function. I posted a new version of the shell script.
Back to top
View user's profile Send private message
Les
KiXforms Aficionado
KiXforms Aficionado


Joined: 24 Dec 2003
Posts: 317

PostPosted: Fri May 05, 2006 9:42 pm    Post subject: Reply with quote

Shawn wrote:
I am testing a special version of Kixforms.Net that is almost 100% compatible with kf.classic.

Ok, what are you gonna call it?
KiXforms.classic.net
KiXforms.retro.net
KiXforms.light.net
KiXforms.sheep.net

_________________
The Repro Man
Stealing for a living!
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri May 05, 2006 9:44 pm    Post subject: Reply with quote

bugger, my poor QA led me to some mistakes.

created enTime to remove colons

Code:

Function enTime
   Dim $time
   
   $time = @TIME
   
   $enTime = SubStr($time, 1, 2) + SubStr($time, 4, 2) + SubStr($time, 7)   
EndFunction



Now the code in GetDateTimeStamp looks like this :

Code:
$dst = enYear + enMonthName + enDay + enTime
$GetDateTimeStamp = $dst
Back to top
View user's profile Send private message
Les
KiXforms Aficionado
KiXforms Aficionado


Joined: 24 Dec 2003
Posts: 317

PostPosted: Fri May 05, 2006 10:24 pm    Post subject: Reply with quote

Code:
$Time=@Time
$Time = Join(Split($Time,':'),'')
$Time ?

_________________
The Repro Man
Stealing for a living!
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Fri May 05, 2006 10:25 pm    Post subject: Reply with quote

KiXforms.sheep.net that has a nice ring to it. I like that.

"Kixforms.Sheep.Net ... A baaaaaaa-d ass plugin for Kixtart" ;0)

pearly - I just tried the script with the mods you made - it seems to work great now, ja ?
Back to top
View user's profile Send private message
pearly
KiXforms Aficionado
KiXforms Aficionado


Joined: 27 Jan 2004
Posts: 332

PostPosted: Fri May 05, 2006 10:48 pm    Post subject: Reply with quote

Shawn wrote:
KiXforms.sheep.net that has a nice ring to it. I like that.

"Kixforms.Sheep.Net ... A baaaaaaa-d ass plugin for Kixtart" ;0)

pearly - I just tried the script with the mods you made - it seems to work great now, ja ?


ja, a big boo-boo in my QA dept. thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 2 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group