cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Mapkey to activate current window

SOLVED
Highlighted
Marble

Mapkey to activate current window

Hallo,

anyone knows, in Creo Parametric, the code to insert in the config.pro file in order to have a mapkey that activates the current window (just like Ctrl+A)?

I would like to replace the Ctrl+A with just one keyboard button (like, in my case, the button "<").

I tried to record a mapkey clicking the button "activate" but it activates always the same window.

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Mapkey to activate current window

One possible solution with Autohotkey and just three lines of code:

SetTitleMatchMode 2

#IfWinActive, - Creo Parametric

<::Send ^a


Try attached file. just execute it and call button "<" inside of Creo.



Jose.

View solution in original post

16 REPLIES 16
Highlighted

Re: Mapkey to activate current window

Tomasso,

I don't think that pure mapkey functionality is able to call Ctrl+A. I guess that you have to combine mapkey functionality with AutoHotkey/AutoIt functionality.

Martin Hanak


Martin Hanák
Highlighted

Re: Mapkey to activate current window

One possible solution with Autohotkey and just three lines of code:

SetTitleMatchMode 2

#IfWinActive, - Creo Parametric

<::Send ^a


Try attached file. just execute it and call button "<" inside of Creo.



Jose.

View solution in original post

Highlighted

Re: Mapkey to activate current window

Hi Jose,

your exe file works indeed, thanks for this.

However, since it works with autohotkey, I have to sacrify the button I use for it, for other applications too. (in this case, I have to sacrify the button "<" if I write for example on the internet or in Excel vba...) and I would have to deactivate autohotkey and the thing become no more convenient at this point.


Highlighted

Re: Mapkey to activate current window

It shouldn´t work like that,

I included the line "#IfWinActive, - Creo Parametric" to guarantee that the macro only works inside of Creo.

And it´s working like that in my computer.

Highlighted

Re: Mapkey to activate current window

Yes you are right, thanks.

The .exe works, but if I insert those three lines you suggested:

SetTitleMatchMode 2

#IfWinActive, - Creo Parametric

<::Send ^a

in another .ahk script (and run it obviously) it doesn't work...why?


Highlighted

Re: Mapkey to activate current window

This should work:

SetTitleMatchMode 2

#IfWinActive, - Creo Parametric

<::Send ^a

Return

Highlighted

Re: Mapkey to activate current window

Unfortunately these three lines don't work either...do they work in yours?

Highlighted

Re: Mapkey to activate current window

Allright, it's actually 4 lines, try this kind of approach:

SetTitleMatchMode 2

#IfWinActive ahk_class Dialog

<::Send ^a

Return

Highlighted

Re: Mapkey to activate current window

Here you go. (This is from Creo 3)

mapkey < @MAPKEY_NAMEActivate Window;@MAPKEY_LABELActivate;\

mapkey(continued) ~ Command `ProCmdWinActivate`;

Highlighted

Re: Mapkey to activate current window

Nice one

Highlighted

Re: Mapkey to activate current window

Hi Tom,

thanks for your reply.

However the mapkey you gave me doesn't work properly, that is it activates the Window that was previously activated! please see the screen recording attached if it's not clear what I mean: in the passage from the bolt to the spring I press the mapkey.

Video Link : 5818

What I am meaning instead is a button to activate the current greyed window, or also, a button to jump from a window to another activating the destination window (that's excatly what the following icon does:

windows.PNG


Highlighted

Re: Mapkey to activate current window

That mapkey only works in Creo 3...

Highlighted

Re: Mapkey to activate current window

The button you're showing actually does two things - it brings the selected window to the forefront and it activates it. Starting with Creo 3, you no longer need to activate the currently selected model (window). Even with multiple windows open on multiple monitors, Creo 3 will automatically activate whichever one you click your mouse in (as long as your not it the middle of some command - feature creation, printing, etc.) To bring a window to the forefront, you don't use activate. Instead you either (a) use the dropdown list, (b) select a window from the Windows taskbar, or (c) use ALT + TAB to select the desired window. Activate (and the mapkey listed above) DOES work and will activate the window that currently has focus. It will not change focus to a different window.

Highlighted

Re: Mapkey to activate current window

yes I know that that button brings the selected window to the forefront and activates it, but I have Creo 2! (I don't know when we will switch to the 3).

I'm sorry if It seemed to you that I disregarded your suggestion, but I was just meaning that it does not work with mine, which is the 2 (where, as you know, it's not as in Creo 3 and everytime you change the window you have to activate it manually, unless you use that button in my screenshot)

Highlighted

Re: Mapkey to activate current window

Is there a way to bring a window to the front using a mapkey similar to what used to be done. To bring a model to the front and activate before I would do "Alt-W, 4" and it would bring that model to the front.

 

Sometimes I have 20-30 tabs open and tabbing between them would be a pain and taking your hands off the keyboard to mouse is also.

 

I was thinking something (mapkey ```) to active the "drop-down window" and then a keying 1-9 to activate that model?

Highlighted

Re: Mapkey to activate current window

Yes, Creo 3 has been finally enhanced on this. Great for who works with multiple monitors.

Announcements