Custom window (Slash Command): Difference between revisions
No edit summary |
No edit summary |
||
Line 61: | Line 61: | ||
*{{slashcommand|popmenu}} | *{{slashcommand|popmenu}} | ||
*{{slashcommand|quickchat}} | *{{slashcommand|quickchat}} | ||
* [[Macros]] | |||
* [[Binds]] | |||
* [[List of Slash Commands]] | * [[List of Slash Commands]] | ||
* [[List of Key Names]] | * [[List of Key Names]] | ||
* [[Communication Commands]] | * [[Communication Commands]] | ||
* [[Pet Commands]] | * [[Pet Commands]] |
Revision as of 20:07, 4 June 2022
SlashCommand
This command creates a persistent, macro-holding window.
The /custom_window command, if not setup first, will initially create a temporary, custom window that will disappear when the game is restarted. However, the real value of a custom window is that it can be made persistent. Meaning, it will automatically appear for every account on every character, new or old.
Creating the Custom Window
Before using the command, create a text file named custom.window using all lower case letters.
Syntax
Inside the text file type:
Window "MyCustomWindowName" 0 0 200 100 Button "ButtonName" "<commands>" Open 1 End
- Window tells the game this is a new window.
- "MyCustomWindowName" is a user variable that defines the name of the custom window.
- The first 2 digits define the location of the custom window on the screen, expressed as decimals. These coordinates are dynamically updated as you click and drag the window across the screen, so you really don't have to mess with these.
- The last 2 numbers define the size of the custom window. The size is dynamically updated as you resize the window with the mouse within game, so you really don't have to mess with these.
- Button tells the game to create a button.
- Open 1 creates a blank button that allows you to create a new button while in game.
- End tells the game this is the end of the custom window script.
Note: Before the Button and Open 1 commands is a tab character (unicode: U+0009) that is required for the custom window script to function properly.
Save the text file in the following folder (in all lowercase letters):
<COH_INSTALL_DIRECTORY>\data\customwindows\
If the directories/folders do not exist, then create them. If you don't know the location of the COH Install Directory on your hard drive, go in game and type:
/bindloadfile /
This will give you the location of the game's default home folder in the Global chat window, but it also points you to the general location of your COH Install Directory.
Now go into the game, and in the chat box type
/custom_window "MyCustomWindowName"
A small box will appear in the upper left corner of the screen. Click on it and the custom window will open.
Drag and drop any macro from your power trays into the custom window and a button will automatically be created with the macro's commands.
Drag the custom window to any location on your screen. Grab the edges of the custom window to resize it.
Notes
- Additional custom windows can be created using the custom_window slash command. Simply use a different name for the new custom window while in game.
- There's no command to destroy one of these yet, so you still need to text-edit the file to get rid of it.
- Custom windows can be made even more valuable by placing Popmenus inside of them using a macro with the /popmenu name command.
- TIP: The custom.window text file requires some very specific formatting to work. It's best to use the custom_window command in game before you attempt to edit the file manually, which in turn will reset the text file you created into the correct format. Then you can use a text editor and just copy/paste the formatting within the corrected file if you want to edit the file manually. Be aware that if the text file is incorrectly formatted, that the custom_window command will completely overwrite it, re-set it, and delete any data already inside the file.
See Also
- /custom_window_toggle
- /popmenu
- /quickchat
- Macros
- Binds
- List of Slash Commands
- List of Key Names
- Communication Commands
- Pet Commands
- Supergroup Commands
- Variables
External Links
This process was first detailed in 2015 by @Leandro here https://www.cohtitan.com/forum/index.php?topic=11080.msg186612#msg186612