Messages - damax [ switch to compact view ]

Pages: [1] 2 3 4 5 6 7next
1
Screenshot Captor / Re: Resize image dialog is buggy in Windows 7
« on: January 29, 2021, 07:24 AM »
 :D :D :D Is this really still active? I had forgotten about this like 4 years ago :D :D :D
Not that I still have a computer running Win7 any more :D

2
TapTap / Re: CTRL-C shortcut not recognized in Win7-Explorer
« on: September 07, 2016, 05:14 AM »
@IanB: Ooooh. That's a nice and clean solution. Alas, I'd really like a Double-Tap-thing like it was in TapTap ('cos RCtrl+m and even worse RCtrl+n are still quite awkward key-combos to use), so I tried to do it with RapidHotKey. Which kinda works although it's quite an ugly script...

Code: Autohotkey [Select]
  1. ; thanks to https://autohotkey.com/board/topic/35566-rapidhotkey/
  2.  
  3.  
  4. ~RShift::RapidHotkey("^c", 2, 0.1) ;COPY
  5. ~RControl::RapidHotkey("^v", 2, 0.1) ;PASTE
  6.  
  7.  
  8. RapidHotkey(keystroke, times="2", delay=0.2, IsLabel=0)
  9. {
  10.         Pattern := Morse(delay*1000)
  11.         If (StrLen(Pattern) < 2 and Chr(Asc(times)) != "1")
  12.                 Return
  13.         If (times = "" and InStr(keystroke, """"))
  14.         {
  15.                 Loop, Parse, keystroke,""
  16.                         If (StrLen(Pattern) = A_Index+1)
  17.                                 continue := A_Index, times := StrLen(Pattern)
  18.         }
  19.         Else if (RegExMatch(times, "^\d+$") and InStr(keystroke, """"))
  20.         {
  21.                 Loop, Parse, keystroke,""
  22.                         If (StrLen(Pattern) = A_Index+times-1)
  23.                                 times := StrLen(Pattern), continue := A_Index
  24.         }
  25.         Else if InStr(times, """")
  26.         {
  27.                 Loop, Parse, times,""
  28.                         If (StrLen(Pattern) = A_LoopField)
  29.                                 continue := A_Index, times := A_LoopField
  30.         }
  31.         Else if (times = "")
  32.                 continue := 1, times := 2
  33.         Else if (times = StrLen(Pattern))
  34.                 continue = 1
  35.         If !continue
  36.                 Return
  37.         Loop, Parse, keystroke,""
  38.                 If (continue = A_Index)
  39.                         keystr := A_LoopField
  40.         Loop, Parse, IsLabel,""
  41.                 If (continue = A_Index)
  42.                         IsLabel := A_LoopField
  43.         hotkey := RegExReplace(A_ThisHotkey, "[\*\~\$\#\+\!\^]")
  44.         IfInString, hotkey, %A_Space%
  45.                 StringTrimLeft, hotkey,hotkey,% InStr(hotkey,A_Space,1,0)
  46.         backspace := "{BS " times "}"
  47.         keywait = Ctrl|Alt|Shift|LWin|RWin
  48.         Loop, Parse, keywait, |
  49.                 KeyWait, %A_LoopField%
  50.         If ((!IsLabel or (IsLabel and IsLabel(keystr))) and InStr(A_ThisHotkey, "~") and !RegExMatch(A_ThisHotkey
  51.         , "i)\^[^\!\d]|![^\d]|#|Control|Ctrl|LCtrl|RCtrl|Shift|RShift|LShift|RWin|LWin|Alt|LAlt|RAlt|Escape|BackSpace|F\d\d?|"
  52.         . "Insert|Esc|Escape|BS|Delete|Home|End|PgDn|PgUp|Up|Down|Left|Right|ScrollLock|CapsLock|NumLock|AppsKey|"
  53.         . "PrintScreen|CtrlDown|Pause|Break|Help|Sleep|Browser_Back|Browser_Forward|Browser_Refresh|Browser_Stop|"
  54.         . "Browser_Search|Browser_Favorites|Browser_Home|Volume_Mute|Volume_Down|Volume_Up|MButton|RButton|LButton|"
  55.         . "Media_Next|Media_Prev|Media_Stop|Media_Play_Pause|Launch_Mail|Launch_Media|Launch_App1|Launch_App2"))
  56.                 Send % backspace
  57.         If (WinExist("AHK_class #32768") and hotkey = "RButton")
  58.                 WinClose, AHK_class #32768
  59.         If !IsLabel
  60.                 Send % keystr
  61.         else if IsLabel(keystr)
  62.                 Gosub, %keystr%
  63.         Return
  64. }
  65. Morse(timeout = 400) { ;by Laszo -> http://www.autohotkey.com/forum/viewtopic.php?t=16951 (Modified to return: KeyWait %key%, T%tout%)
  66.    tout := timeout/1000
  67.    key := RegExReplace(A_ThisHotKey,"[\*\~\$\#\+\!\^]")
  68.    IfInString, key, %A_Space%
  69.                 StringTrimLeft, key, key,% InStr(key,A_Space,1,0)
  70.         If Key in Shift,Win,Ctrl,Alt
  71.                 key1:="{L" key "}{R" key "}"
  72.    Loop {
  73.       t := A_TickCount
  74.       KeyWait %key%, T%tout%
  75.                 Pattern .= A_TickCount-t > timeout
  76.                 If(ErrorLevel)
  77.                         Return Pattern
  78.     If key in Capslock,LButton,RButton,MButton,ScrollLock,CapsLock,NumLock
  79.       KeyWait,%key%,T%tout% D
  80.     else if Asc(A_ThisHotkey)=36
  81.                 KeyWait,%key%,T%tout% D
  82.     else
  83.       Input,pressed,T%tout% L1 V,{%key%}%key1%
  84.         If (ErrorLevel="Timeout" or ErrorLevel=1)
  85.                 Return Pattern
  86.         else if (ErrorLevel="Max")
  87.                 Return
  88.    }
  89. }

Thank a TON for your support so far.

3
TapTap / Re: CTRL-C shortcut not recognized in Win7-Explorer
« on: September 06, 2016, 04:48 AM »
OKAY! I finally found some time and solved my problem. (No, I haven't. See update).

As IanB suggested I used AutoHotKey, created a script, compiled it et voilĂ ... it works. Better than ever ;)

If anyone's interested, here's the AHK code:

Code: Autohotkey [Select]
  1. ; AHK Script to redirect Double-Shift to Ctrl+C and Double-Ctrl to Ctrl+V
  2. ; Idea came from this Reddit: https://www.reddit.com/r/AutoHotkey/comments/44pn3m/double_tap_short_cut/
  3. ; done by daMax (//todamax.net)
  4.  
  5. Shift::
  6.  if (A_PriorHotkey = "Shift" AND A_TimeSincePriorHotkey < 250)
  7.  {
  8.     ; MsgBox double-click Shift.
  9.     Send, ^c
  10.   }
  11.   else
  12.   {
  13.   ; no double-click. just wait for the key to be released and move on with your life
  14.   KeyWait, Shift
  15.   return
  16. }
  17.  
  18.  if (A_PriorHotkey = "Control" AND A_TimeSincePriorHotkey < 250)
  19.  {
  20.     ;MsgBox double-click Control.
  21.     Send, ^v
  22.   }
  23.   else
  24.   {
  25.   ; no double-click. just wait for the key to be released and move on with your life
  26.   return
  27. }

This now seems to work in Windows Explorer, Notepad, Firefox etc.

I uploaded the finished EXE to my blog:
http://blog.todamax.net/wp-content/uploads/2016/09/daMaxCopyPaste.zip

You can also find the script there: http://blog.todamax.net/wp-content/uploads/2016/09/daMaxCopyPaste.ahk

Update: aahrg! It's no good :( now the Shift-Key doesn't work "on its own" anymore, so I cannot Shift keys at all. FAIL :(

4
TapTap / Re: CTRL-C shortcut not recognized in Win7-Explorer
« on: August 04, 2016, 01:38 AM »
Mouser? Still there?

5
TapTap / Re: CTRL-C shortcut not recognized in Win7-Explorer
« on: July 28, 2016, 05:03 PM »
Yeah, I guess I am the last user, but it's really a great tool for lefties like me.  :Thmbsup:

If you would make a 64bit build, I'd gladly test it.

I have zero experience with C++ (I'm a Managed Code N00b), so I will probably not be of much help, but I would give it a try anyways. With a Visual Studio project, even I should be able to set a breakpoint or something ;) I have no clue as how to detect a non-detected double-key-press but still I'd give it a try.

You got my mail address so if it's a small project just throw it over the fence or send me a link where to get it.

Pages: [1] 2 3 4 5 6 7next
Go to full version