SinginSally
Member
I am trying to make a very simple script snippet that records a particular song for me as an AT. I don't need any robustness and am unsure about the command line needed.
Looking at the RecordSong.ash script, I have the following:
string output;
visit_url("volcanoisland.php?action=tuba&pwd");
visit_url("choice.php?whichchoice=409&option=1&pwd");
visit_url("choice.php?whichchoice=410&option=2&pwd");
visit_url("choice.php?whichchoice=412&option=3&pwd");
output = visit_url("choice.php?whichchoice=418&option=3&pwd");
This part is pretty straightforward, copied right from the script.
But then, the actual line that makes the recording is where I am stuck. He uses a Map and some funky match string to make it work. I want the easy translation of this.
skill [int] songs;
songs[0] = $skill["The Ballad of Richie Thingfinder"];
...
matcher m = create_matcher("\\\"(\\d*)\\\" >" + songs + " \\((\\d*)/(\\d*)\\)", output);
(what the heck!?!)
if (m.find()) {
... bunch of pricing stuff...
visit_url("choice.php?whichchoice=440&whicheffect=" + m.group(1) + "×=" + casts + "&option=1&pwd");
(Ah, the GOLD!)
If all I care about is to do 1 recording of Thingfinder, what exactly should I replace the m.group(1) with? The rest is pretty straightforward setting ×=1 for 1 cast.
The matcher thing is what has me confused. I'd appreciate any assistance.
Finally, you would close the snippet with the 'leave' option:
visit_url("choice.php?whichchoice=440&option=2&pwd");
Looking at the RecordSong.ash script, I have the following:
string output;
visit_url("volcanoisland.php?action=tuba&pwd");
visit_url("choice.php?whichchoice=409&option=1&pwd");
visit_url("choice.php?whichchoice=410&option=2&pwd");
visit_url("choice.php?whichchoice=412&option=3&pwd");
output = visit_url("choice.php?whichchoice=418&option=3&pwd");
This part is pretty straightforward, copied right from the script.
But then, the actual line that makes the recording is where I am stuck. He uses a Map and some funky match string to make it work. I want the easy translation of this.
skill [int] songs;
songs[0] = $skill["The Ballad of Richie Thingfinder"];
...
matcher m = create_matcher("\\\"(\\d*)\\\" >" + songs + " \\((\\d*)/(\\d*)\\)", output);
(what the heck!?!)
if (m.find()) {
... bunch of pricing stuff...
visit_url("choice.php?whichchoice=440&whicheffect=" + m.group(1) + "×=" + casts + "&option=1&pwd");
(Ah, the GOLD!)
If all I care about is to do 1 recording of Thingfinder, what exactly should I replace the m.group(1) with? The rest is pretty straightforward setting ×=1 for 1 cast.
The matcher thing is what has me confused. I'd appreciate any assistance.
Finally, you would close the snippet with the 'leave' option:
visit_url("choice.php?whichchoice=440&option=2&pwd");