Page 1 of 1 1
Topic Options
#23149 - 2002-06-13 08:40 PM Dumbfounded... Continued... (what is wrong with this script. mistyping?)
arshepp Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 41
Loc: California
Sorry about my last post, PC freaked on me.

Anyhow, to continue, assume the following script:

code:
IF InGroup("IT")
ADDPRINTERCONNECTION ("\\corpps1\it_cube")
ADDPRINTERCONNECTION ("\\corpps2\corppilot")
ADDPRINTERCONNECTION ("\\clc1150p1\print")
SetDefaultPrinter ("\\corpps1\it_cube")
use k: /delete
use k: "\\corpfs1\shared\IT"
use n: /delete
use n: "\\corpweb2\IT_Apps"
ENDIF

IF InGroup("LEGAL")
ENDIG


IF InGroup("SALES")
ENDIF

IF InGroup("SST")
use t: /delete
use t: "\\corpweb2\SST"
ENDIF

Why is it that the script only gets processed for the first group that it sees you are in, and doesn't continue if you are not in the next one? Am I even making sense? Is there a better way?

(MCA: complete subject)

[ 17 June 2002, 12:04: Message edited by: MCA ]

Top
#23150 - 2002-06-13 08:43 PM Re: Dumbfounded... Continued... (what is wrong with this script. mistyping?)
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Typo:

IF InGroup("LEGAL")
ENDIG
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#23151 - 2002-06-13 08:43 PM Re: Dumbfounded... Continued... (what is wrong with this script. mistyping?)
BrianTX Offline
Korg Regular

Registered: 2002-04-01
Posts: 895
Hmm. is the ENDIG a typo or is it in your script?
Make sure all your IFs match ENDIFs ... is this the complete script? If there is more that you're leaving out, may we see it?

Brian

Top
#23152 - 2002-06-13 08:47 PM Re: Dumbfounded... Continued... (what is wrong with this script. mistyping?)
arshepp Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 41
Loc: California
It's a typo. I am a moron, thank you to all for allowing me to exist! This board really is a great resource...
Top
#23153 - 2002-06-13 08:57 PM Re: Dumbfounded... Continued... (what is wrong with this script. mistyping?)
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
You might want to download MCA's KiXstrip tool. It'll read a KiXtart file and point out things like structures that haven't been closed correctly. That would have caught your typo. Get it here: http://home.wanadoo.nl/scripting/
_________________________
There are two types of vessels, submarines and targets.

Top
#23154 - 2002-06-18 12:01 AM Re: Dumbfounded... Continued... (what is wrong with this script. mistyping?)
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

We have two interesting tools for you:
- kixstrip
- kixref
Both tools you can find on our site.

Our call:
kixstrip input.kix output.kix /block_check
will verify your script on correctness
Output for your script is:
code:
 IF InGroup("IT")
ADDPRINTERCONNECTION ("\\corpps1\it_cube")
ADDPRINTERCONNECTION ("\\corpps2\corppilot")
ADDPRINTERCONNECTION ("\\clc1150p1\print")
SetDefaultPrinter ("\\corpps1\it_cube")
USE k: /delete
USE k: "\\corpfs1\shared\IT"
USE n: /delete
USE n: "\\corpweb2\IT_Apps"
ENDIF

IF InGroup("LEGAL")
ENDIG


IF InGroup("SALES")
ENDIF

IF InGroup("SST")
USE t: /delete
USE t: "\\corpweb2\SST"
ENDIF

;($begin)
;
; mon 17-jun-2002 11:51:28 (kix 4.10 vs 3.04e)
;
;Informative KIXSTRIP: input=22 output=22 skip=0
;
;Warning KIXSTRIP: 1 error in block structure. missing statement(s).
; - do:until [0:0]
; - for|each:in|to:step|next [0|0:0|0:0|0]
; - function:endfunction [0:0]
; -ERROR- - if:else:endif [4:0:3]
; - select:case:endselect [0:0:0]
; - while:loop [0:0]
;Warning KIXSTRIP: some lines contains errors or possible errors.
;Informative KIXSTRIP: 4 block_structures found.
;Informative KIXSTRIP: no UDF's found.
;Informative KIXSTRIP: no labels found.
;Summary KIXSTRIP: BREAK CALL DEBUG DISPLAY ENDFUNCTION EXECUTE EXIT FUNCTION GET GETS GOSUB GOTO OLExxx PLAY QUIT RETURN RUN SHELL SLEEP THEN USE
;Informative KIXSTRIP: 6 USE
;
;($end)
;($begin)
;
;
;($end)

But it doesn't show all mistypings. With the call
kixref input.kix output /warnings
will show you those problems.
Output for your script is:
code:
   Warnings about unknown keywords
.
endig ? 13
k: ? 6 7
n: ? 8 9
t: ? 20 21
.
.
.
Summary - kixtart 4.10/3.04e
.
boldsymbols 0
commands 4
functions 3
labels 0
macros 0
variables 0
.
env 0
udf 0
? 4
.
gosub 0
goto 0
.
11
.
.
Block Structure
.
do:until [0:0]
for|each:in|to:step|next [0|0:0|0:0|0]
function:endfunction [0:0]
if:else:endif -ERROR- [4:0:3]
select:case:endselect [0:0:0]
while:loop [0:0]
.
4 blocks
.

Both tools show problems with block structures.
greetings.

btw: symbol on our homepage has been linked to related http://kixtart.org topic.

[ 17 June 2002, 12:03: Message edited by: MCA ]
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

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 837 anonymous users online.
Newest Members
ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder, M_Moore
17887 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