![]() |
Slash commands with OnPress, etc
ATTENTION!
IMPORTANT UPDATE! OnHide="show_window=(MainHud.stat01) show_window=(MainHud.stat01)" I stuck this in the Clock window and got Ellyana's stat box to show up ON LOAD! Yay! (UPDATE NOTE: At the moment it only works in the MainHUD root page on /loadui, not when the game loads. Sorry!) The key is that show_window works as a game setting as well as a slash command, so = works. But you also have to have it execute TWICE because the first time it just gives the Clock window a property called show_window instead of changing the game setting. Just thought everyone would like to know. We can now show ANY custom window without the need for the user to create a /show_window macro. :) UPDATE! March 02, 2005 Getting commands like /say and /gsay to work: OnPress="say='This is a test.' say='This is a test.'" The two executes much match exactly, and you must do each execute twice. So, for example, if you wanted to make a button on the player window that casted a ward and announced it (out of macro slots? :p), you would do something like this: OnPress="gsay='Warding %t!' gsay='Warding %t!' useability='Demonstration of Faith' useability='Demonstration of Faith'" Bug to be aware of. If you do a script with Anything=Somethingelse, and "Somethingelse" is a command, then you may have problems. Examples: OnPress="mood='happy' mood='happy'" OnPress="somevalue=(Some math thing that results in the number 2)" The first will execute /happy instead of /mood happy because /happy is a command. This can NOW be worked around! OnPress="'mood happy=' '" If you are in two or more chat channels, then the second script may give the message Usage: /tellchannel <channelname> <message> because it thinks you're trying to talk in the second chat channel (/2 Hello!). I'm not certain how to work around it or why it started showing up with math calculations a patch or two ago. *Discussion below* This should have been painfully obvious, I guess... The script functions OnHoverIn, OnPress, OnHide, etc., take regular old slash commands. |
whats the point?
i'll try playing with it some, but can onpress do something besides / commands? I mean, if you want /show_window keys make a hotbutton..
|
I've been trying various characters and escape sequences to get it to recognize a space, but no luck so far. Only thing new so far is
"emote1=emote2" makes it ignore emote1 and skip to emote2 Gotta head to work now, if anyone wants to take a crack at this we'd all really appreciate it. |
Haven't found anything it can do besides /commands. The idea was that, for example, Ellyana could add a button to show her stat strip on the EQII button window, instead of attaching it or making the end-user make a macro.
Or I could make a pet window with a REAL /pet attack button instead of the click-through button over the icon. You could also do OnShow on the Player window to make the Clock window load when you log in, too. :P |
ooooo onshow would be cool =)
my semi non interesting find.. you dont need the / :D i've tryed - . _ nothing works |
Does anyone know if there's a \ escape character for a space? \n for newline, \t for tab, \r for carriage return, etc. I tried   and   but those didn't work either.
|
Got further than I did.. I never did figure out if slash commands worked because I was trying the useful ones.. Silly me..
Putting them in a CDATA section doesn't work either... IE.. OnPress= "<![CDATA[/sigh]]>" does nothing as for escape chars how about \0 (zero) for a null character? edit: fixed the \ |
Quote:
Quote:
*ponder* It might help if I Google for "Escape Sequence" instead of "Escape Character"... |
Quote:
Edit: hmm, thought you asked about backspace :P |
(Backspace is \b)
In case anyone else wants to take a crack at it, posting my findings so far... "=" causes it to ignore the previous command. "\" is ignored completely, even "\\", so no escape sequences. The "/" is inserted automatically, so you can't even do 'text instead of /say text ! & | - + * are treated the same as a space. (Or, rather, the "space semicolon space" sequence that can be used for multiple commands on a single macro line, when all we want is just a space.) > < ` ~ # ^ % $ : ; [ { ] } @ ? . , ) are treated as their own characters. "(" causes the game to crash. :p ' (single quote) by itself seems to be treated as its own character. Putting two right next to eachother is treated as the space;space. If there's anything between the two then it treats it as characters with the space;space after it... experimenting with this now. |
Learned a way to keep the Target Window up with these.. If you add the command "ToggleTargetWindow" to OnHide it will keep the window up at all times..
I thought that would fix the problem with target info not clearing but it doesn't :( |
That makes it so the user doesn't have to use Alt-T to get the window to show on log-in (like is necessary using DynamicData="0000") though, right? Still useful. :D
|
Quote:
OK I've seen the graphics for the supposed ingame clock if there is a way to get it to display can you tell me? |
/show_window MainHUD.Clock
(case-sensitive) |
Quote:
Sweet! Thankyou very much! :D Why did they not document that or something lol? |
found this in the default_quickbars.ini
Code:
QUICKBAR 0 0 |
Quote:
Doesn't work for the OnEvents, but I can probably use this syntax a single macro that will toggle between two different game music volume levels when I'm running Winamp. Thanks for pointing it out. :) Bah, the last three SHOULD work for preset icons, but don't. On a side note, you could add a button to the ExpBar window with OnPress="toggleshowadventurexp" that would switch the bar between Adventure and Tradeskill experience... |
Just noticed that the pet window uses the ActionData property to controll what the icons do ie - attack has "ActionData command petAttack" im going to try and see what else I can make those buttons do.
edit: well that didnt work quite right.... there must be a limited number of action commands avaialable to be used most likely just the pet commands oh well mayby someone else can figure the rest out |
I've messed around with these a bit myself and gave up in frustration. You all found out more than I did because like Talyns I was trying to make it do useful things :p
This is such a HUGE part of the UI system that would hopefully gfive us the ability to make it more dynamic and they don't give us squat for info. It really sucks. |
WOOT!
Eloa and I have discovered the "proper" script functions for these. http://www.eq2interface.com/forums/showthread.php?t=845 Unfortunately, I can't get it to force custom windows (like Ellyana's original stat box) to show, so we still want to get slash commands working. But I did manage a self-contained, auto-showing clock window. :D |
Quote:
|
Quote:
UPDATE! OnHide="show_window=(MainHud.stat01) show_window=(MainHud.stat01)" I stuck this in the Clock window and got Ellyana's stat box to show up ON LOAD! Yay! EDIT: (UPDATE NOTE: At the moment it only works in the MainHUD root page on /loadui, not when the game loads. Sorry!) The key is that show_window works as a game setting as well as a slash command, so = works. But (like all game settings) you also have to have it execute TWICE because the first time it just gives the Clock window a property called show_window instead of changing the game setting. Just thought everyone would like to know. We can now show ANY custom window without the need for the user to create a /show_window macro. :) |
I love you Deathbane27. I've got something neat, almost ready, to celebrate.
Quib Edit: Here a link to what I made. Ituses your wonderful new trick to force a custom window to show to add an ammo indicator to the player window. http://www.eq2interface.com/download...fo.php?id=3372 |
Quote:
is the command case sensitive so normally you would use /show_window MainHUD.Inventory or something. I can't get my window to autoshow. |
Edit: Me dumb. When I first used it, it was in the Target window. I switched it over to MainHUD and checked if it worked there, but I only tested that with /loadui. It doesn't work on load. I recommend hijacking the clock window for this.
|
Semi important discovery relating to OnEvents:
When you have an OnEvent property, all actions on the same line within the OnEvent execute in order from right to left. If you add line returns within the OnEvent, they go from top to bottom, with commands on individual lines (if you have more than 1 on some lines) still execute from right to left. Examples follow: OnPress="x=3 x=2 x=1" In this event, x would equal 3. OnPress="x=3 x=2 x=1" In this event, x would equal 1. OnPress="x=3 x=2 x=1" In this event, x would equal 2. I think that's simple enough. Just adding to our knowledge base. Quib |
UPDATE!
Getting commands like /say and /gsay to work: OnPress="say='This is a test.' say='This is a test.'" The two executes much match exactly, and you must do each execute twice. So, for example, if you wanted to make a button on the player window that casted a ward and announced it (out of macro slots? :p), you would do something like this: OnPress="gsay='Warding %t!' gsay='Warding %t!' useability='Demonstration of Faith' useability='Demonstration of Faith'" Bug to be aware of. If you do a script with Anything=Somethingelse, and "Somethingelse" is a command, then you may have problems. Examples: OnPress="mood='happy' mood='happy'" OnPress="somevalue=(Some math thing that results in the number 2)" The first will execute /happy instead of /mood happy because /happy is a command. No known way to work around this. If you are in two or more chat channels, then the second script may give the message Usage: /tellchannel <channelname> <message> because it thinks you're trying to talk in the second chat channel (/2 Hello!). I'm not certain how to work around it or why it started showing up with math calculations a patch or two ago. |
Interesting...
|
Quote:
The message that pops up in the other chat window. I was also getting that message with my Performance Panel mod for a while. I 'think' it was when I gave it a whole number value instead of a decimal value. But I'm not where I can test it. Once I had all the commands in the correct order and formated it seemed dissapeared. So you might try throwing in 2.0 instead of 2. On Setting the mood. For commands that set states. Like Mood, you might try a number instead of the text. mood="2.0" maybe it's some sort of indexed list that the command is interpreted by the chat windows, but not when you use the command through a script. EDIT: Also... Perhaps social animations are boolean values? Since the macros like /dance are animations that start and stop. It's possible those are set to true or 0 or 1 and that starts the timer, it runs out and the value is reset to false. The moods might work the same way? happy = true and you stay happy, since it's not a timed animation. or mood.happy=enabled. |
Quote:
I just had some real fun with this! Check the release section for the MainHUD.PerformancePanel mod for more details. But this main thing is that if you are working with numbers on OnEvents. Always. Always. Use Decimals. If you use decimal values you will not get the error in your chat window. It was causing some really freaky behavior with some things that was very hard to figure out. Some of the numbers would work and some wouldn't.. I tried switching the ones in my file that were causing the errors to decimal number, but that wouldn't fix the problem. like r_light_priority=1 to r_light_priority=1.0 But that didn't fix it. The reason was because there were OTHER numbers in the Event that would cause the error then. Once I changed ALL of them, the problem went away. So, if you are getting those errors, throw a decimal in and you should be fine. |
Quote:
|
| All times are GMT -5. The time now is 08:58 AM. |
vBulletin® - Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
© MMOUI