I'm looking for an example script that parses XML returned from a website.
I'm sick of the Amazon script not working, and the lack of a .co.uk variant and since I already have an Amazon WS developer key, I'm going to produce a global amazon, WS based, data retrieval script. But I'd like an example of handling XML to work off.
(I'm an ex-delphi programmer, use XML a lot, but never from Delphi and never with the lib that the script library has access to).
Script that parses XML - Sample wanted
Yeah, that is what I meant. Ok Cheers.
I'm working in my favourite programmers editor instead of the script editor, so hadn't noticed.
I'd like to request an API to set the parameters, there is one to read them, and a way of setting persistent info. I'd like my script to be able to prompt the user to confirm/set their initial settings on first run.
My script supports all flavours of Amazon, so on first run I'd like them to select which one to work with rather than default to .co.uk. I also have a couple of other options which I'd like to highlight to the user and get a first cut of settings.
Cheers,
Mike
I'm working in my favourite programmers editor instead of the script editor, so hadn't noticed.
I'd like to request an API to set the parameters, there is one to read them, and a way of setting persistent info. I'd like my script to be able to prompt the user to confirm/set their initial settings on first run.
My script supports all flavours of Amazon, so on first run I'd like them to select which one to work with rather than default to .co.uk. I also have a couple of other options which I'd like to highlight to the user and get a first cut of settings.
Cheers,
Mike
You can use GetStatic & SetStatic functions:
The value is stored in Scripts.ini
Code: Select all
procedure SetStatic(AName: string; AValue: string);
function GetStatic(AName: string): string;
I'm aware of the statics, but I'd like to do:
if GetStatic('SettingsMade') = '' then begin
// render a pick list for each of the three critical options.
// then call new SetOption() function to set those options.
SetStatic('SettingsMade') = '1';
end;
Then use GetOption() to retreive the settings, thus allowing the user to change the Options at any time without having to do an intrusive, do you want to change options? Dialog and abuse Get/SetStatic.
if GetStatic('SettingsMade') = '' then begin
// render a pick list for each of the three critical options.
// then call new SetOption() function to set those options.
SetStatic('SettingsMade') = '1';
end;
Then use GetOption() to retreive the settings, thus allowing the user to change the Options at any time without having to do an intrusive, do you want to change options? Dialog and abuse Get/SetStatic.