I've gone through a bunch of different variations and haven't gotten the expect to map to a variable yet. Below is the send expect setup.Send: ?V\rExpect: VOL(?<myvar>)Tasker Fails on this step of the task. Next step is to flash %myvar
[
{
"timestamp": 0,
"recordType": "Start",
"recordData": "Tasker"
},
{
"timestamp": 0,
"recordType": "Version",
"recordData": "2000051"
},
{
"timestamp": 0,
"recordType": "Send/Expect Data",
"recordData": "Timeout seconds: 10\nSend (original): ?V\\r\nSend (variables replaced): ?V\\r\nExpect: VOL(?<test>[0-9]+)\n"
},
{
"timestamp": 0,
"recordType": "Connection Started",
"recordData": "192.168.0.159:8102"
},
{
"timestamp": 80,
"recordType": "Connection Completed",
"recordData": "192.168.0.159:8102"
},
{
"timestamp": 80,
"recordType": "Send",
"recordData": "?V\\r"
},
{
"timestamp": 80,
"recordType": "Data Sent",
"recordData": null
},
{
"timestamp": 81,
"recordType": "Expect",
"recordData": "VOL([0-9]+)"
},
{
"timestamp": 81,
"recordType": "Received Buffer Contains",
"recordData": ""
},
{
"timestamp": 95,
"recordType": "Received Bytes",
"recordData": "8"
},
{
"timestamp": 95,
"recordType": "Received Buffer Contains",
"recordData": "VOL131\r\n"
},
{
"timestamp": 96,
"recordType": "Expect Matched",
"recordData": "VOL131"
},
{
"timestamp": 96,
"recordType": "Capture Group",
"recordData": "testmatched 131"
},
{
"timestamp": 96,
"recordType": "Disconnect",
"recordData": null
},
{
"timestamp": 96,
"recordType": "Set Tasker Variable",
"recordData": "%test = 131"
},
{
"timestamp": 96,
"recordType": "Succeeded",
"recordData": null
}
]
Hi,I have the same problem... It doesn't seem to be the regular expression... The variable %test seems to have been set to the correct value (131), yet my next command on tasker is flash %test which doesn't return anything. I thought that maybe it had to be something with the variable in CAPS (%TEST), but that doesn't work either as it's not accepted by send/expect...Here is the log:
{
"timestamp": 96,
"recordType": "Set Tasker Variable",
"recordData": "%test = 131"
},
{
"timestamp": 96,
"recordType": "Succeeded",
"recordData": null
}
]
For those of you who experience the same problem, as David points out, you have to set a TIMEOUT on tasker and Send/Expect, otherwise the variable will not passed to tasker...