Page 1 of 1 1
Topic Options
#51809 - 2000-10-16 04:52 PM script error...... :c\
Anonymous
Unregistered


Hiya
tryin to get this workin but.....
get this error msg:

Script error : expected expression !.
AT ( 9,25) "datum : " ; display some text strings


and my script looks like this:

cls

Color g+/n
BOX (7,20,17,60,FULL)

Color w+/n
AT ( 9,25) "datum : " ; display some text strings
AT (10,25) "tid : "
AT (11,25) "Anv.id : "
AT (12,25) "Full namn : "
AT (13,25) "Domain : "
AT (14,25) "Logon Server : "

Color y+/n
AT ( 9,40) @date ; ...and some macro's
AT (10,40) @time
AT (11,40) @userid
AT (12,40) @fullname
AT (13,40) @domain
AT (14,40) @lserver

Color w/n
AT (16,25) "Välkommen till"
AT (16,40) @domain

AT (22,0)

; rem @echo Nu ställs klockan på din PC
SETTIME "JW"
; rem NET TIME /Domain:JW /SET /YES

USE H: @HOMESHR ; connect to user's home share

; rem inloggning för Avd645 Solna
IF INGROUP("Sth1_ma_645")
shell "call %0\..\avd645.bat"
ENDIF

; rem inloggning för Avd646 Solna
IF INGROUP("Sth1_ma_646")
shell "call %0\..\avd646.bat"
ENDIF

; rem inloggning för Avd647 Solna
IF INGROUP("Sth1_ma_647")
shell "call %0\..\avd647.bat"
ENDIF

; rem inloggning för Danderyd
IF INGROUP("Sth1_sj_221")
Shell "call %0\..\avd221.bat"
ENDIF

; rem inloggning för Tullgårdsgatan
IF INGROUP("Sth1_ps_663")
shell "call %0\..\avd663.bat"
ENDIF

; rem inloggning för Ferax
IF INGROUP("Sth1_ps_664")
shell "call %0\..\avd664.bat"
ENDIF

; rem inloggning för gotlandsgatan

IF INGROUP("Sth1_sj_010")
shell "call %0\..\avd010.bat"
ENDIF

IF INGROUP("Sth1_sj_010_kalkyl")
shell "call %0\..\avd010ka.bat"
ENDIF

IF INGROUP("Sth1_sj_010_sekr")
shell "call %0\..\avd010se.bat"
ENDIF

; rem Lidingö

; rem inloggning för avd 074 IT-Stab
IF INGROUP("Sth1_st_074")
shell "call %0\..\avd074.bat"
ENDIF

; rem inloggning för avd 094 Energi & Miljö Byggnadsfysik
IF INGROUP("Sth1_em_094")
shell "call %0\..\avd094.bat"
ENDIF

; rem inloggning för avd 221 Sjölanders (Danderyd)
IF INGROUP("Sth1_sj_221")
shell "call %0\..\avd221.bat"
ENDIF

; rem inloggning för avd 602 Växel/Reception
IF INGROUP("Sth1_st_602")
shell "call %0\..\avd602.bat"
ENDIF

; rem inloggning för avd 620 Byggprojektering Sektionsledning H&I
IF INGROUP("Sth1_bp_620")
shell "call %0\..\avd620.bat"
ENDIF

; rem inloggning för avd 605 Kontorsservice
IF INGROUP("Sth1_st_605")
shell "call %0\..\avd655.bat"
ENDIF

; rem inloggning för avd 623 Byggprojektering H&I U.Eriksson
IF INGROUP("Sth1_bp_623")
shell "call %0\..\avd623.bat"
ENDIF

; rem inloggning för avd 626 Byggprojektering H&I K.Arvidsson
IF INGROUP("Sth1_bp_626")
shell "call %0\..\avd626.bat"
ENDIF

; rem inloggning för avd 655 Energi & Miljö Mark & Vatten
IF INGROUP("Sth1_em_655")
shell "call %0\..\avd655.bat"
ENDIF

