Page 1 of 1 1
Topic Options
#77960 - 2001-06-21 04:39 PM How does EXIST function work in beta2 ?
Philippe Offline
Fresh Scripter

Registered: 2001-06-21
Posts: 17
Loc: Poitiers, France
Hi,

I have the Beta 2 and try to run the following short script:

###
$Destination="d:\utilisateurs\All Users\Menu Démarrer"
$Fichier="Windows Update.lnk"
GOSUB EFFACE
EXIT
;--------------------------------------------:EFFACE
;--------------------------------------------Dim $NOM
$NOM="$Destination\$Fichier"
IF EXIST("$NOM")=1
IF Ingroup("Admins du Domaine")
SetFileAttr("$NOM",1)
ELSE
SetFileAttr("$NOM",2)
ENDIF
Return
#################

It exits automatically at the EXIST condition ???
Am I wrong or is there a bug ?

Philippe



Top
#77961 - 2001-06-21 07:23 PM Re: How does EXIST function work in beta2 ?
cj Offline
MM club member
*****

Registered: 2000-04-06
Posts: 1102
Loc: Brisbane, Australia
I have not run this script, but you are missing the ENDIF that must close the IF exist command.

The :EFFACE label appears to be on the previous line. Ie should be:

;-------------
:EFFACE

Other than that it looks ok to me.

cj

------------------
cj's scripts page
cj's User Guide - 14 May 2001

chrismat@ozemail.com.au

Top
#77962 - 2001-06-23 12:06 AM Re: How does EXIST function work in beta2 ?
Philippe Offline
Fresh Scripter

Registered: 2001-06-21
Posts: 17
Loc: Poitiers, France
Hi,
I found the mistake
an ENDIF was missing in the EFFACE subroutine

Top
Page 1 of 1 1


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

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

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