Rank: 3837 based on 30 downloads (last 30 days) and 2 files submitted
photo

Phillip

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Phillip View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
31 Jan 2013 Screenshot KeyInject Send key strokes to any window from within Matlab Author: Phillip key stroke, send, window, interprocess communic..., mex 16 5
  • 5.0
5.0 | 2 ratings
01 Dec 2010 Screenshot TextInject A mex file to send text to any other application. Author: Phillip windows, application, text, send, mex 14 10
  • 3.66667
3.7 | 3 ratings
Comments and Ratings by Phillip View all
Updated File Comments Rating
16 Oct 2014 extrema.m, extrema2.m Search all extrema points of a time series or a surface with/without NaN's. Author: Carlos Adrian Vargas Aguilera

Using this across a broad range of applications, very handy.

17 Sep 2014 Log-polar image sampling Resamples an image from a conventional grid to a log-polar grid, and back. Author: David Young

Works as advertised, good job. Am using this to recover rotation/scale for image registration.

30 Jul 2014 xlswritefig Write a MATLAB figure to a Microsoft Excel spreadsheet. Author: Michelle Hirsch

22 Jul 2014 KeyInject Send key strokes to any window from within Matlab Author: Phillip

Oh yes, I meant hidden windows. It seems that some applications have all sorts of sub-windows or "Children" floating around behind the scenes.

I have another submission called "textInject" which you may want to look at. You specify the name of the main window for the application, and some (x,y) co-ordinates in pixels within that window. Then it uses a Windows API function called ChildWindowFromPoint to obtain a handle to the Child window at that location. The downside is that it cannot handle Alt/Ctrl keys etc, as I used a different function which makes it more practical to type text (SendMessage as opposed to SendKey). But I can probably revise this way of doing things if needed.

21 Jul 2014 KeyInject Send key strokes to any window from within Matlab Author: Phillip

Hi Laura,

Thanks for the feedback :)

I suspect that maybe the application you are using has multiple windows, and that the named window you are referring to must relay keystrokes that it receives to some other window. And this other window would be the foreground window... So the "GetForegroundWindow()" check would always fail, but the text will be relayed to the desired window anyway.

If you cannot see what the other window could be called, if you would like I can probably make a separate utility to return the name of the current foreground window, so that you can use that name with KeyInject.

Comments and Ratings on Phillip's Files View all
Updated File Comment by Comments Rating
22 Jul 2014 KeyInject Send key strokes to any window from within Matlab Author: Phillip Phillip

Oh yes, I meant hidden windows. It seems that some applications have all sorts of sub-windows or "Children" floating around behind the scenes.

I have another submission called "textInject" which you may want to look at. You specify the name of the main window for the application, and some (x,y) co-ordinates in pixels within that window. Then it uses a Windows API function called ChildWindowFromPoint to obtain a handle to the Child window at that location. The downside is that it cannot handle Alt/Ctrl keys etc, as I used a different function which makes it more practical to type text (SendMessage as opposed to SendKey). But I can probably revise this way of doing things if needed.

22 Jul 2014 KeyInject Send key strokes to any window from within Matlab Author: Phillip Laura

hmm, I don't think it's got multiple windows, unless they're hidden, but the application does have several tabs in the main window, so maybe the tabs affect the naming?

21 Jul 2014 KeyInject Send key strokes to any window from within Matlab Author: Phillip Phillip

Hi Laura,

Thanks for the feedback :)

I suspect that maybe the application you are using has multiple windows, and that the named window you are referring to must relay keystrokes that it receives to some other window. And this other window would be the foreground window... So the "GetForegroundWindow()" check would always fail, but the text will be relayed to the desired window anyway.

If you cannot see what the other window could be called, if you would like I can probably make a separate utility to return the name of the current foreground window, so that you can use that name with KeyInject.

18 Jul 2014 KeyInject Send key strokes to any window from within Matlab Author: Phillip Laura

Thanks, this was extremely useful! The only issue that I ran into was that I kept getting the error message 'Desired window needs priority'. Looking at the code, I think this means that the program I was writing to (a third-party .exe that won't take command line arguments) refused to stay as the Foreground Windows, even when I wasn't clicking away from it. The workaround that I found was just to comment out the if statement in the KeyInject-sendKey file that checks the Foreground window. I'm not really familiar with C++, so I was wondering if someone could suggest a better way to handle this?

14 Feb 2014 TextInject A mex file to send text to any other application. Author: Phillip Masullo, Alessandro

Very nice!

Contact us