; rem inloggning för avd 921 Personaladministration
IF INGROUP("Sth1_st_921")
shell "call %0\..\avd921.bat"
ENDIF

; rem inloggning för avd 658 Mark & Anläggning
IF INGROUP("Sth1_ma_658")
shell "call %0\..\avd658.bat"
ENDIF

; rem inloggning för avd 901 Företagsledning
IF INGROUP("Sth1_st_901")
shell "call %0\..\avd901.bat"
ENDIF

; rem inloggning för avd 910 Ekonomi och Finansstab Globen
IF INGROUP("Sth1_st_910")
shell "call %0\..\avd910.bat"
ENDIF

; rem inloggning för avd 920 Kompetens/Infostab
IF INGROUP("Sth1_st_920")
shell "call %0\..\avd920.bat"
ENDIF

; rem inloggning för avd 065 Mark & Anläggning AO-ledning
IF INGROUP("Sth1_ma_065")
shell "call %0\..\avd065.bat"
ENDIF

; rem inloggning för avd 062 Byggprojektering AO-ledningen
IF INGROUP("Sth1_bp_062")
shell "call %0\..\avd062.bat"
ENDIF

; rem inloggning för avd 650 Energi & Miljö AO-ledningen
IF INGROUP("Sth1_em_650")
shell "call %0\..\avd650.bat"
ENDIF

; rem inloggning för avd 925 Stab Informationsavdelningen
IF INGROUP("Sth1_st_925")
shell "call %0\..\avd925.bat"
ENDIF

; rem inloggning för avd 905 Stab Kvalitetsutveckling
IF INGROUP("Sth1_st_905")
shell "call %0\..\avd905.bat"
ENDIF

; rem inloggning för avd 607 Ritningsarkiv
IF INGROUP("Sth1_st_607")
shell "call %0\..\avd607.bat"
ENDIF

; rem inloggning för avd 067 Sjölanders AO-ledning
IF INGROUP("Sth1_sj_067")
shell "call %0\..\avd067.bat"
ENDIF

; rem inloggning för avd 063 Projektstyrning
IF INGROUP("Sth1_ps_063")
shell "call %0\..\avd063.bat"
ENDIF


exit


Anyone who can help me out here...im totally lost bout scriptin....

Nova

Top
#51810 - 2000-10-16 05:07 PM Re: script error...... :c\
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Everything looks ok and it ran for me....

What version of kix are you running? (kix32.exe /?)

Bryce

Top
#51811 - 2000-10-16 05:17 PM Re: script error...... :c\
Anonymous
Unregistered


3.54...hmmm i had 3.60 but backed when i had some problems.....will try with the new one again.

Nova

Top
#51812 - 2000-10-16 06:23 PM Re: script error...... :c\
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Hmmm - I just ran your script with 3.54 and no problems ... are you using some kind of funky editor or something ?

Are you calling this script from another script - if yes - let's see the other script ...

Shawn.

Top
#51813 - 2000-10-17 10:13 AM Re: script error...... :c\
Anonymous
Unregistered


Hiya Shawn
This is my .batfile:

@echo off
SET|more
pause

IF "%OS%" == "Windows_NT" GOTO WINNT

%windir%\command\XCOPY %0\..\KX16.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KX32.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KX95.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL

%0\..\kix32.exe netconn1.txt

GOTO END

:WINNT
Echo NT
pause

%0\..\Kix32.exe netconn1.txt
pause
exit

:END
Echo end
pause
exit

Dont get exited over the pause and other junk its just for testing things out.
Nope i dont use any fancy editors, just good ´ol notepad.
hmmm i wonder if its a NT prob, becuse I can run it when i run it from explorer in netlogon but not from a shortcut on the client.

I get "can´t find script/script error".
Hope u can help me out here.

Nova

Top
#51814 - 2000-10-17 03:56 PM Re: script error...... :c\
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Nova, use the %0\..\ in front of the exe and the script name.

