Help - Search - Members - Calendar
Full Version: help with Datasets
AC Tools Everything Macro > AC Tool Macros > Macro Development
sethb
I am not familier with the datasets, but I was looking in the help file and I saw that you have to specify the size of the dataset

Example
DataSet items
Fld1 = String 50
Fld2 = String 50
End

is this specifying a size or is this just specifying a type for whater you are going to insert, like the following:

procedure AddDS using Field1, Field2, Field3
DSInsert items
SetConst items[Fld1] = $Field1
SetConst items[Fld2] = $Field2
SetConst items[Fld1] = $Field3
DSPost items
end

or would i need to have a Fld3 specified where Fld1 and Fld2 are
Ipa
QUOTE
I am not familier with the datasets, but I was looking in the help file and I saw that you have to specify the size of the dataset


You don't specify a DataSet "size". You specify 1 or more fields in the dataset. 1 or more of those fields may be of type "String", which requires a length.

Example:

Dataset SomeName
Fld1 = Integer // field to hold an integer - no size required
Fld2 = String 100 // field to hold text - max size 100 characters
FldWhatever = Integer // another integer
FldMoreText = String 5 // another text field, holding a max of 5 chars
End


You call the fields whatever you want, give them whatever data type you want (including size if a String), and you write your own AddDS procedure, passing in whatever params you want.
Triane
Usefull Dataset Threads:
>>Question on Datasets
>>Dataset Questions
>>Identifying Differences Between Two Datasets.
>>Datasets, Got Some Spare Time?

That is a fair amount of resource material on the subject, have fun reading biggrin.gif

-Triane
sethb
thanks
sethb
Allow me to setup an example of what I want to do with a dataset. I make a macro to do fishing in FFXI. the user types in something from the game and it sets a constant to a certain bait they want the macro to reload for them. i want to load x amount of baits into a dataset by them using the same command over and over until they finished then i want the macro to traverse the ds and pullup each entry sequentialy.

i see there are no indexes in these datasets, is there anyway to traverse the dataset and pull out the baits loaded into it without knowing the name of the bait that is stored in the ds?
Ipa
QUOTE
i see there are no indexes in these datasets, is there anyway to traverse the dataset and pull out the baits loaded into it without knowing the name of the bait that is stored in the ds?


DSIndexAdd - define an index
DSIndex - apply the index to the dataset

DSFirst/DSNext - retrieve dataset records one by one, in order of the currently applied index.

[Edit] And a link to a working example.
As Triane said - plenty of useful threads already here, just search for them.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.