Open With (Windows 10 x64)

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links, files or images until they have at least 4 posts.
Vegeth
New User
Posts: 8
Joined: Sat Oct 16, 2021 1:34 pm

Open With (Windows 10 x64)

Post by Vegeth »

XMBC Version: 2.19.2
Windows Version: 10 x64 21H1 (1288)
Mouse Information (brand/model): Inphic PM6BS
Relevant Computer Information (CPU, RAM etc): I5-4460 or I7-7700HQ, 10GB DDR3 or 16GB DDR4
How long have you used XMBC?: 1 day 🙃 :wink:
What language and keyboard layout do you use in Windows?: ITALIAN IT or ITALIAN INTL

Clear description of the problem - try and include as much information as possible, including what button and mappings you are having problems with (if applicable).:

I would like to open the files that I select with the mouse with a specific program.
Normally I should do:
"Right click, open with, program name"
I would like to optimize the process and make it a: click and back button on the mouse.

I tried with:

Simulated Keys: RUNS "path to exe" %1 or "%1" "path exe"

Run Application: "path exe" "%1" or "%1" "path exe"

but nothing.

%1 in windows means it is the path of the selected file.


It does not open the program giving an error (as if the command was not right).
The problem is therefore: how to do the "open with". The layer works.

Thanks in advance.

User avatar
phil
Site Admin
Posts: 6864
Joined: Sun Apr 06, 2003 11:12 pm

Re: Open With (Windows 10 x64)

Post by phil »

Sorry, but XMBC has not idea what other applications are doing - that is, it has no concept of any selected items in another (Explorer) window so XMBC has no idea that it needs to replace %1 is something else, nor has it the ability to get the path of the selected file in an explorer window that it has no access to of knowledge of (other than the fact that its explorer.exe).

Simply put, not possible in XMBC.

Regards.
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)

Vegeth
New User
Posts: 8
Joined: Sat Oct 16, 2021 1:34 pm

Re: Open With (Windows 10 x64)

Post by Vegeth »

I understand... so the only way is to hit it with a .bat that executes the aforementioned command.

thanks anyway

User avatar
phil
Site Admin
Posts: 6864
Joined: Sun Apr 06, 2003 11:12 pm

Re: Open With (Windows 10 x64)

Post by phil »

I guess, but how would you tell the batch file what files are selected from explorer (other than by running with the batch file or something which just ads more to do)
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)

Vegeth
New User
Posts: 8
Joined: Sat Oct 16, 2021 1:34 pm

Re: Open With (Windows 10 x64)

Post by Vegeth »

phil wrote:
Sat Oct 16, 2021 6:32 pm
I guess, but how would you tell the batch file what files are selected from explorer (other than by running with the batch file or something which just ads more to do)
Concatenation of scripts or with an exe written by me that goes to recall a registry key equal to "program.exe" "%1".
Since "%1" is a windows function, windows itself will understand that I am referring to that selected file.
After all, if you add the REG in

Code: Select all

Computer\HKEY_CLASSES_ROOT\*\shell\Avinaptic\command
with command:

Code: Select all

D:\Programmi\avinaptic2\avinaptic2.exe --cfg=D:\Programmi\avinaptic2\avinaptic.cfg --mgc=D:\Programmi\avinaptic2\magic.mgc "%1"
This doing the DX button on the file will open the contextual menu and in the main page (so without doing, open with) if I select this option (avinaptic2) it will execute the aforementioned command.

User avatar
phil
Site Admin
Posts: 6864
Joined: Sun Apr 06, 2003 11:12 pm

Re: Open With (Windows 10 x64)

Post by phil »

OK so yeh, that's effectively an explorer shell extension / registering the file types etc... So your telling explorer itself what to do with it. That'll work.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)

Vegeth
New User
Posts: 8
Joined: Sat Oct 16, 2021 1:34 pm

Re: Open With (Windows 10 x64)

Post by Vegeth »

phil wrote:
Sun Oct 17, 2021 11:06 am
OK so yeh, that's effectively an explorer shell extension / registering the file types etc... So your telling explorer itself what to do with it. That'll work.

Code: Select all

{APPS}{WAIT:1}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RETURN}
The code (in my case, it is the 4th option, then a Down to activate the key mode, and the 4 Downs to get to the command). The problem is that you have to keep the mouse still until the icon changes to the loading one.
Since there is the option to open the context menu (APPS) I was hoping you could also call up the options in this menu.
Example: {APPS:Avinaptic}
{APPS:OpenWith,First option}

