on hotspot connect event (not on login)

Hi, there is a way to run script on hotspot connect?, I mean to run script event not login…
While someone just connect to hotspot he is apper hosts… can I run script even he isn’t login?

Use DHCP server ‘lease-script’.
This script is triggered when host connect to network and obtain address from DHCP server.
https://wiki.mikrotik.com/wiki/Manual:IP/DHCP_Server#General

HTH,

whynot
22.png

This is on login, I want prelogin… I have hotspot protected by username and password (http) and I would like to do action before…

BTW- before login user not getting “user profile”…

/ip dhcp-server set 0 lease-script=script1