Hi, trying to setup Statusbar.exe to use as a status window.
Read this thread: http://www.gammon.com.au/forum/?id=4951, an downloaded the statusbar.exe file.
Could someone explain in simple steps how to set up a trigger to display some text in the statusbar?
I copy and pasted the following into an Immediate Window and it does display the sample status bar so I know the funciton works (I did not download the amended LuaSocket stuff.)
socket = require "socket"
s = socket.udp ()
s:setpeername ("127.0.0.1", 4111)
s:send ("magic,title,Status Bar - BabbleMUD")
s:send ("magic,config,10,5,100,15,60,320,20")
s:send ("magic,size,10,10,350,140")
s:send ("magic,textcolour," .. ColourNameToRGB ("indigo"))
s:send ("magic,backcolour," .. ColourNameToRGB ("lightsteelblue"))
s:send ("magic,labels,HP,Mana,Move,XP")
s:send ("magic,values,10,20,30,80")
s:send ("magic,font,Comic Sans MS,10,0,700")
s:send ("magic,colours," ..
ColourNameToRGB ("darkgreen") .. "," ..
ColourNameToRGB ("darkblue") .. "," ..
ColourNameToRGB ("saddlebrown") .. "," ..
ColourNameToRGB ("dimgray"))
s:send ("magic,fillcolours," ..
ColourNameToRGB ("lightgreen") .. "," ..
ColourNameToRGB ("lightblue") .. "," ..
ColourNameToRGB ("tan") .. "," ..
ColourNameToRGB ("gainsboro"))
s:send ("magic,text,5,88,Darkhaven Square")
s:close ()
Supposedly you don't need Luasocket and can use the udpsend commands built into MushClient, but I can't get it to work. I also couldn't get "os.execute ('start "statusbar" "' .. GetInfo (66) .. 'StatusBar.exe"')" to work either to automatically launch statusbar.exe, which is located in the same folder as MushClient.
I tried something simple in my trigger script: UdpSend ("127.0.0.1", 4111, "magic,labels,HP,Mana,Move,XP")
But it doesn't do anything to the statusbar.exe window itself.
Any help appreciated.
Oh, and I've allowed Mushclient and Statusbar.exe to act as servers in my firewall program. |