ScriptUO

Official ScriptUO EasyUO Scripts => Script Snippets => Topic started by: Cerveza on March 21, 2009, 05:44:57 AM

Title: Status in Menu
Post by: Cerveza on March 21, 2009, 05:44:57 AM
This is a simple way of seeing whats happening throughout your script. I have this in one of my tutorials, but it probably needed to be here as well.

Put this code at the beginning of your script, BEFORE your mainloop, to bring up the menu:

Code: [Select]
gosub showEUOMenu1
Put this code at the end of your script:

Code: [Select]
;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
  menu Clear
  menu Window Title Cerv's Status Menu
  menu Window Color Lime
  menu Window Size 207 27
  menu Font Transparent #true
  menu Font Align Right
  menu Font Name MS Sans Serif
  menu Font Size 8
  menu Font Style
  menu Font Color WindowText
  menu Font Transparent #false
  menu Font Align Left
  menu Font BGColor Red
  menu Text c1 5 5 -
  menu Show 421 270
return
;--------- EasyUO Menu Designer Code End ---------

Now, anywhere you want to update the status of your script just insert this line:

Code: [Select]
menu set c1 "Your Comments"
You can put anything you want into the "Your Comments". Even system variables like #time. I like to use the line number of the script... like

menu set c1 Scanning for new users..... Line 344

So I know exactly whats goin on.
Title: Re: Status in Menu
Post by: Endless Night on March 22, 2009, 11:47:55 AM
An even easier way is to set EUOs title

http://wiki.easyuo.com/index.php/SetUOTitle

Title: Re: Status in Menu
Post by: Cerveza on March 22, 2009, 04:50:40 PM
Thats a great way of showing status, unless you run UOAssist.

I normally not mess with the title because I have UOA.