/interface/wireless/access-list/print
.proplist=.id
?comment=teste
/interface/wireless/access-list/remove
=.id=<your_id_here>
/interface/wireless/access-list/print
=.proplist=.id
?comment=teste
!re=
=.id=*4EB
/interface/wireless/access-list/remove
=.id=*4EB
Connected...
<<< [22] /ip/hotspot/user/print
<<< [14] =.proplist=.id
<<< [14] ?comment=teste
>>> [5/5 bytes read.
>>> [5, 32] !trap
>>> [23/23 bytes read.
>>> [23, 8] =message=argument error
>>> [5/5 bytes read.
>>> [5, 1] !done
<br />
<b>Notice</b>: Undefined offset: 0 in <b>C:\wamp\www\api\teste2.php</b> on line <b>17</b><br />
testefsfs<<< [20] /ip/hotspot/user/set
<<< [5] =.id=
<<< [13] =disabled=yes
>>> [5/5 bytes read.
>>> [5, 1] !done
Disconnected...
if ($API->connect('xxx', 'xxx', 'xxx')) {
$API->write('/ip/hotspot/user/print',false);
$API->write('=.proplist=.id',false);
$API->write('?comment=teste');
$A = $API->read();
$A = $A[0];
echo "testefsfs".$A;
$API->write('/ip/hotspot/user/set',false);
$API->write('=.id='.$A['.id'],false);
$API->write('=disabled=yes');
$API->read();
$API->disconnect();
/ip hotspot user set [find comment="teste"] disabled=yes
Buddy, i've tried to use the same commands on ROS 3.2 and ROS4.5, none of them workedfrom the first look it should work on newer systems. As you can read above queries was introduced later on than some of your installations.
what didn't work?Buddy, i've tried to use the same commands on ROS 3.2 and ROS4.5, none of them workedfrom the first look it should work on newer systems. As you can read above queries was introduced later on than some of your installations.
can you please write the complete code?
mikrotik.Send("/ip/hotspot/user/set");
mikrotik.Send("=comment=killed");
mikrotik.Send("/ip/hotspot/user/set", false);
mikrotik.Send("=comment=killed", false);
--- mikrotik.Read();
+++ List<string> test2 = mikrotik.Read();
/system/script/run
=.id=script1
!done
=ret=Hello, I'm a script! And this is my output