Page 1 of 1

SetForeGroundWin Problems

PostPosted: Tue Feb 02, 2010 7:02 am
by Shadek
Alright I switched my 1st computer into Window Mode. I got the screen size corrected and everything was working great.

I use <SetforegroundWin> to switch between different windows while in-game. I have my hotkeys set up like this and here are my labels.

Code: Select all
<Label Daoc1 Local SendWinSF Daoc1>
<Label Daoc2 Local SendWinSF Daoc2>
<Label Daoc3 Local SendWinSF Daoc3>
<Label Daoc4 Local SendWinSF Daoc4>
<Label Daoc5 192.168.0.197 SendWinSF Daoc5>
<Label Daoc6 192.168.0.197 SendWinSF Daoc6>
<Label Daoc7 192.168.0.197 SendWinSF Daoc7>
<Label Daoc8 192.168.0.197 SendWinSF Daoc8>


Code: Select all

<Hotkey LShift s>
<SendPC Local>
<TargetWin Daoc1>
       <SetForegroundWin>

<Hotkey LShift d>
<SendPC Local>
<TargetWin Daoc2>
       <SetForegroundWin>

<Hotkey LShift z>
<SendPC Local>
<TargetWin Daoc3>
       <SetForegroundWin>

<Hotkey LShift x>
<SendPC Local>
<TargetWin Daoc4>
       <SetForegroundWin>


Now, I have these exact same hotkeys on my 2nd computer for my other 4 toons and everything works great on there. The window gets sent to the foreground without any troubles.

The problem with my 1st computer is that sporadically, I get an error message from HKN when I switch between different windows. Here's what it says.

Code: Select all
From this pc: <TargetWin Daoc2><SetForegroundWin>
<TargetWin Daoc2> completed: Window found. Target set to 0xE0334 "Daoc2"
<SetForegroundWin> completed

From this pc: <TargetWin Daoc3><SetForegroundWin>
<TargetWin Daoc3> completed: Window found. Target set to 0x1402BC "Daoc3"
<SetForegroundWin> failed: Operating system SetForegroundWindow function failed; Windows reports system error 5, "Access is denied."

From this pc: <TargetWin Daoc4><SetForegroundWin>
<TargetWin Daoc4> completed: Window found. Target set to 0x503C0 "Daoc4"
<SetForegroundWin> failed: Operating system SetForegroundWindow function failed; Windows reports system error 5, "Access is denied."


It seems to happen randomly.. just a minute ago it was actually working perfectly then this popped back up again. Its more annoying then anything cause I have to hit the hotkey a few times to actually get the window sent to the foreground.

Re: SetForeGroundWin Problems

PostPosted: Tue Feb 02, 2010 7:10 am
by HotkeyNet
Are you running HKN as administrator?

Which version of Windows is it?

Re: SetForeGroundWin Problems

PostPosted: Tue Feb 02, 2010 7:13 am
by Shadek
Yes I'm running in admin.

Its Windows Vista Home Premium 64bit

Re: SetForeGroundWin Problems

PostPosted: Tue Feb 02, 2010 7:39 am
by HotkeyNet
Try adding <Key Ctrl> like this. I know this seems pointless and completely unrelated to the problem, but there's a reason for it.

Code: Select all
<Hotkey LShift x>
<SendPC Local>
   <SendFocusWin>
      <Key Ctrl>
   <TargetWin Daoc4>
       <SetForegroundWin>

Re: SetForeGroundWin Problems

PostPosted: Wed Feb 03, 2010 8:21 pm
by Shadek
Bada bing bada boom. You did it again :) Everything works perfectly.. No more errors!