%0\..\Kix32.exe %0\..\netconn1.txt

Bryce



Top
#51815 - 2000-10-17 05:41 PM Re: script error...... :c\
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Nova:

Can you post the string that's specified in the "target" field of your clients shortcut ?

Is the target fully qualified in all respects, like this ...

target=c:\kix32\kix32.exe c:\script\myscript.kix

or whatever ... is the client path environment variable setup correctly, etc ...

Shawn.



Top
#51816 - 2000-10-19 09:44 AM Re: script error...... :c\
Anonymous
Unregistered


Hi
Okey, I have got the NT clients to run the .bat now (finally) hehe.
This is what the batfile that starts kix looks like:

--------------------------------------------
C:
@echo off
pause

IF "%OS%" == "Windows_NT" GOTO WINNT

%windir%\command\XCOPY %0\..\KX16.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KX32.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL
%windir%\command\XCOPY %0\..\KX95.DLL %WINDIR%\SYSTEM\ /D /H /I /R /V > NUL

%0\..\kix32.exe netconn1.txt

GOTO END

:WINNT
SET|more
Echo NT
pause

XCOPY %0\..\KIX32.EXE %WINDIR%\SYSTEM32\ /D /H /I /R /V > NUL
XCOPY %0\..\netconn1.txt %WINDIR%\SYSTEM32\ /D /H /I /R /V > NUL
ECHO Loading Logon Script, Please Wait...
CALL c:\winnt\SYSTEM32\KIX32.EXE c:\winnt\SYSTEM32\netconn1.txt

pause
exit

:END
@Echo end
@pause
exit
------------------------------------------

and here are the .kix script:


-------------------------------------------
cls

Color g+/n
BOX (7,20,17,60,FULL)

Color w+/n
AT ( 9,25) "datum : " ; display some text strings
AT (10,25) "tid : "
AT (11,25) "Anv.id : "
AT (12,25) "Full namn : "
AT (13,25) "Domain : "
AT (14,25) "Logon Server : "

Color y+/n
AT ( 9,40) @date ; ...and some macro's
AT (10,40) @time
AT (11,40) @userid
AT (12,40) @fullname
AT (13,40) @domain
AT (14,40) @lserver
AT (15,40) @primarygroup
Color w/n
AT (16,25) "Välkommen till"
AT (16,40) @domain

AT (22,00)


SETTIME "JW"
; rem NET TIME /Domain:JW /SET /YES

USE H: @HOMESHR ; connect to user's home share

if ingroup("Sth1_sj_010_sekr") = 1 ? "Sth1_sj_010_sekr"endif

IF INGROUP("Sth1_sj_010_sekr")
messagebox ("check","stop",3)
shell "call c:\winnt\system32\cmd.exe /C /E:1024 C:\winnt\system32\avd10se.bat"
ENDIF

exit

----------------------------------
I tried the if ingroup("Sth1_sj_010_sekr") = 1 ? "Sth1_sj_010_sekr"endif

and it echoed back "Sth..." and a 6 the number six that is!
fishy......i dont have a clue what it means...but then again im a newbie at Kix and scripting.
Somethin is wrong with the shell "call c:\winnt\system32\cmd.exe /C /E:1024 C:\winnt\system32\avd10se.bat"
but what....?

Thanx for your replays everyone.

Top
#51817 - 2000-10-19 02:29 PM Re: script error...... :c\
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Nova:

Make the following modifications to your code ...

The "6" is coming from your messagebox function - quiet it like this ...

$rs = messagebox ("check","stop",3)

Try changing your shell command to this ...

shell "%comspec% /C /E:1024 C:\winnt\system32\avd10se.bat"

Luck !

Shawn.


[This message has been edited by Shawn (edited 19 October 2000).]

Top
Page 1 of 1 1


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

Who's Online
0 registered and 5546 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.169 seconds in which 0.108 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