Jump to content

HRC - HotKey Resolution Changer [Updated 2012-May-16]


KaFu
 Share

Recommended Posts

How can I make a setting to disable screen 2 and then a setting to enable screen 2 ?? when I play games I normally want screen 2 disabled...

I'm not sure :D, definitively not with this script :D...

Though I did some research, but sadly without a satisfying solution. This one

http://www.autoitscript.com/forum/index.php?showtopic=87625&view=findpost&p=629215

can be used to toggle the monitors power. It sends a message to a window, in the example it seems to be the Desktop window itself. Maybe it works, if you first enumerate your desktop size and monitors position, create an own small invisible window on the respective monitor and than send the message to that window? Give it a try :D...

Edit: My Google search didn't came up with a satisfying solution for dual / secondary monitors either, lots of questions there but no real answers.

Edited by KaFu
Link to comment
Share on other sites

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I'm not sure :D, definitively not with this script :D...

Though I did some research, but sadly without a satisfying solution. This one

http://www.autoitscript.com/forum/index.php?showtopic=87625&view=findpost&p=629215

can be used to toggle the monitors power. It sends a message to a window, in the example it seems to be the Desktop window itself. Maybe it works, if you first enumerate your desktop size and monitors position, create an own small invisible window on the respective monitor and than send the message to that window? Give it a try :D...

Edit: My Google search didn't came up with a satisfying solution for dual / secondary monitors either, lots of questions there but no real answers.

I did just find something, I never knew this was in ATI Catalyst Control Center.

Basically you setup your settings for your two screens and then go Options > Profiles > Profile Manager.

Select "all Catalyst Control Center Settings Fill in a name at the top of the screen for example: Dual and a description: Dual Screen Settings.

Now click on Activation, Tick Hotkeys assignment and below you should see "select hotkeys modifier keys" mine is set to CTRL + ALT

The box below is "Enter a Hotkeys Selection" I have set for all this one 2 so if I press CTRL + ALT + 2 it will only keep two of my screens on.

You can also tick the box "Desktop Shortcut" which puts a shortcut on your desktop so ifyou doubble click it then your settings will change to your Dual Screen Profile

You can then go set your settings so only 1 screen is on and follow the same guide above and set it to CTRL + ALT + 1 and then when you press this it will change to 1 screen and if you do CTRL + ALT + 2 it will switch back to two screens.

I have 4 hotkeys set and so easy now

Link to comment
Share on other sites

  • 1 month later...

Changelog v0.0.2.2 > v0.0.2.7

General

  • Custom allocation of HotKeys (utilizes HotKey.au3 and HotKeyInput.au3 by Yashied, Kudos for those functions m8!)
  • Added button to re-detect supported resolutions
Source and Executable are available at

http://www.funk.eu

Best Regards

Edited by KaFu
Link to comment
Share on other sites

Changelog v0.0.2.2 > v0.0.2.7

General

  • Custom allocation of HotKeys (utilizes HotKey.au3 and HotKeyInput.au3 by Yashied, Kudos for those functions m8!)
  • Added button to re-detect supported resolutions
Source and Executable are available at

http://www.funk.eu

Best Regards

Nice, but why 0.0.2.7? Maybe 2.7 is better?

:)

Link to comment
Share on other sites

Nice, but why 0.0.2.7? Maybe 2.7 is better? :P

Thanks :idea:... I always start my scripts as version 0.0.0.1 (Version property supports four digits) and then enumarte it up, so it seldom has to say anything about the scripts maturity :)... maybe I'll switch to v1 when releasing next time, v1.0.2.7 sounds better :) ...
Link to comment
Share on other sites

  • 6 months later...

Along the same lines, I'd really like to be able to control the resolution on two monitors -- one built in laptop, the other external LCD. I think you've already provided the method for this, but I can't figure out how to specify which monitor to change resolution on. Can you help?

