Map .js to SpaceExplorer button

Questions and answers about 3Dconnexion devices on Windows.

Moderator: Moderators

Post Reply
Bottle
Posts: 2
Joined: Fri Jun 22, 2012 4:50 am

Map .js to SpaceExplorer button

Post by Bottle »

I work in ANSYS Mechanical a bit, and I often need to hide several bodies when doing multibody analysis. It is cumbersome to have to use my normal mouse to first select a part and then go in the tree menu and click "hide/show part". I have created a javascript that will basically do the same for me. Is it possible in any way to map this script to one of my SpaceExplorer buttons? e.g. button 1?
Bryan
Moderator
Moderator
Posts: 443
Joined: Thu Dec 07, 2006 1:37 pm
Location: Rochester NY

Re: Map .js to SpaceExplorer button

Post by Bryan »

Can you execute your script by means of a series of keystrokes?
If you can, you can record those keystrokes and play them back.
On the 'Button Configuration' Tab in the '3Dconnexion Control Panel',
(Start, All Programs, 3Dconnexion, 3Dconnexion Control Panel, with your application open and holding the Windows' Focus.)
Click on the 'Custom Functions' Buttons.
You may make up a 'title' for your keystrokes.
Then you may record those keystrokes.
Then next when you access the 'Button Configuration' Tab, you will see a listing for the 'title' you created, in the key drop-downs, and may select it to be assigned to a button.
Then when you press that button it will play back those key strokes to launch your javascript.
The more things change, the more they remain the same. ; ^ )
jwick
Moderator
Moderator
Posts: 3456
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Map .js to SpaceExplorer button

Post by jwick »

You have two other options:

1) Install the 3DxWare 10 beta and you can define an executable/script that is called when you press a button. It's also called when you release it.

2) There is a registry entry (HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer\AppKey\18) that defines a program that gets run when you press one of the Application Keys. This is currently most likely assigned to calc.exe. Some keyboards have Application Keys (2 of them). One of those, I forget which, executes whatever is in that registry entry. One of the 3DxWare button functions "Launch App1" or "Launch App2" will execute that function if you assign it to a key.
Post Reply