Page 1 of 1 1
Topic Options
#117165 - 2004-04-01 05:03 AM Script Error - Pause Script
CBehrent Offline
Fresh Scripter

Registered: 2003-08-18
Posts: 12
I have created a basic kix script and when I run it, it beeps that there is an error and I can see some red writing in it, but the script closes before I can read the error. How do I pause or stop the script so I have time to read the error? Thanks
Top
#117166 - 2004-04-01 05:14 AM Re: Script Error - Pause Script
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
try this:

?"Hit any key to continue..." GET$

-Shawn

Top
#117167 - 2004-04-01 08:45 AM Re: Script Error - Pause Script
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Eh?

that wouldn't help in case of script failure
You could either place a PAUSE in the calling batch file or start the script in debug mode (/d)

(Another Option is of course posting your code here and let us see whats wrong )


Edited by Jochen (2004-04-01 08:46 AM)
_________________________



Top
#117168 - 2004-04-01 08:57 AM Re: Script Error - Pause Script
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Do a KIX32 YOURSCRIPT.KIX /d

This will put your script in DEBUG Mode..

If you know about where the script is having trouble, add a line:
DEBUG ON

And when the script gets to the above line, it will start line-by-line execution.

HTH,

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#117169 - 2004-04-03 06:17 PM Re: Script Error - Pause Script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Kent,
If you put Debug On in the script, you don't need the /D. :P

In the calling BATch file, if you test %errorlevel% after calling KiX, it would only pause if an error is thrown.
Code:
kix32 C:\kixscripts\test.kix
if %errorlevel% == 1 pause

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#117170 - 2004-04-04 04:23 PM Re: Script Error - Pause Script
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Les,

Of course you are correct. However, since the script was never posted, there maybe an error at line one. Sure the switch for /d is not necessary, but is another way to do it.

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#117171 - 2004-04-04 05:28 PM Re: Script Error - Pause Script
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Kent,
The original question was
Quote:

How do I pause or stop the script so I have time to read the error?



Neither the /D nor the DEBUG ON would keep the message on the screen and using both does not double your chances.

There is a FAQ Catch that error message that flashes for a second that could be golfed a bit.
Code:
kix32 C:\kixscripts\test.kix
if errorlevel 1 pause

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 756 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.054 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org