Messages - Nod5 [ switch to compact view ]

Pages: prev1 ... 224 225 226 227 228 [229] 230 231 232 233 234next
1141
Post New Requests Here / Re: IDEA: Triple-Click Mouse Utility
« on: May 06, 2007, 11:43 AM »
Hi Ralf,
there are various mouse gesture programs that I think could do that. In addition to StrokeIt that Mouse mentioned Autohotkey (http://www.autohotkey.com ) is capable of mouse gesture scripts ( http://www.autohotkey.com/docs/scripts/MouseGestures.htm ).

Triple left clicks might be complicated to implement since I suppose you would still want to use single and double clicks in many contexts. So the script must often let those through but not in those cases where you want the triple click functionality.

One alternative would be to instead make a mouse middle button gesture. For example, when you hold the mouse middle button and at the same time drag the mouse up, window sends SHIFT-F2. There are two advantages here: Middle mouse clicks are seldom used in window applications so there are fewer possible conflicts. Also, holding middle mouse button and moving the mouse might be less tiring than triple clicking (I at least get tired in my right arm quickly when I do a lot of double clicking so triple would be even worse).

I made such a script for Autohotkey that sends SHIFT-F2 on middle mouse press + mouse move up. You could try it and see if it fits your needs:
~MButton::
MouseGetPos, OutputVarX, OutputVarY
sleep, 100
MouseGetPos, OutputVarXB, OutputVarYB
GetKeyState, state, MButton
if state = D
{
ydiff := OutputVarY - OutputVarYB
if ydiff > 50
Send +{F2}
}

1142
Bloodmasters 1.2 is now released:

"Yes, here it is, the long promised update! With this update I give you several bug fixes, 2 new Deathmatch maps and 3 new Capture The Flag maps. Download and enjoy! "
http://www.bloodmasters.com/

1143
Post New Requests Here / Re: Audio output device manager
« on: April 25, 2007, 02:44 AM »
lanux128,
"btw, how do you change the output device?"
Not sure what you mean here. This line in the script does it specifically:
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, %xnew%
After you change that (by just running the script), windows uses the specified device as default.
Maybe you meant recording device? If so, then there's a registry key that I think will work similarly (though I haven't tried it):
[HKEY_CURRENT_USER\Software\Microsoft\Multimedia\Sound Mapper]
"Record"="C-Media USB Headphone Set  "


skrommel, yes sadly the running programs must be restarted to be affected by the change. I've seen some programs that bypass the default device setting and choose output device on the fly but I don't know how to implement that in a script. One idea though: the trial for Virtual Audio Cable ( http://software.muzychenko.net/eng/vac.html#download ) includes the small tool audiorepeater.exe that can virtually sent audio from one device to another. Maybe a script could utilize that.

1144
Post New Requests Here / Re: Audio output device manager
« on: April 24, 2007, 07:28 AM »
lanux128, ok I hadn't seen that thread. This means aljhenry now has two script solutions to choose between. :Thmbsup: An advantage with the script above is that no audio device properties window pops up.

Come to think of it, one way to improve both scripts would be to somehow bypass the need to setup device name(s) manually in the script. When I do a quick search in the registry I find my devices listed here:

[HKEY_CURRENT_USER\Software\Microsoft\ActiveMovie\devenum\{33D9A762-90C8-11D0-BD43-00A0C911CE86}]
like this:
[HKEY_CURRENT_USER\Software\Microsoft\ActiveMovie\devenum\{33D9A762-90C8-11D0-BD43-00A0C911CE86}\C-Media USB Headphone Set  ]
"FriendlyName"="C-Media USB Headphone Set  "
[HKEY_CURRENT_USER\Software\Microsoft\ActiveMovie\devenum\{33D9A762-90C8-11D0-BD43-00A0C911CE86}\Realtek AC97 Audio]
"FriendlyName"="Realtek AC97 Audio"

Does anyone know if that location is the same for all XP installs? If so, then it would be easy to write a script that automatically grabs the names of all audio devices and then switches between them.

edit: I also find them here:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Volume Control]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Volume Control\C-Media USB Headphone Set  ]
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Volume Control\Realtek AC97 Audio]


edit2:
Ok, I just put this together. Works fine on my XP system but note that it relies on the fact that my audio device names are listed in the registry at the last location noted above. It would be great if someone could quickly check if that registry location lists audio device names on his/her PC too.

#SingleInstance force
AutoTrim, Off
;________GET AUDIO DEVICE NAMES INTO ARRAY________________
xcount = 1
Loop, HKEY_CURRENT_USER , Software\Microsoft\Windows\CurrentVersion\Applets\Volume Control,2,0
{
if A_LoopRegName = Options                 ;ignore subkey "Options"
 continue
dev%xcount% = %A_LoopRegName%     ;put audio device name in array
xcount += 1
}
xcount -= 1

;________GET CURRENT AUDIO DEVICE NAME____________________
RegRead, x, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback

;________LOOP OVER ARRAY. IF MATCH, SWITCH TO NEXT________
Loop, %xcount%
{
if dev%A_index% != %x%                ;not match current device?
 continue
xc := A_index + 1
if xc > %xcount%
xc = 1
xnew := dev%xc%                           ;name of new device
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, %xnew%
TrayTip, ,%xnew%, 2,
break
}
sleep 2000

1145
Post New Requests Here / Re: Audio output device manager
« on: April 23, 2007, 03:55 PM »
hi aljhenry,

If I understand what you write correctly you have three different sound devices. If so, then maybe I can help. You can switch between audio devices in Windows XP here:
control panel > sound and audio device properties > audio > default device
a.png
Any application running before you change the device (like a browser) must usually be closed and restarted for the change to take effect on its audio. So the process would each time be:
1. change device
2. restart/start the application you want to play the sound from

My stationary home computer has two audio devices that I switch between daily.  I wrote a script in AHK (autohotkey.com) to speed up the switching. Since the script includes the device names on my particular system, it must be modified a bit to work on your system. The script changes the default device by changing a registry key:
HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback

Here's the core of my script:
#SingleInstance force
dev1 = Realtek AC97 Audio
dev2 = C-Media USB Headphone Set%A_Space%%A_Space%
RegRead, x, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback
If x = %dev1%
{
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, %dev2%
TrayTip, ,%dev2%, 2,
}
else
{
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, %dev1%
TrayTip, ,%dev1%, 2,
}
sleep 2000
If you have 3 audio devices, it could in your case look something like this:
#SingleInstance force
dev1 = name-of-device-1
dev2 = name-of-device-2
dev3 = name-of-device-3
RegRead, x, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback
If x = %dev1%
{
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, %dev2%
TrayTip, ,%dev2%, 2,
}
if x = %dev2%
{
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, %dev3%
TrayTip, ,%dev3%, 2,
}
if x = %dev3%
{
RegWrite, REG_SZ, HKEY_CURRENT_USER, Software\Microsoft\Multimedia\Sound Mapper, Playback, %dev1%
TrayTip, ,%dev1%, 2,
}
sleep 2000
Where you should replace "name-of-device-1" and so on with the name of your audio devices as they are displayed in the sound and audio device properties. Be sure to check if there are spaces at the end of the device names! If there are spaces, add "%A_Space%" (without the quotes) in the AHK script for each space. For example, one of my audio devices is called "C-Media USB Headphone Set  " in the audio device properties and in the registry. Therefore, I have "C-Media USB Headphone Set%A_Space%%A_Space%" in the code above (again, without the quotes).

You then put the script file on the desktop and doubleclick to switch audio device.

Was this of any help?

Pages: prev1 ... 224 225 226 227 228 [229] 230 231 232 233 234next
Go to full version