Messages - Nod5 [ switch to compact view ]

Pages: prev1 ... 224 225 226 227 228 [229] 230 231 232 233 234 235next
1141
Post New Requests Here / Re: IDEA: Triple-Click Mouse Utility
« on: May 07, 2007, 02:55 AM »
Ralf,
glad to hear StrokeIt is working for you... Here's a triple click script for Autohotkey. It lets all clicks through to windows so watch out for accidental single/double click commands when trying to triple click. Also, it only sends the command tied to triple click if a certain process has focus (notepad.exe below, change that to whatever process name you want to send SHIFT + F2 to)

~LButton::
WinGet, xproc, ProcessName, A
if xproc != notepad.exe
 return

if t1 =
 {
 t1 = %A_Now%
 return
 }

if t2 =
 {
 if (A_Now - t1) < 1
   t2 = %A_Now%
 else
   t1 =
 return
 }

if (A_Now - t1) < 1
 {
 Send +{F2}
 t1 =
 t2 =
 return
 }

t1 = %A_Now%
t2 =

1142
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}
}

1143
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/

1144
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.

1145
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

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