Success!
I've successfully launched a 'heartbeat' run on interval and kill button. Happy to share my code.
Here's my Global Code that grabs the local IP and kicks in the heartbeat code:
// ======================
// Grab Local IP of User
// ======================
gLOCALIP = @redirectprocess("ipconfig","")
gLocalIP = @replace(gLocalIP,";","-")
gLocalIP = @replace(gLocalIP,@newline(),";")
gLocalIP = @containsstringarray(gLocalIP,"IPv4",0)
gLocalIP = @replace(gLocalIP,":",";")
RunEntryOnInterval(DBColNot,120000)
Here's the heartbeat code that kicks in on form entry:
var gKillIP as string
gKillIP = @GlobalValue("gKill")
if @instr(gLocalIP,gKillip) >0
{
GlobalValue("gKill","")
FormCommit("")
@Save
ExitSesame()
}
And here's the 'Kill User' button I've created:
var gKill as string
var vKillUser as string
vKillUser = @PromptForUserInput("Which IP Would You Like To Kill?","")
if vKillUser<>""
{
GlobalValue("gKill", vKillUser)
}
Ultimately, I'd love to leave a pop up screen independent of Sesame (I think I saw something I can co-opt out of InsideSesame) saying 'you've been kicked out', but otherwise I'm pretty happy with the way this works ...