#114757 - 2004-02-25 01:13 PM
Re: Add network printer
|
Co
MM club member
Registered: 2000-11-20
Posts: 1341
Loc: NL
|
|
Top
|
|
|
|
#114759 - 2004-02-25 01:49 PM
Re: Add network printer
|
jering
Fresh Scripter
Registered: 2004-02-25
Posts: 17
|
I have made an UDF out of this template:
;FUNCTION Name_of_UDF ; ;ACTION Short description of purpose ; ;AUTHOR Name of author ; ;CONTRIBUTORS Name(s) of contributor(s) ; ;VERSION UDF version ; ;DATE CREATED YYYY/MM/DD ; ;DATE MODIFIED YYYY/MM/DD ; ;KIXTART Minimum required Kixtart version ; ;SYNTAX NAME_OF_UDF(PARAMETER 1, PARAMETER2 [, PARAMETER3]) ; ;PARAMETERS PARAMETER1 ; Description of first parameter ; ; PARAMETER2 ; Description of second parameter ; ; PARAMETER3 ; Description of optional first parameter ; ;RETURNS Type of return value ; ;REMARKS Additional remarks about the UDF ; ;DEPENDENCIES DependUDF @ http://www.kixtart.org/board/... ; Name and URL of UDFs that this UDF depends on ; ;EXAMPLE A short functional example demonstrating the UDF ; ;KIXTART BBS http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000000 ; URL the UDF was posted under ; function Name_of_UDF($parameter 1, $parameter2, optional $parameter3) endfunction
And called it myudf.kix
In the *.bat file I wrote:
//10.100.3.100/netlogon/kix32 //10.100.3.100/netlogon/test.kix
In the test.kix file I wrote: CALL myudf.kix
But I get an error message. What am I doing wrong?
|
Top
|
|
|
|
#114762 - 2004-02-25 02:38 PM
Re: Add network printer
|
jering
Fresh Scripter
Registered: 2004-02-25
Posts: 17
|
Ok.
http://home.c2i.net/jering/diverse
There you`ll find test.kix and test2.kix
In the test2.kix I`ve pasted the template from "How to write a UDF".
Can someone tell what I can modify in the test2.kix and tell me where I can input this string:
;$=AddPrinter("10.231.144.240","HP LaserJet 1300n","\\skoledomene\drivere\hp laserjet 1300\win2000_xp\1300m6.inf","HP LaserJet 1300n paa Lo skole",,1)
|
Top
|
|
|
|
#114763 - 2004-02-25 02:56 PM
Re: Add network printer
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Jering,
You really need to post this code here rather than sending us out to do your work! You should review the Ettiquette post in the FAQ Section.
OK.. Let's see if we can summarize what you are looking for..
As Lonkero pointed out, you need to review - How to use UDFs
TEST.KIX - Your version Code:
CALL d:\kix\test2.kix goto end :end
Modified to - Code:
CALL "d:\kix\test2.kix"
GOTO is not needed. You need to surround your CALL file with Quotes.
Better yet- Code:
CALL @Scriptdir+"\test2.kix"
TEST2.KIX Nothing other than a template.
Kent
|
Top
|
|
|
|
#114766 - 2004-02-25 03:09 PM
Re: Add network printer
|
Kdyer
KiX Supporter
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Just a second here -
This will not work either: Code:
;$=AddPrinter("10.231.144.240","HP LaserJet 1300n","\\skoledomene\drivere\hp laserjet 1300\win2000_xp\1300m6.inf", "HP LaserJet 1300n paa Lo skole",,1)
Per KiXtart documentation, ";" is a comment and will not be executed.
You need to change this to - Code:
$=AddPrinter("10.231.144.240","HP LaserJet 1300n","\\skoledomene\drivere\hp laserjet 1300\win2000_xp\1300m6.inf", "HP LaserJet 1300n paa Lo skole",,1)
Also, you should debug your code to see where it is not working.
Kent
|
Top
|
|
|
|
#114768 - 2004-02-25 03:11 PM
Re: Add network printer
|
Co
MM club member
Registered: 2000-11-20
Posts: 1341
Loc: NL
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 369 anonymous users online.
|
|
|