Xtensity
2011-08-03 00:16:07
How would I go about doing this?
To give you an idea of what I am trying to do..
So… I'm going to build this function and I have a great idea how to do it, but I'm stuck on the top part. I'm using it to post to a page with Appa… but I decided to simplify it so I could make a single function that post to a single link and only sets certain data on that link.
Sorry if that was a bad explanation.
Say I have this link..
…/Post.php
To this link, I want to change the variables on the page, I already know the variables, its only a matter of setting them.
Say I have
Say I want to set the "EMAIL" Variable to [email]JohnDoe@Gmail.com[/email]. and The PASS variable to 'opencans' or whatever haha.
I would try to put it in the function like this.
Though when I do this I get a type mismatch error :(. The Array Of TStringArray is set up how it should be set up… though scar doesn't seem to be able to handle it?
How would I do this? Using a Array of TStringArray in a function without a bunch of lines before I call the function which would combine all the TStringArrays… I'm trying to avoid all those extra lines. I want to be able to set all the coding up in the function so that it can do a specific task when it is called from a single line, just as a function should be.
To give you an idea of what I am trying to do..
Function SetVar(PostLink:String; Values:Array of TStringArray):Boolean;
begin
end;So… I'm going to build this function and I have a great idea how to do it, but I'm stuck on the top part. I'm using it to post to a page with Appa… but I decided to simplify it so I could make a single function that post to a single link and only sets certain data on that link.
Sorry if that was a bad explanation.
Say I have this link..
…/Post.php
To this link, I want to change the variables on the page, I already know the variables, its only a matter of setting them.
Say I have
Say I want to set the "EMAIL" Variable to [email]JohnDoe@Gmail.com[/email]. and The PASS variable to 'opencans' or whatever haha.
I would try to put it in the function like this.
SetVar('.../Post.php',[['email','johndoe@gmail.com'],['pass','opencans']])
Though when I do this I get a type mismatch error :(. The Array Of TStringArray is set up how it should be set up… though scar doesn't seem to be able to handle it?
How would I do this? Using a Array of TStringArray in a function without a bunch of lines before I call the function which would combine all the TStringArrays… I'm trying to avoid all those extra lines. I want to be able to set all the coding up in the function so that it can do a specific task when it is called from a single line, just as a function should be.