View Full Version : Problem with maxfps and maxfpsbk
rahven32
06-11-2009, 04:18 AM
For some reason maxfpsbk is not working for hkn. The background window's still think they are focused. I can go and click them individually on the task bar and when I've clicked them all they will work till i switch pip again. For some reason window's, wow, or something isnt reading them going to the back ground. Anyone have any idea? I'm using win7 if that helps. It worked fine in keyclone but decided to work my way thru a hkn script since keyclone still cant do left and right mod's.
Freddie
06-11-2009, 05:35 AM
Could you post your script please. I need to see the labels and the PIP section.
rahven32
06-11-2009, 06:15 AM
Sure
//-----------------------------------------------------------
// SUBROUTINE TO Position Windows.
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinRect 384 0 1536 1200>
<SendWinM %2%>
<SetWinRect 0 0 384 300>
<SendWinM %3%>
<SetWinRect 0 300 384 300>
<SendWinM %4%>
<SetWinRect 0 600 384 300>
<SendWinM %5%>
<SetWinRect 0 900 384 300>
//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run %2%>
<RenameTargetWin %3%>
<RemoveWinFrame>
<SetAffinity all> //%2%
//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME YOUR WOW WINDOWS. all = affinity
//-----------------------------------------------------------
<Hotkey Alt Ctrl L>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 1\wow.exe" WoW1 all>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 2\wow.exe" WoW2 all>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 3\wow.exe" WoW3 all>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 4\wow.exe" WoW4 all>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 5\wow.exe" WoW5 all>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
//-----------------------------------------------------------
// HOTKEY TOGGLE
//-----------------------------------------------------------
<hotkey pause>
<sendpc local>
<ToggleHotkeys>
//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 Local SendWinM WoW3>
<Label w4 Local SendWinM WoW4>
<Label w5 Local SendWinM WoW5>
//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F8>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW1>
<Key F8>
<Hotkey F9>
<ResizeAndPosition WoW2 WoW1 WoW3 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW2>
<Key F9>
<Hotkey F10>
<ResizeAndPosition WoW3 WoW2 WoW1 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW3>
<Key F10>
<Hotkey F11>
<ResizeAndPosition WoW4 WoW2 WoW3 WoW1 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW4>
<Key F11>
<Hotkey F12>
<ResizeAndPosition WoW5 WoW2 WoW3 WoW4 WoW1>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW5>
<Key F12>
//-----------------------------------------------------------
// DEFINE KEYLIST FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO ALL WINDOWS.
//-----------------------------------------------------------
<KeyList MyList AllMainKeys except Oem3, PgDn, PgUp, Up, Down, Left, Right, 1-9, F, G, Pause, a, s, d, w, tab, m, F8-F12>
//-----------------------------------------------------------
// DEFINE HOTKEY
//-----------------------------------------------------------
<Hotkey MyList; Shift MyList; Alt MyList; Ctrl MyList>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
//-----------------------------------------------------------
// MOVEMENT KEYS
//-----------------------------------------------------------
<MovementHotkey Up, Down, Left, Right>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS.
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>
<Hotkey Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3, w4, w5>
<ClickMouse %TriggerMainKey%>
//-----------------------------------------------------------
// FTL Templates
// %1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
//-----------------------------------------------------------
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>
<EndTemplate>
//-----------------------------------------------------------
// %1% : master key
// %2% : slave key
// %3% : modifier
// %4% : Active window
// %5% : Slave Windows
//-----------------------------------------------------------
<Template SendLeaderless>
<If ActiveWinIs %4%>
<ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>
//------------------------------------------------------------
// %1% : master-key
// %2% : slave-key
//------------------------------------------------------------
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" WoW5 "w1,w2,w3,w4">
<EndTemplate>
//------------------------------------------------------------
//Definition of FTL keys
//------------------------------------------------------------
<ApplyTemplate FTL 9 9>
<ApplyTemplate FTL 1 1>
<ApplyTemplate FTL 2 2>
<ApplyTemplate FTL 3 3>
<ApplyTemplate FTL 4 4>
<ApplyTemplate FTL 5 5>
<ApplyTemplate FTL 6 6>
<ApplyTemplate FTL 7 7>
<ApplyTemplate FTL 8 8>
<ApplyTemplate FTL F F>
<ApplyTemplate FTL G G>
Freddie
06-11-2009, 06:33 AM
That's a very neat script! Makes it easy for me to read, thanks. :)
The reason your PIP hotkeys don't change the focus is because there isn't any command in the script that changes focus.
There's nothing in the script to alter which windows are background and foreground.
Maybe you thought <TargetWin> changes focus but it can't because <TargetWin> specifies the window that receives keystrokes from HotkeyNet, and HotkeyNet sends keystrokes to background windows.
To change the focus you can add <SetForegroundWin> right after <TargetWin> at the end of each PIP hotkey.
rahven32
06-11-2009, 06:42 AM
Thank you very much for helping =)
Try to keep it nice and neat makes it so much easier for me to edit hehe. Especially since I'm pretty much winging it lol.
Thanks again =)
Freddie
06-11-2009, 06:47 AM
Well you've got good wings. I would have guessed you're a professional programmer. :)
rahven32
06-11-2009, 07:03 AM
hmm that didnt work, could it be <setfocus>? Now that I know what I'm looking for that seems it might work.
Nm that seems to be for keyboard. Maybe I didn't put it in the right spot.
//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F8>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW1>
<SetForegroundWin>
<Key F8>
<Hotkey F9>
<ResizeAndPosition WoW2 WoW1 WoW3 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW2>
<SetForegroundWin>
<Key F9>
<Hotkey F10>
<ResizeAndPosition WoW3 WoW2 WoW1 WoW4 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW3>
<SetForegroundWin>
<Key F10>
<Hotkey F11>
<ResizeAndPosition WoW4 WoW2 WoW3 WoW1 WoW5>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW4>
<SetForegroundWin>
<Key F11>
<Hotkey F12>
<ResizeAndPosition WoW5 WoW2 WoW3 WoW4 WoW1>
<SendLabel w1, w2, w3, w4, w5>
<TargetWin WoW5>
<SetForegroundWin>
<Key F12>
Does that look right?
Freddie
06-11-2009, 07:24 AM
SetForegroundWin requires an argument, the name of the window.
Isn't that generating a red error message? It should.
You would think (judging from the name) that SetFocus is the right command, but I took the names "SetFocus" and "SetForegroundWin" from the operating system API, and those names have peculiar meanings in the API. Their meanings got sort of screwed up when Microsoft added multithreading to Windows. It's a long complicated story but the bottom line is, SetForegroundWin is the right command.
If it still doesn't work make sure "Clear modifiers before executing hotkeys" is checked on Settings. (This is for diagnostic purposes). If that works and you want that setting unchecked I'll tell you a way to do that.
rahven32
06-11-2009, 07:26 AM
Nope no errors. Just trying argument. Err trying arguments now =)
Just to be clear I need to put <SetForegroundWin wow1> correct? or does the name go outside of the brackets?
Freddie
06-11-2009, 07:30 AM
P.S. Windows tries to prevent programs like HotkeyNet from changing which window is in the foreground. HotkeyNet has to take some complicated measures to outwit the operating system's policy and be able to bring windows to the foreground. Vista was more clever at this than XP, and it wouldn't surprise me if Win 7 is more clever than Vista. I haven't seen Win 7 yet. It's possible that Microsoft added something to Win 7 that outwits HotkeyNet's foreground-setting code and prevents it from working. But nobody has told me this up till now and lots of people are using HotkeyNet on Win 7.
Freddie
06-11-2009, 07:31 AM
Nope no errors. Just trying argument. Err trying arguments now =)
Woops my mistake! Sorry. it doesn't take an argument. (I don't use HotkeyNet myself and I wrote that stuff more than a year ago.)
rahven32
06-11-2009, 07:42 AM
Hehe I edited while you were typing i guess so i replied ahead of you! whoops.
Well keyclone manages it somehow so I know it's doable. What is just <SetForeground> without the win?
Freddie
06-11-2009, 07:44 AM
<SetForegroundWin> targets the currently targeted window -- in this case the one you just specified with <TargetWin> -- so it doesn't need an argument. I forgot I wrote it that way.
Is "Clear modifiers before executing hotkeys" unchecked? That would explain it.
rahven32
06-11-2009, 07:45 AM
No it's checked
Freddie
06-11-2009, 07:47 AM
Did you launch the program with "run as administrator"?
rahven32
06-11-2009, 07:47 AM
Hmm what is disable foreground lock? in the settings it's checked.
rahven32
06-11-2009, 07:48 AM
Yeah I have it set to always run as admin
Freddie
06-11-2009, 07:49 AM
Did you upgrade to a new build of HotkeyNet without changing the shortcut? On Vista that erases the "run as admin" command and it might be the same with Win 7.
Freddie
06-11-2009, 07:51 AM
Hmm what is disable foreground lock? in the settings it's checked.
Disable foreground lock is one of the things HotkeyNet does to outwit the operating system's attempts to prevent HotkeyNet from bringing windows to the foreground.
rahven32
06-11-2009, 07:51 AM
Don't use a shortcut I start it straight from the folder I have it in.
Freddie
06-11-2009, 08:01 AM
Would you mind doing a little testing to help me figure out what's wrong? Let's make a pair of extremely simple hotkeys in a new script all by themselves.
Please drag WoW1 and/or WoW2 so they partly overlap so you can see if the foreground window changes.
<Hotkey F1>
<TargetWin WoW1>
<SetForegroundWin>
<Hotkey F2>
<TargetWin WoW2>
<SetForegroundWin>
Do those work?
rahven32
06-11-2009, 08:05 AM
That works
rahven32
06-11-2009, 08:14 AM
Think it has something to do with <ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>?
Freddie
06-11-2009, 08:25 AM
The commmand looks fine to me. Maybe it's because you're sending SetForegroundWin five times in each hotkey, although I'm not sure why Windows would care. That happens because it's included in SendLabel, and SendLabel happens five times since there are five labels. The Sendlabel statement doesn't accomplish anything here so you can remove it.
Why did you include the <Key> statement in the hotkeys?
How about rewriting the hotkeys like this:
<Hotkey F8>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<TargetWin WoW1>
<SetForegroundWin>
rahven32
06-11-2009, 08:35 AM
Wrote it like that and it's still doing it. As far as key goes I wrote it out bare with just keys at first and just forgot to get rid of those.
Freddie
06-11-2009, 08:41 AM
There must be something in the script I'm not noticing. Could you post the complete script in its exact current form? I'll load it into HotkeyNet and watch it execute in the debugger.
rahven32
06-11-2009, 08:47 AM
//-----------------------------------------------------------
// SUBROUTINE TO Position Windows.
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<SendWin %1%>
<SetWinRect 384 0 1536 1200>
<SendWinM %2%>
<SetWinRect 0 0 384 300>
<SendWinM %3%>
<SetWinRect 0 300 384 300>
<SendWinM %4%>
<SetWinRect 0 600 384 300>
<SendWinM %5%>
<SetWinRect 0 900 384 300>
//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run %2%>
<RenameTargetWin %3%>
<RemoveWinFrame>
<SetAffinity all> //%2%
//-----------------------------------------------------------
// HOTKEY TO LAUNCH AND RENAME YOUR WOW WINDOWS. all = affinity
//-----------------------------------------------------------
<Hotkey Alt Ctrl L>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 1\wow.exe" WoW1 all>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 2\wow.exe" WoW2 all>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 3\wow.exe" WoW3 all>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 4\wow.exe" WoW4 all>
<LaunchAndRename Local "C:\Users\Public\Games\World of Warcraft 5\wow.exe" WoW5 all>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
//-----------------------------------------------------------
// HOTKEY TOGGLE
//-----------------------------------------------------------
<hotkey pause>
<sendpc local>
<ToggleHotkeys>
//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 Local SendWinM WoW3>
<Label w4 Local SendWinM WoW4>
<Label w5 Local SendWinM WoW5>
//----------------------------------------------------------------
//Window Switching
//----------------------------------------------------------------
<Hotkey F8>
<ResizeAndPosition WoW1 WoW2 WoW3 WoW4 WoW5>
<TargetWin WoW1>
<SetForegroundWin>
<Hotkey F9>
<ResizeAndPosition WoW2 WoW1 WoW3 WoW4 WoW5>
<TargetWin WoW2>
<SetForegroundWin>
<Hotkey F10>
<ResizeAndPosition WoW3 WoW2 WoW1 WoW4 WoW5>
<TargetWin WoW3>
<SetForegroundWin>
<Hotkey F11>
<ResizeAndPosition WoW4 WoW2 WoW3 WoW1 WoW5>
<TargetWin WoW4>
<SetForegroundWin>
<Hotkey F12>
<ResizeAndPosition WoW5 WoW2 WoW3 WoW4 WoW1>
<TargetWin WoW5>
<SetForegroundWin>
//-----------------------------------------------------------
// DEFINE KEYLIST FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO ALL WINDOWS.
//-----------------------------------------------------------
<KeyList MyList AllMainKeys except Oem3, PgDn, PgUp, Up, Down, Left, Right, 1-9, F, G, Pause, a, s, d, w, tab, m, F8-F12>
//-----------------------------------------------------------
// DEFINE HOTKEY
//-----------------------------------------------------------
<Hotkey MyList; Shift MyList; Alt MyList; Ctrl MyList>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
//-----------------------------------------------------------
// MOVEMENT KEYS
//-----------------------------------------------------------
<MovementHotkey Up, Down, Left, Right>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>
//-----------------------------------------------------------
// FORMATION SETUP. MOVING EACHSLAVE TOON UP, DOWN, LEFT,
// AND RIGHT EXCEPT FOR THE MAIN TOON.
// S2
// S4 M1 S5 M=MAIN
// S3 S#=SLAVES
//
// KEYBOUND IN WOW=
// SLAVE4 PGUP=STRAFE LEFT PGDN=STRAFE RIGHT
// SLAVE5 PGUP=STRAFE RIGHT PGDN=STRAFE LEFT
//-----------------------------------------------------------
<MovementHotkey PgUp>
<SendLabel w2>
<Key Up>
<SendLabel w3>
<Key Down>
<SendLabel w4>
<Key PgUp>
<SendLabel w5>
<Key PgUp>
<MovementHotkey PgDn>
<SendLabel w2>
<Key Down>
<SendLabel w3>
<Key Up>
<SendLabel w4>
<Key PgDn>
<SendLabel w5>
<Key PgDn>
//-----------------------------------------------------------
// 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 Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3, w4, w5>
<ClickMouse %TriggerMainKey%>
//-----------------------------------------------------------
// FTL Templates
// %1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
//-----------------------------------------------------------
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>
<EndTemplate>
//-----------------------------------------------------------
// %1% : master key
// %2% : slave key
// %3% : modifier
// %4% : Active window
// %5% : Slave Windows
//-----------------------------------------------------------
<Template SendLeaderless>
<If ActiveWinIs %4%>
<ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>
//------------------------------------------------------------
// %1% : master-key
// %2% : slave-key
//------------------------------------------------------------
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt" WoW1 "w2,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW2 "w1,w3,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rshift" WoW3 "w1,w2,w4,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rshift" WoW4 "w1,w2,w3,w5">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl ralt" WoW5 "w1,w2,w3,w4">
<EndTemplate>
//------------------------------------------------------------
//Definition of FTL keys
//------------------------------------------------------------
<ApplyTemplate FTL 9 9>
<ApplyTemplate FTL 1 1>
<ApplyTemplate FTL 2 2>
<ApplyTemplate FTL 3 3>
<ApplyTemplate FTL 4 4>
<ApplyTemplate FTL 5 5>
<ApplyTemplate FTL 6 6>
<ApplyTemplate FTL 7 7>
<ApplyTemplate FTL 8 8>
<ApplyTemplate FTL F F>
<ApplyTemplate FTL G G>
There ya go.
Freddie
06-11-2009, 08:48 AM
Thanks. I think maybe I see the problem. The command uses SendWin for one of the windows. SendWin changes the foreground window. Could you try rewriting the command with TargetWin like this:
//-----------------------------------------------------------
// SUBROUTINE TO Position Windows.
//-----------------------------------------------------------
<Command ResizeAndPosition>
<SendPC Local>
<TargetWin %1%>
<SetWinRect 384 0 1536 1200>
<TargetWin %2%>
<SetWinRect 0 0 384 300>
<TargetWin %3%>
<SetWinRect 0 300 384 300>
<TargetWin %4%>
<SetWinRect 0 600 384 300>
<TargetWin %5%>
<SetWinRect 0 900 384 300>
rahven32
06-11-2009, 09:03 AM
And we have a winner! That fixed it right up. Thank you =) It was pegging my cpu at 100% just standing around idle. No way I could of done anything.
Was close to giving up and just using SetActiveWindowTracking or something like that to have focus follow the mouse and just wave my mouse around when I switched. Wouldn't of been very elegant but would of worked in a pinch =p
Freddie
06-11-2009, 09:19 AM
You're welcome. Sorry this took so long. I should have seen it right away. I think I've forgotten so much about the program that it's getting hard for me to give user support. :(
vBulletin® v4.2.2, Copyright ©2000-2025, Jelsoft Enterprises Ltd.