User avatar
phil
Site Admin
Posts: 6864
Joined: Sun Apr 06, 2003 11:12 pm

Re: Open With (Windows 10 x64)

Post by phil »

You could use the LOCKX and LOCKY simkey tags at the beginning AND at the end of the sequence to stop the mouse moving while the sequence is run.

Code: Select all

{LOCKX}{LOCKY}{APPS}{WAIT:1}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RETURN}{LOCKX}{LOCKY}
NOTE: In a future release, these tags will be changed and you will be able to use: {LOCKXY}....{UNLOCKXY} - I've made the changes in a local test build but havn't gotten around to releasing it yet!
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)

Vegeth
New User
Posts: 8
Joined: Sat Oct 16, 2021 1:34 pm

Re: Open With (Windows 10 x64)

Post by Vegeth »

phil wrote:
Sun Oct 17, 2021 4:55 pm
You could use the LOCKX and LOCKY simkey tags at the beginning AND at the end of the sequence to stop the mouse moving while the sequence is run.

Code: Select all

{LOCKX}{LOCKY}{APPS}{WAIT:1}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RETURN}{LOCKX}{LOCKY}
NOTE: In a future release, these tags will be changed and you will be able to use: {LOCKXY}....{UNLOCKXY} - I've made the changes in a local test build but havn't gotten around to releasing it yet!
I actually didn't think if there was a tag to lock the mouse in while... 👍.
However, an unexpected problem has arisen (which I "" fixed "").
Basically, from "APPS" to "DOWN", "APPS" takes too long to load (and "WAIT" blocks the chain and does not allow seconds to pass, in practice, "WAIT" blocks the time instead of letting it pass without doing anything ) then I start a "DOWN" that moves the selection 1 below.
If I want to use this combination to open the file called "Video32.mkv", I have to select the "video31.mkv", the combination moves to 32 and then the context menu appears where it performs the various downs.

In my case, since I work with the detailed view, I put a "LEFT" which leads to nothing but is enough to give "APPS" time to open.
This is why I said that it was better to have an "APPS: name of the entry in the context menu" as a function

This is my fix:

Code: Select all

{APPS}{WAITMS:700}{LEFT}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RETURN}
with mouse lock:

Code: Select all

{LOCKX}{LOCKY}{APPS}{WAITMS:700}{LEFT}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RETURN}{LOCKX}{LOCKY}
WORK ONLY WITH "detailed view"


Thanks anyway for the availability and yes... adding unlock makes it less confusing to understand how to unlock the mouse 😂.

Edit1:
Ok, moving on to the desktop with its TitanWolf "gaming" mouse and related software. It seems that the macro used by that software is more accurate. I don't know how to explain it. It also allows you to put a real delay.
The reason for XMBC is that I use the laptop a lot with RDP on the desktop, the laptop mouse is 5-button Wireless (Wireless from the manufacturer at 2.4g and BT 5.0 or 4.0... are interchangeable). Obviously it's nothing compared to a $50 mouse.

Image.

User avatar
phil
Site Admin
Posts: 6864
Joined: Sun Apr 06, 2003 11:12 pm

Re: Open With (Windows 10 x64)

Post by phil »

Vegeth wrote:
Mon Oct 18, 2021 11:24 am
In my case, since I work with the detailed view, I put a "LEFT" which leads to nothing but is enough to give "APPS" time to open.
This is why I said that it was better to have an "APPS: name of the entry in the context menu" as a function

This is my fix:

Code: Select all

{APPS}{WAITMS:700}{LEFT}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RETURN}
with mouse lock:

Code: Select all

{LOCKX}{LOCKY}{APPS}{WAITMS:700}{LEFT}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RETURN}{LOCKX}{LOCKY}
WORK ONLY WITH "detailed view"
OK Firstly I don't understand what your getting at with WAIT or WAITMS... When you add a WAIT/WAITMS it should wait that amount of time before moving on to the next command in the sequence... If it is not, it is a bug.

Secondly, as I said before, XMBC has no concept of that is beneath the cursor. Sending the APPS key does not give XMBC any access to the menu (if indeed a menu appears (which is down to the active application!)) it is unaware of the context of the target application and is unable to interact other than by simulating keystrokes. Reading the window (menu or whatever) contents and reacting to it is not possible.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)

Vegeth
New User
Posts: 8
Joined: Sat Oct 16, 2021 1:34 pm

Re: Open With (Windows 10 x64)

Post by Vegeth »

