Long time I was't active on this forums. It's also because I had 9 months break from programming. Few months ago I came back to it, and I started to use XMBC again in my work. Now I have few ideas for this or probably next BETA:
QUESTION I:
Is there chance that 'Button Held Time Dependent Action' will be part of default (no chord) 'Button Chording', so in chording mode, only one, main button has possibility to be used as BHTDA?
For now we can set for ex. Middle Button to 'Button Chording'. Then we can use it with or without other buttons. But if it (middle button) was set to BH and then only this button - default (no chord) to BHTDA there wouldn't be any conflict with chording mode, so we could have additional actions.
BHTDA is amazing thing, but unfortunately we can't bind too many actions to it. So in most cases BH is much better option.
Examplary scenario:
Middle button is set to Chording Mode for some application. It does some things together with other buttons. But would be great if I could set default (no chord) to BHTDA and do with it some general stuff depending of time it's held:
changing layers, turing off / on an aplication or minimalize / maximalize window etc.
QUESTION II:
These are examplary paths I used in Simulated Keystrokes for some button:
{run:\\MAWI-SERWER\d-lab\autosave1\SCRIPTS\Open.exe}{run:C:\Users\User\Documents\Adobe Scripts\Polyfill.jsx}
No matter what it does. There could be also some other XMBC commands in the above code line, but with or without them such simulated keystrokes looks ugly and unreadable. Recently I use paths very often and it starts to be a big mess, so I have solution. Wouldn't that line look better for example this way:
{run:'Open'}{run:'Polyfill'}
How to make it? When you open simulated keystrokes window for some button, in the upper right corner there could be new button: "Paths". When you click it, you'll see new window where on the left side you can put names (variables) of paths you put on right side. Height of window will be growing depending on amount of entered paths. When you add some new one you have to click "Save paths" button, and that's all.
(Ah, and when you want to remove some path, there can be of course red removing X round button at end of each path).
Now instead of putting whole path: {run:\\MAWI-SERWER\d-lab\autosave1\SCRIPTS\Open.exe}
you can use it's name: {run:'Open'}
where those quotes could be for XMBC to recognize it is full path or only it's name.
Important Note: all paths from all layers and applications could be accessible from that path button.
I mean whenever you open Simulated Keystrokes for any layer and application, there would be list of all added paths from all of them.
So not only for this one layer or application, however there could be also radio button which clicked hides not related paths and displays paths for current layer and/or application.
Ps. what about system paths like %appData% (for example: %appData%\a.txt)?
QUESTION III:
If there could be paths, if? Maybe there can be also Variables button.
In my case it's not because I'd like my code was neat but because I work on 2 - 3 computers where I use XMBC, but because on all of them are different (language) versions of same programs, sometimes I have to change just one thing for all application / layer in XMBC it worked the same way like on other machine.
Example:
In my work I use Adobe Bridge to browse images. I do the same thing in my home, but I have 2 different versions of this program, so in my work to rotate images of (-)90 degrees I press CTRL U and CTRL I, but on home computer to do the same I have to use combination of CTRL [ and CTRL ].
The worst is that is not changable! You can't make your own shortcuts. Even in different versions of Photoshop where you can have your own shortcuts some are still not changable. For example to adjust levels you operate on 4 channels. In one photoshop you do it with CTRL and keys ~, 1, 2, 3, and on other with ALT and keys 2, 3, 4, 5
Another example of difference is that in my work there is path: C\Users\User\Documents\, but in my home: D\Dokumenty\
If there was VARIABLE button next to PATHS button and I clicked it I simply could do as follows:
In the new window there is variables column. Then you has 2 or more columns. Each for other computer. There would be blanks to type in Computer Name or its IP. Then, like in case of paths you could add on left side varibale name and on right (under some computer name / IP) simulated keystrokes bound to that variable.
Let's say I used variable rotLeft in VARIABLES column. Then in second column I type under some computer name: {ctrl}u, and in 3rd column under second computer name: {ctrl}[
Now I go back to simulated keystrokes main windows and I put into blank: {'rotLeft'} or just {rotLeft}
What happens if I'm on my work computer? XMBC checks the name of computer name/IP and uses 'rotLeft' either for work or home computer. In this case it launches simulated keystrokes for work computer. If I was at home then home's.
You'll say there will be delay in keystrokes, as each time it has to check computer name and then play action. Well there is solution for it. You can add to settings new tickable option: "Check computer name at launching XMBC". This way it will load all PATHS and VARIABLES libraries at start. If someone doesn't care of that delay they can leave that checkbox empty. So computer name/IP will be checked at the time of reading VARIABLE in just played Simulated Keystrokes.
I think that's better idea than creating 2 separate profiles only because in case of some program there's one little but significant difference between (language) versions, while everything else can be the same.
QUESTION IV:
Creating folders and text files by simulated keystrokes, for example:
{crt:C/Users/User/Documents/, someFolderName}
{crt:C/Users/User/Documents/, someTextFileName.txt}
Why? Because as scripter I store some temporary data (just for one second or few minutes many times a day in many different named files) I use and then they are deletd frome their containers, so folders or .txt files
QUESTION V:
There are no information about moving between layers by simulated keystrokes in simulated keystroke window. I know them all (layer:next, layer:2 etc), but that would be important info for others.
QUESTION VI:
Could you write some examples for:
{VKC:n} Sends the specified virtual key code.
{EXT:n} Sends the specified extended virtual key code.
{CLEAR} Clears any modifier tags {CTRL},{ALT} etc.
and
{POSTWM:<M>,<L>,<W>} Post a message to the window under the cursor.
{SENDWM:<M>,<L>,<W>} Send a message to the window under the cursor.
WHERE: <M> is the message, <L> is the LPARAM value and <W> is the WPARAM value.
NOTE: <M>, <L> & <W> can be specified in decimal (eg. 16) or hex (eg. 0x10).
QUESTION VII:
There is 'Mouse speed' in general settings and 'Mouse speed' for each Application in layers options. That second thing you did after my request and that really helped me
Recently I experienced problem with 'Delay between simulated keystrokes'. I found some value I use for all applications. But to be honest still for some it's too slow while for others too fast. Woulnd't be it better to add 'Delay between simulated keystrokes' for individual application like you did with 'Mouse speed'?
QUESTION VIII:
This one is a little related to previous question. I have idea for new keystoke command, just: {stp}, It can be put at beggining of some simulated keystrokes or somewhere inside. Its task is to stop your cursor in position you clicked on screen as far as a simulated keystrokes code isn't read to the end and sent from moment in simulated keystrokes {stp} was put.
There are 9 methods how to send simulated keystrokes. I often use, method 8 (held down untill button is pressed again). I use it in Photoshop for cropping. For example if you want to change size of some image you have to click on one of 4 corners and then holding LMB move mouse inside or outside. The other corner stays with no move. Here I don't use any XMBC method. I use it when I want to change size of image proportionally for all corners. So I hold alt and then hold LMB and move my mouse. Then all corners go identically to center of image or to outside.
Here I use method 8, and here is problem, because when I click on corner of image and then (not before I tested it) move my mouse just after few miliseconds, the second command (so LMB) is clicked not on the conrenr but inside of image).
Just to make it clear, I use: {alt}{lmb} on right button with method 8. Thanks to this method after I make a click I don't have to hold RMB. When I change size of image I want to crop, I click it again. Mostly it works, but once for 7 - 8 images (I crop everyday about 300) it doesn't. I mean after I click on corner, alt is sent, but LMB not in no time, but is slower than move of my hand, so like I said before. It makes click inside of image. Waiting about one second after clicking corner to make sure XMBC reaction is faster from mine is not the option. I have to work fast!
If there was {stp} command then even if I moved my mouse right after clicking, a cursor would be stopped on screen untill simulated keystrokes were sent to end (so probably that would take delay of few miliseconds, however often quite too many, though still few).
The problem is that as I understand method 8 sends signals alike 'during' (3) method, so if I use {stp} command my cursor wouldn't move till I clicked button again.
Well if that is possible can {stp} be used only for first simulated keystrokes execution? I mean if there is:
{STP}{alt}{lmb}{alt}{lmb}....and so on....{alt}{lmb}{alt}{lmb} (to moment I click again)
it would work like it: {STP}{alt}{lmb}{END OF STP}{alt}{lmb}{alt}{lmb}....and so on....{alt}{lmb}{alt}{lmb} (to moment I click again)
I hope this description is clear for you, at least in a half
QUESTION IX:
THE MOST IMPORTANT FOR ME!
Could you Phil add new command, which copy entered text information to clipboard?
{cb:'some text'), Also for clearing content of clipboard by: {cb:''}
It could be very powerful thing for me and many programmers! Here's why:
Sometimes simulated keystroke fails, because there is some unstable delay in applications.
So far if I wanted to rotate images in Bridge I used: {ctrl}a{waitms:250}{ctrl}[, so select all and make rotation after 250ms break. Unfortunately it doesn't work always, even with 1000ms delay, however often it works with delay under 250ms.
What I did to resolve it? I wrote a script in JavaScript which sends select all, rotation and even deselct all code. It works always! No matter of delay between selection and rotation. This scripts just wait for program reaction.
I found that many simulated keystrokes lines that sometimes failed I can replace with {run:<pathToSomeJsxFile>} so execution of JavaScript file which makes its job.
So I made library of functions in .jsx file. Of course .jsx file doesn't know which function I want to run because it doesn't recognise anything sent from XMBC. The solutions was to made many separate .jsx files, where each keeps some function I want to run. That's of course isn't fun. Better to have everything in one file.
Well here is solution for this problem:
If there was {cb'some text'} command in simulated keystrokes I could do something like this for example to run specific funcion (let's say: rotLeft) from one .jsx functions library file:
{cb:'rotLeft'}{run:C:\Users\User\Documents\Adobe Scripts\Polyfill.jsx}
What's next?
Executed .jsx file checks content of clipboard. In this case it's rotLeft.
Basing on this information it makes evaluation, to call the function:
eval(rotLeft + '()')
That's all. One (choosen by my in XMBC) of houndrets functions I can keep in .jsx library is ran.
Evertying because XMBC sent name of that function to clipbard and JavaScript read it. Easy?