(My external LCD often boots at a low resolution, and even using the windows slider bar in right-click, display properties, settings, doesn't allow the slider to move to the right far enough (it doesn't know it's a 1920x1200 resolution capable).)

Link to comment
Share on other sites

  • 8 months later...
  • 4 weeks later...

Love this tool. It seems that on my virtual machine though the resolution associated with a hotkey changes when I restart the PC. Can you don't save the resolution associated with a particular hotkey?

It seems that it does actually work but it gets displayed differently on the GUI. Strange. Either way, that's all I need. It works, who cares what it looks like :)

Edited by hypertyper
Link to comment
Share on other sites

It seems that it does actually work but it gets displayed differently on the GUI. Strange. Either way, that's all I need. It works, who cares what it looks like ;)

Will take a look why the GUI is not updated correctly, glad you like it :)...
Link to comment
Share on other sites

I just double checked and it's not just the gui that's not updating. After the reboot the hotkeys remain, the resolutions both point to the current resolutions and the hotkeys don't work.

I set the resolutions with their relevant hotkeys, then I reboot the VM and when I start HRC again, the hotkeys are still there but they both point to the current resolution.

Maybe save the resolution with the hotkey? I'm not sure whether this is any different when using a normal PC rather than a VM.

Link to comment
Share on other sites

Link to comment
Share on other sites

I've installed the new version, deleted the old ini and after a restart both hotkeys still point to the same resolution. I'm using VMware workstation which I assume is part of the problem.

How about saving the relevant resolution with its hotkey in the ini file? That way the restart won't have an impact.

It would be really cool if you could get it to work. If I have time I might have a look at the source code and see if I can come up with something...

Danke

Link to comment
Share on other sites

Link to comment
Share on other sites

Behavior on change number of hotkeys was still not right, pls re-download v1.2...

Edit: And tray icon was shown to early, might confuse the app... pls re-download again...

Edit2: And while I'm at it, I added a trick I've learned today to make the font DPI aware ;)... you know the game... pls re-download again :)...

Edited by KaFu
Link to comment
Share on other sites

Hey, just a question.. have you noticed that the HotKey UDF breaks when you lock the workstation or do a Ctrl-Alt-Del in Windows 7 and use the hotkey while on the selection screen? Try it, go back into Windows, and then try your hotkeys again. I've noticed this behavior in programs I've written using the HotKey UDF. I've tried workarounds like re-hooking the hotkey callback, but it starts looking ugly after a while.

From what I've read on this before, it seems there is new behavior in Windows 7 (or was it Vista?), where it will remove hooks from the chain if they take too long to respond. But in all honesty, the hook code doesn't look like it takes much time at all (especially if it has a small list to go through).

I've tried the alternative 'GetAsyncKeyState' API call ('_IsPressed'), but that function fails when a program with a higher privilege level is running in the foreground - all keys return as not pressed! Oy, this stuff is driving me mad.

*edit: Actually, you don't even need to press the hotkey in the Ctrl-Alt-Del selection screen. Just go to it or the lock-workstation screen a few times, and eventually the hook will fall out on its own!

Edited by Ascend4nt
Link to comment
Share on other sites

That's a really great find m8 :). Never noticed this in HRC, but in another program if mine and couldn't track down why the HotKeys suddenly stop to work. Maybe unhooking and re-hooking the keys

Edit:

http://social.msdn.microsoft.com/Forums/en/windowsgeneraldevelopmentissues/thread/56093d14-c1bc-4d0a-a915-57fef0695191

http://stackoverflow.com/questions/1639331/using-global-keyboard-hook-wh-keyboard-ll-in-wpf-c

https://gist.github.com/471698

Looking at _WinAPI_SetWindowsHookEx() in HotKey.au3 is see that the dwThreadId is 0 by default ("the hook procedure is associated with all existing threads"). Maybe setting this to the calling thread with _WinAPI_GetWindowThreadProcessId($hWnd, $PID) will fix this? Will check out later ;)...

Edited by KaFu
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...