#130245 - 2004-11-26 07:36 PM
Kixform InputBox Cancel Button
|
Mike72677
Fresh Scripter
Registered: 2004-06-17
Posts: 32
Loc: PA
|
I have a simple Kixform InputBox that I can't get to work right. The box has an OK and cancel button and a box where you can type in. If you leave the text box blank and click OK, I want it to prompt you to enter a name to continue and then loop. (I have that part working). But if you click Cancel, I want the script to just end. What code do I need to get the cancel button to work? Thanks!! Here's that part of my script.
Code:
break on $=setconsole("hide")
:top $FORM = CREATEOBJECT("Kixtart.FORM")
$Name = $Form.InputBox("Enter name:", "User & PC Finder","")
IF $NAME = "" MESSAGEBOX ("You MUST Enter A Name In To Continue", "No Name Entered", 16) GOTO TOP ENDIF
|
Top
|
|
|
|
#130247 - 2004-11-26 08:23 PM
Re: Kixform InputBox Cancel Button
|
Mike72677
Fresh Scripter
Registered: 2004-06-17
Posts: 32
Loc: PA
|
I seen an older post with this in it:
Code:
$ButtonCancel = $FormQuestion.Button('Cancel', $ButtonOK.Right + 10, $TextBoxAnswer.Bottom + 5, 40, 16) $ButtonCancel.Cancel = 1 $ButtonCancel.OnClick = 'GOSUB ButtonCancel_Click'
But wasn't sure how/if it worked. My kixfroms.dll is showing version 2.2.0.37. Thanks!
|
Top
|
|
|
|
#130249 - 2004-11-26 10:33 PM
Re: Kixform InputBox Cancel Button
|
Mike72677
Fresh Scripter
Registered: 2004-06-17
Posts: 32
Loc: PA
|
What do I need to do to my script if I upgrade to the current version of Kixforms?
|
Top
|
|
|
|
#130250 - 2004-11-26 10:36 PM
Re: Kixform InputBox Cancel Button
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Probably nothing ... but give the build a try ... here it is ...
Kixforms Development Build
Let me know if your script looks/behaves the same, if so - we can talk.
|
Top
|
|
|
|
#130251 - 2004-11-26 10:39 PM
Re: Kixform InputBox Cancel Button
|
Mike72677
Fresh Scripter
Registered: 2004-06-17
Posts: 32
Loc: PA
|
Same thing. The only way to get out of the script is to type in something and click OK. Even typing something in and clicking Cancel just loops the script.
|
Top
|
|
|
|
#130253 - 2004-11-26 11:04 PM
Re: Kixform InputBox Cancel Button
|
Mike72677
Fresh Scripter
Registered: 2004-06-17
Posts: 32
Loc: PA
|
I'll be waiting! Thanks!!
|
Top
|
|
|
|
#130255 - 2004-11-26 11:19 PM
Re: Kixform InputBox Cancel Button
|
Shawn
Administrator
Registered: 1999-08-13
Posts: 8611
|
Ok, download the latest DEV build again (should be special build 6), and try this script ... it uses the InputBox object, and something called the "DialogResult" property, which is documented in the old CHM ... here's the script ...
Code:
Break On
$System = CreateObject("Kixtart.System")
$InputBox = $System.InputBox()
:TOP
$Name = $InputBox.Show("Enter name:", "User & PC Finder","")
If $InputBox.DialogResult = 2 ; Cancel ?"Quiting..." Quit Endif
If $Name = "" $= MESSAGEBOX ("You MUST Enter A Name In To Continue", "No Name Entered", 16) GOTO TOP Endif
?"Name = " $Name
Exit 0
Let me know if you have any questions ...
-Shawn
|
Top
|
|
|
|
#130256 - 2004-11-26 11:30 PM
Re: Kixform InputBox Cancel Button
|
Mike72677
Fresh Scripter
Registered: 2004-06-17
Posts: 32
Loc: PA
|
Script error : unknown command ! $InputBox = $System.InputBox()
I got the latest build (2.4.0.46) Or do I not have the latest build?
|
Top
|
|
|
|
#130258 - 2004-11-26 11:48 PM
Re: Kixform InputBox Cancel Button
|
Mike72677
Fresh Scripter
Registered: 2004-06-17
Posts: 32
Loc: PA
|
Build=46
|
Top
|
|
|
|
#130261 - 2004-11-27 12:02 AM
Re: Kixform InputBox Cancel Button
|
Mike72677
Fresh Scripter
Registered: 2004-06-17
Posts: 32
Loc: PA
|
Reregistering the DLL appears to have fixed it! Cancel works GREAT now! Thanks!! All is well now for me! Works GREAT!!
|
Top
|
|
|
|
#130262 - 2004-11-27 12:52 AM
Re: Kixform InputBox Cancel Button
|
NTDOC
Administrator
Registered: 2000-07-28
Posts: 11624
Loc: CA
|
I would recommend always making sure users do the following before other trouble shooting methods.
regsvr32 /u kixforms.dll
Then delete old kixforms.dll then copy new one into %windir%\system32 (excluding Windows 9x)
Then run
regsvr32 kixforms.dll
Then run new scripts
p.s. What's with the GOTO
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
2023-09-28 [Arend_]
Wow even the shouts are old ;-)
2023-11-17 [Dr_Rick]
I love Kixforms!
2023-11-21 [Dave_Melczer]
Getting DB errors again opening posts...anyone else?
2023-11-24 [Flavien]
DB errors confirmed. This forum is showing its age... UBB 7.2.2 is from 2007
2023-11-27 [Sealeopard]
And there goes the forum :-(
2023-11-30 [NTDOC]
Yes, so old no good easy update path
2023-12-01 [mole]
Posts back. No DB errors. Thanks!
2023-12-29 [BradV]
Happy new year!
2024-02-09 [RSLHA]
No access possible!
2024-02-09 [RSLHA]
Database Error!
2024-02-18 [Dr_Rick]
What happened to Bruno
2024-03-08 [mole]
Thanks for getting the posts back again.
2024-04-18 [MarineV]
will the db errors get fixed????
2024-04-26 [Tonny]
database error, please!
2024-05-09 [NTDOC]
I'm not seeing any errors
2024-05-31 [chojin]
DB is down again
2024-06-04 [selsner]
Still no access, please help!
2024-06-07 [mole]
Looks like DB is back again. Thanks.
2024-06-17 [It_took_my_meds]
We encountered a problem. The reason reported was Database error only visible to forum administrators Please click back to return to the previous page.
2024-07-04 [Armin73]
There is still a database error 🤷♂️
2024-07-09 [0neZero]
There is still a database error 🤷♂️
2024-07-10 [Allen]
DB working a few times in between the messages above. Working again as of 7/10. Thanks Doc
2024-08-31 [NetGnostic]
Bummer, the Database error is back.
2024-09-04 [NTDOC]
Fourms are back up without error for the moment
2024-10-02 [Arend_]
Wll still have database errors ;-)
2024-10-03 [Allen]
Thanks to Doc... it's back.
2024-12-09 [chojin]
could we move kixtart to a new place in order to keep it living ? maybe create a github page and a subreddit?
2024-12-10 [Allen]
do know about moving it, but I know Doc is aware of the DB issue. Should be back online soon.
2024-12-10 [Allen]
don't know...
|
|
0 registered
and 303 anonymous users online.
|
|
|