OK Firstly I don't understand what your getting at with WAIT or WAITMS... When you add a WAIT/WAITMS it should wait that amount of time before moving on to the next command in the sequence... If it is not, it is a bug.
Just what I'm saying. Both "wait" and "waitms" freeze the time of the TAGS chain instead of passing the time.
I had tried with 6 seconds and what happened:
for 6 seconds the "APPS" did not open and did not even go down 1 "down". After 6 seconds, it dropped 1 down and "APPS" opened.
However, if "WAIT" is not included in the TAGS chain, the tags are too fast and do not take into account "APPS" at all. Just doing 6 "DOWN" and "ENTER" (thus opening the file as if I had double-clicked it).

Now I try to record a video and add it to this answer (and as usual, it happens to me that it no longer does what I say 🙃😂).

Vegeth
New User
Posts: 8
Joined: Sat Oct 16, 2021 1:34 pm

Re: Open With (Windows 10 x64)

Post by Vegeth »

So:
The timeless one (without the "WAIT" tag) works because the UPS was blown and having to restart the PC, the work load was reduced. What usually happens ... the pc is under constant stress (lots of windows open, transfers, chrome with 20 30 open pages and other apps in the background such as torrents). This leads to an absurd lag in opening the context menu at certain peak moments. This is why yesterday I went 6 "DOWN" and then "ENTER", skipping "APPS".

In the video it is not clear the part of the 6 seconds of stopped time. However you can clearly see that it stopped for 6 seconds and then opened "APPS" and made the chain of "DOWN" (although "WAIT" was after "APPS").
This means:
"WAIT" (in my case) freezes the time instead of letting it pass (in fact if it works that it makes the 6 seconds pass, the context menu should remain visible for 6 seconds).


VIDEO EX: https://mega.nz/file/p11UkIwC#1cv69clgR ... _HoVxO0yEM

User avatar
phil
Site Admin
Posts: 6864
Joined: Sun Apr 06, 2003 11:12 pm

Re: Open With (Windows 10 x64)

Post by phil »

OK I get it now... Something is most certainly wrong - and I cant reproduce it here - thanks for the detail!
I'll have to dig in to it under the debugger - that will take me some time...

I'll let you know what I find.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)

User avatar
phil
Site Admin
Posts: 6864
Joined: Sun Apr 06, 2003 11:12 pm

Re: Open With (Windows 10 x64)

Post by phil »

Ahhhh, its not a bug - its the way Windows works (and the way XMBC works sending multiple keys in "button pressed" mode...
The problem is that APPS does not show the context menu until it is RELEASED.

XMBC treats APPS like a modifier key (like CTRL, ALT, SHIFT) etc and keeps it held down while the next key is pressed... It perhaps shouldn't do this - I will have to check that, but what that means is that effectivley you and pressing (and holding) holding APPS, waiting for 6 seconds, pressing down, then releasing down and then releasing APPS (at which point the context menu popups up - after the wait and the down!

Try this instead:

Code: Select all

{PRESS}{APPS}{RELEASE}{APPS}{WAITMS:700}{DOWN}.....
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, AMD Ryzen 5900x, MSI x570 Tomahawk, 32GB DDR4,
nVidia RTX 2070s, Evo 970 1Tb NVME, 2x2TB WD Black (RAID1)

Vegeth
New User
Posts: 8
Joined: Sat Oct 16, 2021 1:34 pm

Re: Open With (Windows 10 x64)

Post by Vegeth »

phil wrote:
Tue Oct 19, 2021 12:50 am
Ahhhh, its not a bug - its the way Windows works (and the way XMBC works sending multiple keys in "button pressed" mode...
The problem is that APPS does not show the context menu until it is RELEASED.

XMBC treats APPS like a modifier key (like CTRL, ALT, SHIFT) etc and keeps it held down while the next key is pressed... It perhaps shouldn't do this - I will have to check that, but what that means is that effectivley you and pressing (and holding) holding APPS, waiting for 6 seconds, pressing down, then releasing down and then releasing APPS (at which point the context menu popups up - after the wait and the down!

Try this instead:

Code: Select all

{PRESS}{APPS}{RELEASE}{APPS}{WAITMS:700}{DOWN}.....
Ok.
Now it works for real.

Thanks for the support 👍

Final:

Code: Select all

{LOCKX}{LOCKY}{PRESS}{APPS}{RELEASE}{APPS}{WAITMS:700}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{DOWN}{RETURN}{LOCKX}{LOCKY}

Post Reply