StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Keith  
#1 Posted : Tuesday, December 10, 2019 5:35:51 PM(UTC)
Keith

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/10/2019(UTC)
Posts: 3
United States
Location: Littleton, CO

New to StrokesPlus from StrokeIt. I am having an issue getting Foxit Reader to work with gestures. I was able to set up the application and created a simple "Close" command with the hotkey CTRL+W to close a Foxit tab. The gesture will show up in the Foxit window but does not pass the CTRL+W successfully. If I press CTRL+W manually in the window, it closes the tab just fine.

And ideas?
Rob  
#2 Posted : Tuesday, December 10, 2019 6:56:40 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
Hmm, I use Foxit Reader myself and just tested Ctrl+W works fine for me.

Is the Foxit window active?

If you put this above the Ctrl+W command, do you see the message box when you perform the gesture?

sp.MessageBox('test','test');
Keith  
#3 Posted : Thursday, December 12, 2019 8:46:16 PM(UTC)
Keith

Rank: Newbie

Reputation:

Groups: Approved
Joined: 12/10/2019(UTC)
Posts: 3
United States
Location: Littleton, CO

After some further testing, it looks like it is because the app-specific gesture is the same as a global gesture, but the two have different commands. The global action gesture is taking priority over the app-specific gesture.

Can the app-specific gestures be given priority, or do I need to assign a different gesture?

One other clarification - I have the same gesture in the Chrome application doing something different than the Global Action, and in Chrome it is doing the Chrome-specific action.

Why would it work one way for Chrome and a different way for Foxit Reader?

Edited by user Thursday, December 12, 2019 8:50:16 PM(UTC)  | Reason: Not specified

Rob  
#4 Posted : Thursday, December 12, 2019 8:58:38 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
That likely means the app definition for FoxIt is too specific or otherwise invalid. By too specific, I mean not broad enough to always identify the point below the mouse as FoxIt.

App-specific matches always have priority, then global actions.

Edited by user Thursday, December 12, 2019 8:59:31 PM(UTC)  | Reason: Not specified

Rob  
#5 Posted : Thursday, December 12, 2019 9:02:03 PM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 1,349
United States
Location: Tampa, FL

Thanks: 28 times
Was thanked: 416 time(s) in 354 post(s)
You might find this script helpful. It displays the info for the point below the mouse. Just note that the script runs until you mouse Y position is > 1070 (bottom of my screen @ 1920x1080) - adjust if needed.

Code:
var currpt = sp.GetCurrentMousePoint();
var info = new DisplayTextInfo();
info.Message = "Init";
info.MessageAlignment = "left";
info.Duration = 1000;
info.Location = (currpt.X-30)+','+(currpt.Y+20); 
info.MessageFont = new Font("Segoe UI Semibold", 10);
info.BackColor = "black";
info.Padding = 0;
info.ClipToWorkingArea = false;
sp.DisplayText(info);
//sp.MessageBox("creating timer", "t");
sp.CreateTimer("WindowInfo", 0, 25, `
var currpt = sp.GetCurrentMousePoint();
    if(currpt.Y >= 1070) {
        //sp.MessageBox("Delete timer", "delete");
        sp.DeleteTimer("WindowInfo");
        sp.DisplayTextClose();
    } else  {
        //sp.MessageBox("Executing script", "delete");
        var info = new DisplayTextInfo();
        info.Message = "";
        info.MessageAlignment = "left";
        info.Duration = 1000;
        info.Location = (currpt.X-30)+','+(currpt.Y+20); 
        info.MessageFont = new Font("Segoe UI Semibold", 10);
        info.BackColor = "black";
        info.Padding = 0;
        info.ClipToWorkingArea = false;
        wnd = sp.WindowFromPoint(currpt, false);
        var fgWindow = sp.ForegroundWindow();
        info.Title = wnd.Title;
        info.Message = "\\nMouse Location: x: "+currpt.X+" y: " + currpt.Y
        info.Message += "\\nDesktop Window HWnd: " + sp.DesktopWindow().HWnd.ToString();
        info.Message += "\\nForegroundWindow HWnd: " + fgWindow.HWnd.ToString();
        info.Message += "\\nForegroundWindow Class: " + fgWindow.ClassName;
        info.Message += "\\nForegroundWindow Title: " + fgWindow.Title;
        try {
            info.Message += "\\nForegroundWindow Process ID: " + fgWindow.Process.Id;
            info.Message += "\\nForegroundWindow Process Name: " + fgWindow.Process.MainModule.ModuleName;
        } catch {}
        info.Message += "\\nForegroundWindow.GetRootOwnerWindow HWnd: " + fgWindow.GetRootOwnerWindow.HWnd.ToString();
        info.Message += "\\nForegroundWindow.GetRootOwnerWindow Class: " + fgWindow.GetRootOwnerWindow.ClassName;
        info.Message += "\\nForegroundWindow.GetRootOwnerWindow Title: " + fgWindow.GetRootOwnerWindow.Title;
        info.Message += "\\nCursor Window HWnd: " + host.cast(nint,wnd.HWnd) 
        info.Message += "\\nCursor Window Class: "+wnd.ClassName
        info.Message += "\\nCursor Window Title: "+wnd.Title
        try {
            info.Message += "\\nCursor Window Process ID: "+wnd.Process.Id;
            info.Message += "\\nCursor Window Process Name: "+wnd.Process.MainModule.ModuleName;
        } catch {}
        var extra = "";
        //try
        //{
            var ulWindow = sp.WindowFromPoint(new Point(wnd.Rectangle.X - 5, wnd.Rectangle.Y - 5), false);
            if(ulWindow) {
                extra = "\\nCursor Upper Left Window HWnd: " + ulWindow.HWnd.ToString();        
                extra += "\\nCursor Upper Left Window Class: " + ulWindow.ClassName;
                extra += "\\nCursor Upper Left Window Title: " + ulWindow.Title;
            }
            extra += "\\nCursor Window.Parent HWnd: " + wnd.Parent.HWnd.ToString();        
            extra += "\\nCursor Window.Parent Class: " + wnd.Parent.ClassName;
            extra += "\\nCursor Window.Parent Title: " + wnd.Parent.Title;
            extra += "\\nCursor GetRootOwnerWindow HWnd: " + wnd.GetRootOwnerWindow.HWnd.ToString();
            extra += "\\nCursor GetRootOwnerWindow Class: " + wnd.GetRootOwnerWindow.ClassName;
            extra += "\\nCursor GetRootOwnerWindow Title: " + wnd.GetRootOwnerWindow.Title;
        //}
        //catch{}
        info.Message += extra;
        info.Location = (currpt.X-30)+','+(currpt.Y+20); 
        sp.DisplayTextUpdate(info);
    }
`);
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.