View Full Version : [HotKeyNet] Sending a slash command in Tera
Galdorf
03-29-2013, 08:47 AM
Only thing i have not figured out is how to send a slash command in tera so basically i want to send a /follow player1 via hotkey from main window (tera1) to other window that has my priest(tera2).
Did lots of searching could not find any example code.
Khatovar
03-29-2013, 09:36 AM
You'd need to use the Text (http://hotkeynet.com/ref/text.html) command
It should look something like this
<Hotkey Ctrl F>
<SendLabel w2>
<Text /follow player1>
<Key Enter>
Depending on how the entering of commands works in the game, you may need to add an enter first and a wait command before the second enter.
<Hotkey Ctrl F>
<SendLabel w2>
<Key Enter>
<Text /follow player1>
<wait 100>
<Key Enter>
luxlunae
03-29-2013, 02:45 PM
Last year when I levelled in tera with a partner I think I did find that it worked best if there was a small wait between the enter and the /follow. I was autotyping using my gaming keyboard, though, not hotkeynet, but the pause is probably still a good idea.
Galdorf
03-29-2013, 08:34 PM
Thanks that worked only thing is that window2 is set to current window i have to manually switch back to window1
Khatovar
03-30-2013, 03:10 AM
You can try adding either <Restore> or <TargetWin MAINWINDOWNAME> at the end of the command, that should put the main window back in the foreground after sending the text command. Again, you might need to also add a little wait command in there after Enter and before the Restore/TargetWin command.
jrc04444
03-31-2013, 03:12 AM
what would be the best way for lining up the crosshairs on the follower? cant find any useful info on this...
Khatovar
03-31-2013, 03:44 AM
That would be a mechanic of the game, HotKeyNet doesn't have a way to intuitively track that since it doesn't have any way of "reading" the game, which is true for all multiboxing programs. This is why there are very few people even attempting to multibox Tera. You will have to manually position the mouse on the slave. You can try using ActiveWindowTracking (http://hotkeynet.com/ref/setactivewindowtracking.html) to automatically bring the windows into the foreground when you need to position on the slave, but there's not going to be anything simple about managing slave targeting.
jrc04444
03-31-2013, 12:23 PM
not looking for an automatic lineup..just want to lets say..hold hot key that activates mouse on Window 2 lets me line up the cross hairs then release hotkey have mouse return to window 1 and continue as usual with broadcasting. Problem im having is focus window keeps changing and not going the way i want it to. Ive tried a bunch of diff scripts..heres the latest.
<UseKeyAsModifier Oem3>
<Hotkey ScrollLockOn LButton>
<SendLabel w1, w2>
<Clickmouse LButton>
<wait 250>
<RestoreMousePos>
<Else>
<SendFocusWin>
<Clickmouse LButton>
jrc04444
03-31-2013, 12:45 PM
Heres the script Ive been using. E is to reset cam position which lines up crosshairs somehwat for aoe spells. Follow works well but mouseclicks are not going well. WOuld love to be able to swithc windows lineup and return to mainwindow. Any help/corrections would be greatly appreciated. This is the sample wow script 2 on 1 edited for my use with tera. Feel free to use.
Mouseclicks as of now..when i clck left mouse it changes focus window to window 2 and if i click again it then goes back to window 1. I would love for this to work where If i hold down a hotkey..it switches to window 2 lets me line up the crosshairs..then either release hot key or press another hotkey to return to window 1 and continue broadcasting keyclicks.
Launching and renaming doesnt really work cause of the launcher window and how that works..so ive been launching and renaming manually. But if anyone cant edit that to work..that would be great too...Please HELP!
CNTRL R works to rename the windows only if the launcher is closed..which btw will not kill either instance of TERA after they are running. Atleast for me.
//-----------------------------------------------------------
// PRESS CTRL R TO RENAME Tera'S IF YOU LAUNCH THEM MANUALLY
//-----------------------------------------------------------
<Hotkey ScrollLockOn Ctrl R>
<SendPC local>
<RenameWin "TERA" Tera1>
<Hotkey ScrollLockOn Alt R>
<SendPC local>
<RenameWin "TERA" Tera2>
//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF Tera.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run "C:\ProgramData\HappyCloud\Cache\TERA\TERA-Launcher.exe">
<RenameTargetWin %2%>
//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME BOTH Tera'S.
//-----------------------------------------------------------
<Hotkey ScrollLockOn Alt Ctrl L>
<LaunchAndRename Local Tera1>
<LaunchAndRename Local Tera2>
<Hotkey ScrollLockOn g>
<SendPC local>
<SendWinm Tera2>
<key Enter>
<wait 250>
<text /follow Player Name>
<wait 300>
<key Enter>
<Hotkey ScrollLockOn Alt o>
<SendPC local>
<SendWinM Tera1>
<key Enter>
<wait 250>
<text /follow Player Name>
<wait 300>
<key Enter>
<Command SetPip>
<TargetWin Tera1>
<SetWinPos 0 0>
<SetWinSize 1920 1080>
<TargetWin Tera2>
<SetWinPos 1921 0>
<SetWinSize 1920 1080>
<Hotkey ScrollLockOn Alt w>
<SetPiP Tera2>
`
<Hotkey Alt F1>
<SetActiveWindowTracking on>
<Hotkey Alt F2>
<SetActiveWindowTracking off>
//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES
//-----------------------------------------------------------
<Label w1 Local SendWinM Tera1>
<Label w2 Local SendWinM Tera2>
//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO BOTH TeraS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<Hotkey ScrollLockOn A-Z, 0-4, 6-9, Plus, Minus, Space, F1-F12 except W, A, S, D, Q, E, G>
<SendLabel w1, w2>
<Key %Trigger%>
<Hotkey e>
<SendWinM Tera2>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH Tera'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn up, down, left, right>
<SendLabel w1, w2>
<Key %Trigger%>
//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
// THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>
<Hotkey ScrollLockOn LButton>
<SendLabel w1, w2>
<Clickmouse LButton>
<wait 250>
<RestoreMousePos>
<Else>
<SendFocusWin>
<Clickmouse LButton>
Khatovar
03-31-2013, 11:40 PM
Mouseclicks as of now..when i clck left mouse it changes focus window to window 2 and if i click again it then goes back to window 1. I would love for this to work where If i hold down a hotkey..it switches to window 2 lets me line up the crosshairs..then either release hot key or press another hotkey to return to window 1 and continue broadcasting keyclicks.
I see you have ActiveWindowTracking, but I have no idea how you're trying to use it. You also have mouse broadcasting as always on, I would advise against this as the amount of use your mouse is going to get is only going to cause the restore command to get messed up and make the mouse restore to the wrong window.
Your mouse setup doesn't have an IF, so there's never a time where ELSE comes into play, which means every time you hit your left mouse button, the mouse is moving between both windows. There's also a delay in there between hitting the left button and restoring, which is only going to compound the issue of the windows not switching back to the main.
As I said previously, your best bet is probably going to be using ActiveWindowTracking. This will automatically raise the slave window to the foreground whenever you move your mouse over it and raise the master to the foreground again when you move your mouse back. Turn on ActiveWindowTracking, move your mouse over to the slave window and position your crosshairs, leftclick and then just sweep your mouse back over to the master window. ActiveWindowTracking should put the master window back as the active window the second your mouse moves over it.
Launching and renaming doesnt really work cause of the launcher window and how that works..so ive been launching and renaming manually. But if anyone cant edit that to work..that would be great too...Please HELP!
CNTRL R works to rename the windows only if the launcher is closed..which btw will not kill either instance of TERA after they are running. Atleast for me.
In general, I really hate the Launch setup in the default script. I'd suggest reconfiguring to use the modified version from my guide on Configuring a HotKeyNet Starter Script (http://genus-industri.us/wp/2011/09/09/configuring-a-hotkeynet-starter-script/). The refined version is about halfway down the page.
If you are running from different locations, you can use RenameFromPath (http://hotkeynet.com/ref/renamefrompath.html). This is what I used for EQ2, which also has a wonky launcher. NOTE - this code is only for EQ2. You would need to do a lot of refining to make it work for another game. Heck, you might even need a lot of refining to get it to work with EQ2 at this point. It's just so you can see how I got my launch to work using RenameFromPath.
//----------------------------------------------------------
// RESIZE AND POSITION
//----------------------------------------------------------
//*
<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinRect 0 0 1920 1050>
<SendWin %2%>
<SetWinRect 1920 0 960 540>
//+
//----------------------------------------------------------
// EQ2 LAUNCH AND RENAME
//----------------------------------------------------------
//*
<Command LaunchAndRename>
<SendPC %1%>
<TargetWin "EverQuest II">
<CloseWin>
<Wait 500>
<Run %2%>
<wait 5000>
<TargetWin "EverQuest II">
<ClickMouse Window 750 525>
<wait 3000>
<TargetWin "EverQuest II">
<ClickMouse Window 350 275>
<text %3%>
<wait 50>
<Key Tab>
<text %4%>
<wait 50>
<Key Enter>
<wait 3000>
<TargetWin "EverQuest II">
<ClickMouse Screen 1250 750>
<wait 5000>
<RenameFromPath %5% %6%>
<ResizeAndPosition MAIN SLAVE>
//+
//----------------------------------------------------------
// LAUNCH HOTKEY
//----------------------------------------------------------
//*
<Hotkey LCtrl LAlt w>
<if WinDoesNotExist SLAVE>
<LaunchAndRename Local "G:\EQ2 Slave\LaunchPad.exe" NAME PASSWORD "G:\EQ2 Slave\EverQuest2.exe" SLAVE>
<endif>
<if WinDoesNotExist MAIN>
<LaunchAndRename Local "G:\EQ2\LaunchPad.exe" NAME PASSWORD G:\EQ2\EverQuest2.exe MAIN>
<endif>
<ResizeAndPosition MAIN SLAVE>
jrc04444
04-01-2013, 01:44 PM
I put active window tracking in there for that same reason..but It wasnt working because once i line up the only way to get back to main scrn without moving crosshairs was to alt/tab...otherwise you have the alt ingame menu up and some functions dont work. I had been using the standard mouseclicks in the sample scripts but those werent working either. I was holding oem3 clicking button but the focus would stay on window 2 until i release and press oem and click once more. Focus scrn wasnt working as intended..So iwas searching through the HKNet forums and was just trying a few diff things out. I know theres a restore function but I cant figure out how to set it up for working...and I have been trying toggle which seems like what im going for..but that again cant get to work...such a noob...
Maybe toggle is the best bet? if thats even possible? I just want simple..hit lets say S and toggle to window 2 then hit s again to go back? Ill see if i can find a post somewhere of that working...Thanks for your help
Launching isnt really a priority if its too much work..doing it manually is just fine.
PS i made a new thread cause i know on certain sites people frown on hijacking someone elses thread..but if its cool to keep it here..thats fine. sry
Khatovar
04-02-2013, 12:04 AM
In the code you posted, you establish Oem3 as a modifier, but don't use it in the LButton hotkey, so every Left Click is being sent to both windows.
If you want the Left Clicks to occur on both windows only when Oem3 is held, the key should look like this
<UseKeyAsModifier Oem3>
<Hotkey ScrollLockOn Oem3 LButton>
<SendLabel w1, w2>
<Clickmouse LButton>
<RestoreMousePos>
RestoreMousePos (http://hotkeynet.com/ref/restoremousepos.html) isn't the right command to use for what you're trying to do. Every time Clickmouse is activated, HKN automatically saves the current Mouse position before clicking, which overwrites the original Mouse position on the main screen. So the RestoreMousePos command in there is returning the mouse to the Last Mouse Position, which is on Window 2. This is why you have to use it twice to get it back to Window 1 - the second time you use it, the command cycles again and the new Last Mouse Position is located somewhere on Window 1. This gets even more unpredictable when the wait command is added, especially if you spam the click.
You need simply Restore (http://hotkeynet.com/ref/restore.html) to return to the original window. {This code assumes you still want it to send every Left Click. See above for the Hotkey definition if you want it to only trigger with OEM3 held}.
<Hotkey ScrollLockOn LButton>
<SendLabel w1, w2>
<Clickmouse LButton>
<Restore>
If the clicks aren't returning focus back to the main window after clicking the mouse or registering on the slave window, you will need to change your ClickMouse Settings in HotKeyNet. Under Options > Settings > ClickMouse increase the ClickMouse Delays. Start with 10 10 and increase them by 5 or 10 until the clicks respond consistently. Somewhere between 20 20 and 30 30 was required for them to work over 2 EQ2 accounts {EQ2 requires windows to be in the foreground to receive inputs}. Conversely 3 3 is what I use for WoW {WoW does not have the foreground restriction}.
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.