leuce Posted June 30, 2006 Posted June 30, 2006 G'day everyone At a certain point in my script I get the following error: ClipPut = $array[1]^ ERROR Error: Error parsing function call. There's just one problem... I don't have a function call in my script (as far as I know). The relevant script piece is: ; Code to build an HTML file ; HTMLtemplate.txt contains three pieces of HTML code, one per line $HTMLtemplate = FileOpen("c:\bitext\HTMLtemplate.txt", 0) $array = StringSplit($HTMLtemplate, @CRLF, 1) $oo1 = FileOpen ("c:\bitext\ootemp.html", 2) FileClose ($oo1) ; aatemp.txt contains a lot of text $ooaa = FileOpen ("c:\bitext\aatemp.txt", 0) ; eetemp.txt contains a lot of text $ooee = FileOpen ("c:\bitext\eetemp.txt", 0) Run ("c:\bitext\metapad.exe c:\bitext\ootemp.html") Sleep (100) ClipPut = $array[1] Send ("^v") ClipPut = $ooaa Send ("^v") ClipPut = $array[2] Send ("^v") ClipPut = $ooee Send ("^v") ClipPut = $array[3] Send ("^v") Send ("^s") Send ("!{F4}") Any ideas? What am I doing wrong? If I can't figure out the array, I'll just put each piece of HTML code in a separate file and take it from there... Thanks Samuel
jvanegmond Posted June 30, 2006 Posted June 30, 2006 (edited) A function always needs some sort of (). Also you can't assign a function to a variable, only a variable to a function. Hehe. ClipPut = $array[1] ; Wrong ClipPut($Array[1]) ; Good edit: I don't have a function call in my scriptYour first call is FileOpen. Second is StringSplit. Last is Send. Edited June 30, 2006 by Manadar github.com/jvanegmond
herewasplato Posted June 30, 2006 Posted June 30, 2006 (edited) ...There's just one problem... I don't have a function call in my script (as far as I know)...You don't have a User Defined Function (UDF).ClipPut is a function.Manadar has shown you the correct snytax for the ClipPut function... :-) Edited June 30, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size]
leuce Posted June 30, 2006 Author Posted June 30, 2006 ClipPut = $array[1] ; Wrong ClipPut($Array[1]) ; Good Yes... I'm reaaaly stupid, aint I? :-) Not the first time I've made this type of error either...
herewasplato Posted June 30, 2006 Posted June 30, 2006 Yes... I'm reaaaly stupid, aint I? :-)...Well if this type of mistake qualifies you as stupid --- then I'm an expert at stupidity :-)BTW, I just threw in that bit about User Defined Function (UDF) since it took me a while to figure out when forum members were talking about functions built into AutoIt and UDFs... the terms seem to be used interchangeably. [size="1"][font="Arial"].[u].[/u][/font][/size]
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now