Keyboard Strokes Script

Started by StanRohrer, September 17, 2017, 02:49:15 AM

Previous topic - Next topic

StanRohrer

Updated to IM 2017 today and lost a couple of my Favorites. I guess that is to be expected with Mario's changes to the system.

The favorite I used the most was apparently pretty simple in the old system. I got a copy and instructions from the forums a few years ago. It was written as a script to do simple menu driven operation of Command/ Metadata Write back/ For All Pending files/ Yes. The the script was then dragged into the Favorites box for a one click button. The script looked like this:

'#Language "WWB-COM"
Option Explicit

Sub Main
SendKeys "%cray"
End Sub

I'm definitely not up to speed on scripts. And definitely not up to speed on the new scripts replacement. Can somebody show me how to make a Favorites button to Command/ Metadata Write back/ For All Pending files/ Yes?

Thanks!

Mario

#1
I use

<Alt>+<C> <R> <A> <Enter>

which is probably as quick as using a Favorite.

From an app you can run the Write-back all via a single line:

IMatch.commandExecute('ID_MD_WRITEBACK_ALL');

But you'll have to acknowledge the dialog by pressing <Enter>.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

StanRohrer

Thanks Mario!
I use way too many non-Microsoft programs in my day job and in my night photo fun to be able to remember more than a few very frequent keyboard/keystroke commands for all these cases. Buttons, macros, and shallow menu trees, are my friends.

After a few hours of trying to work my way around the new App creation methods I have copied the starting My App and played enough to make a button work. I'm not fond of it opening the HTML App Panel 1 since there is really no need to display anything. I'll have to play and see if I can get the script to run without activating the html panel.

It's been over 20 years since I've done any programming. That programming was a proprietary language on a proprietary system for testing electronic circuit boards. So I am a dangerous hack in today's structures and methods. ;-)

Mario

If you write a modal app (an app which does not run in the App Panel but which opens a separate window) you can to this.
See the sample apps "Modal Window" or "Process File" to see how this works.

If you write your script that way it can run without an app panel and it can automatically do whatever functionality you require. Then it closes again.
If you then create a Favorite for your app you can run it from the Favorites panel or even a keyboard shortcut.

Tip: You don't need to remember keyboard shortcuts in IMatch. Each menu shows the associated keyboard shortcut and the underlined character of each command in the menu is the shortcut you can use after opening the menu.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

loweskid

Quote from: StanRohrer on September 17, 2017, 09:07:12 PM
I use way too many non-Microsoft programs in my day job and in my night photo fun to be able to remember more than a few very frequent keyboard/keystroke commands for all these cases. Buttons, macros, and shallow menu trees, are my friends.

I use a programmable key pad.  Easy to programme just by selecting the sequence of keys from a diagram on the screen.  The programming is saved to file so you can have different sets of keystokes for different programmes.  I have sets for Photoshop, Paint Shop Pro, IMatch and Notepad++.

I use a Cherry G84-4700...

http://cherryamericas.com/product/g84-4700-programmable-keypad/