ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

"PazzPort Helper"

<< < (2/3) > >>

rjbull:
1) TapTap only seems to accept single- or double-tap, not as configurable as HotKeyIt's RapidHotkey function;
-Onesimus Prime (May 17, 2010, 05:52 PM)
--- End quote ---

It looks like it should allow you to define taps to take the place of keys missing from your keyboard, which is more or less what I thought you meant.

2) I think the temporary holding-down of certain hotkeys might be an important part of flexibility in this.  Maybe even some sort of Shift lock/toggle thing, where I click one place in a document, toggle Shift-lock on, click another place to highlight everything in between, toggle Shift-lock off.  
--- End quote ---

You've practically reinvented WordStar there - see, e.g., A Writer's Word Processor by SF author Robert Sawyer.  Meanwhile, other hotkey utilities you might check out include HotKeyP and HotKeyz (both freeware), especially the latter, which knows about keyboard redefinition.  Both can stack multiple commands from a single hotkey, including menus.

And part of my underlying question is, is this whole approach too complex?  Is there some out-of-the-box thinker who can say "Wait, what about this way that's easier to both implement for the developer and remember for the end-user?"  And I'd say, "Huh, never thought of that!"
--- End quote ---

If you hadn't requested simplicity I would have suggested PowerPro  ;)

Onesimus Prime:
Thanks, I'll look into all that...

Here's the current version of the above script (yep, still playing with that too):


--- ---#SingleInstance force

;Alt+F4
; missing: Function keys, Win key, Tab, Shift, Home, End, PgUp, PgDown, Prnt Scrn,


Ctrl & Backspace::AltTabMenu
~Ctrl::RapidHotkey("{TAB}", 2, 0.2)
~a::RapidHotkey("!^a", 3, 0.2)
~q::RapidHotkey("!{F4}",2)
~e::RapidHotkey("#z""#r""#e",3, 0.2)
~Esc::RapidHotkey("SusScript""ReloadScript""exit", 3, 0.2, 1)

Ctrl & Esc::
CoordMode, ToolTip
Tooltip,Alt+Win,45,5,2
send {LAlt down}
send {LWin down}
sleep 3000
send {LWin up}
send {LAlt up}
Tooltip,,,,2
return

Alt & Esc::
CoordMode, ToolTip
GetKeyState, ShiftState, Shift
;MsgBox %ShiftState%
if ShiftState = D
   {
   ;MsgBox At least one Shift key is down.
   Tooltip,,5,5,1
   send {Shift up}
   }
if ShiftState = U
   {
   ;MsgBox Neither Shift key is down.
   Tooltip, Shift,5,5,1
   send {Shift down}
   }
return

SusScript:
Suspend on
sleep 3000
Suspend off
return

ReloadScript:
Reload
MsgBox,0,,Reloaded
return

Exit:
ExitApp


; --------- HotKeyIt's "RapidHotkey" function ---------
; http://www.autohotkey.com/forum/viewtopic.php?t=38795

RapidHotkey(keystroke, times="", delay=0.15, IsLabel=0)
{
   Pattern := Morse(delay*1000)
   If (StrLen(Pattern) < 2 and Chr(Asc(times)) != "1")
      Return
   If (times = "" and InStr(keystroke, """"))
   {
      Loop, Parse, keystroke,""   
         If (StrLen(Pattern) = A_Index+1)
            continue := A_Index, times := StrLen(Pattern)
   }
   Else if (RegExMatch(times, "^\d+$") and InStr(keystroke, """"))
   {
      Loop, Parse, keystroke,""
         If (StrLen(Pattern) = A_Index+times-1)
            times := StrLen(Pattern), continue := A_Index
   }
   Else if InStr(times, """")
   {
      Loop, Parse, times,""
         If (StrLen(Pattern) = A_LoopField)
            continue := A_Index, times := A_LoopField
   }
   Else if (times = "")
      continue = 1, times = 1
   Else if (times = StrLen(Pattern))
      continue = 1
   If !continue
      Return
   Loop, Parse, keystroke,""
      If (continue = A_Index)
         keystr := A_LoopField
   Loop, Parse, IsLabel,""
      If (continue = A_Index)
         IsLabel := A_LoopField
   hotkey := RegExReplace(A_ThisHotkey, "[\*\~\$\#\+\!\^]")
   Loop % times
      backspace .= "{Backspace}"
   keywait = Ctrl|Alt|Shift|LWin|RWin
   Loop, Parse, keywait, |
      KeyWait, %A_LoopField%
   If ((!IsLabel or (IsLabel and IsLabel(keystr))) and InStr(A_ThisHotkey, "~") and !RegExMatch(A_ThisHotkey
   , "i)\^[^\!\d]|![^\d]|#|Control|Ctrl|LCtrl|RCtrl|Shift|RShift|LShift|RWin|LWin|Escape|BackSpace|F\d\d?|"
   . "Insert|Esc|Escape|BS|Delete|Home|End|PgDn|PgUp|Up|Down|Left|Right|ScrollLock|CapsLock|NumLock|AppsKey|"
   . "PrintScreen|CtrlDown|Pause|Break|Help|Sleep|Browser_Back|Browser_Forward|Browser_Refresh|Browser_Stop|"
   . "Browser_Search|Browser_Favorites|Browser_Home|Volume_Mute|Volume_Down|Volume_Up|MButton|RButton|LButton|"
   . "Media_Next|Media_Prev|Media_Stop|Media_Play_Pause|Launch_Mail|Launch_Media|Launch_App1|Launch_App2"))
      Send % backspace
   If (WinExist("AHK_class #32768") and hotkey = "RButton")
      WinClose, AHK_class #32768
   If !IsLabel
      Send % keystr
   else if IsLabel(keystr)
      Gosub, %keystr%
   Return
}   
Morse(timeout = 400) { ;by Laszo -> http://www.autohotkey.com/forum/viewtopic.php?t=16951 (Modified to return: KeyWait %key%, T%tout%)
   static lastkey
   tout := timeout/1000
   key := RegExReplace(A_ThisHotKey,"[\*\~\$\#\+\!\^]")
   Loop {
      t := A_TickCount
      KeyWait %key%, T%tout%
     Pattern .= A_TickCount-t > timeout
     If(ErrorLevel)
      Return Pattern
     KeyWait %key%,DT%tout%
      If (ErrorLevel)
         Return Pattern
   }
}

nudone:
(still not had chance to use your script.)

perhaps the only way you can improve any of this is to make it easy to remember how to use. or make it very intuitive. not sure what that could mean, or if it's necessary.

Onesimus Prime:
Found a small bug in the RapidHotkeys function; new version of my script coming soon...

"perhaps the only way you can improve any of this is to make it easy to remember how to use. or make it very intuitive. not sure...if it's necessary."  It probably is; a person can only conveniently remember so many key combinations!  Simplicity/intuitiveness (perhaps with expanded functionality) is part of what I'm hoping someone else has a brainstorm about!

nudone:
okay, i'm now testing the script out - could you upload the correct version, please.

i'll then try to come up with some recommendations - if there are any. might just be my own personal preferences though.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version