Before I start, I just want to state that I've only been using MUSHClient for a week.
Version: 4.84
Problem: I was playing around with a blank miniwindow plugin that I created. I was using the Immediate window (Ctrl+I) and adding in text using the WindowText function. Worked perfectly.
Then I wanted to experiment with hotspots.
I used the WindowAddHotSpot function, and there were no errors, but there was no hotspot.
I tried a code snippet I found on the forums:
The only hotspots listed were the ones created inside the plugin itself. I tried adding the new hotspot code to the plugin and it worked as expected.
After playing around for a bit, I decided to try wrapping the WindowAddHotspot function in the check function. This time when running the code, I got the error "Hotspot processing must all be in same plugin".
I think this is saying that all the functions the hotspots call have to be in one place (plugin or world script).
My complaint is I would have expected the error without using the check function. It was very frustrating to have the WindowAddHotspot function fail silently the way it did.
I also looked through the documentation and couldn't find any mention of the requirement for all the hotspots being in one place.
Version: 4.84
Problem: I was playing around with a blank miniwindow plugin that I created. I was using the Immediate window (Ctrl+I) and adding in text using the WindowText function. Worked perfectly.
Then I wanted to experiment with hotspots.
I used the WindowAddHotSpot function, and there were no errors, but there was no hotspot.
function MouseDown()
Execute ( "say Hello!" )
end
txt = "(Hellow)"
txtlen = WindowTextWidth(win,font_id,txt)
WindowAddHotspot ( win, "hello" , (209-txtlen)/2, 170 , ((209-txtlen)/2)+txtlen , 170+12 , "", "", "MouseDown", "", "", "Salutations!", 1, 0)
I tried a code snippet I found on the forums:
-- show all hotspots
hotspots = WindowHotspotList(win)
if hotspots then
for _, v in ipairs (hotspots) do
Note (v)
end
end -- if any
The only hotspots listed were the ones created inside the plugin itself. I tried adding the new hotspot code to the plugin and it worked as expected.
After playing around for a bit, I decided to try wrapping the WindowAddHotspot function in the check function. This time when running the code, I got the error "Hotspot processing must all be in same plugin".
Run-time error
World: Aardwolf
Immediate execution
[string "Immediate"]:6: Hotspot processing must all be in same plugin
stack traceback:
[C]: in function 'error'
[string "Check function"]:1: in function 'check'
[string "Immediate"]:6: in main chunk
I think this is saying that all the functions the hotspots call have to be in one place (plugin or world script).
My complaint is I would have expected the error without using the check function. It was very frustrating to have the WindowAddHotspot function fail silently the way it did.
I also looked through the documentation and couldn't find any mention of the requirement for all the hotspots being in one place.