Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Windows 7 flicks
#1
Hi I configured flicks to use hotkeys to trigger QM macros. However the macros are not always triggered. I'm thinking the qm keyboard triggers does not detect flicks hotkeys correctly. Is it possible to create some sort of user defined triggers for detecting flicks directly? or is there a better work around? Here is the msdn on flicks windows messages?

http://msdn.microsoft.com/en-us/library/ms701172(VS.85).aspx
#2
Quote:Is it possible to create some sort of user defined triggers for detecting flicks directly?

Should be possible, I'll try it later.
#3
Hi Gintaras, thank you for reading my post. I hope there is a way to hook up the triggers as tablet pcs have been around for a long time and I'm sure many users will find it useful.
#4
Quote:Is it possible to create some sort of user defined triggers for detecting flicks directly? or is there a better work around?

I did not find a way.
An application can detect flicks and other pen input only in its window, but not in other applications.

Quote:I configured flicks to use hotkeys to trigger QM macros. However the macros are not always triggered. I'm thinking the qm keyboard triggers does not detect flicks hotkeys correctly.

An application can disable default flicks in its window. Then, although Windows shows the default flick icon, it does not send the default flick action (hotkey etc).

Example of window that disables default flicks in it:
Function dlg_flicks
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("dlg_flicks" &dlg_flicks)) ret

;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 467 441 "Dialog"
;END DIALOG
;DIALOG EDITOR: "" 0x2030300 "" "" ""

ret
;messages

def WM_TABLET_FLICK 0x000002CB
def FLICK_WM_HANDLED_MASK 0x1

sel message
,case WM_INITDIALOG
,case WM_TABLET_FLICK
,out "flick"
,ret DT_Ret(hDlg FLICK_WM_HANDLED_MASK)
,
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#5
Then maybe it is possible to detect the flicks icon and its title? For example I have a flick named "Min". When I flick down, the icon and title will show.
#6
It is window of class "wisptis_feedback_window". Can be used trigger "window visible".
But I did not find a way to know which flick it was. The window does not have text that we could get. And does not have useful controls or accessible objects.
#7
Try this.
Not 100% reliable.

Function detect_flicks
Trigger !v"" "wisptis_feedback_window"     Help - how to add the trigger to the macro
Code:
Copy      Help
int hwnd=val(_command)

POINT pm pf
xm pm
RECT r; GetWindowRect hwnd &r; pf.x=r.left+r.right/2; pf.y=r.top+r.bottom/2

;calculate distance from flick icon (it is where flick started) to current mouse position
int dx(pm.x-pf.x) dy(pm.y-pf.y)
int dist=_hypot(dx dy)
if(dist<100) ret ;;it is not flick icon window. The window also is used for other purposes, eg to show click.

;calculate flick angle
int angle=Round(atan2(-dy dx)*57.2957795130786) ;;*(180/pi)
if(angle<0) angle=360+angle
out angle

;Using this angle, calculate which flick it was.
;For example, 'up' is around 90 degrees, 'left' ~180, 'down' ~270, 'right' >=0 or <360.


Forum Jump:


Users browsing this thread: 1 Guest(s)