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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Mapkey to activate current window

tleati
12-Amethyst

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

ACCEPTED SOLUTION

Accepted Solutions
Jose_Costa
12-Amethyst
(To:tleati)

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
MartinHanak
24-Ruby III
(To:tleati)

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
Jose_Costa
12-Amethyst
(To:tleati)

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.

tleati
12-Amethyst
(To:Jose_Costa)

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.


Jose_Costa
12-Amethyst
(To:tleati)

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.

tleati
12-Amethyst
(To:Jose_Costa)

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?


James62
12-Amethyst
(To:tleati)

This should work:

SetTitleMatchMode 2

#IfWinActive, - Creo Parametric

<::Send ^a

Return

tleati
12-Amethyst
(To:James62)

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

James62
12-Amethyst
(To:tleati)

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

SetTitleMatchMode 2

#IfWinActive ahk_class Dialog

<::Send ^a

Return

TomU
23-Emerald IV
(To:tleati)

Here you go. (This is from Creo 3)

mapkey < @MAPKEY_NAMEActivate Window;@MAPKEY_LABELActivate;\

mapkey(continued) ~ Command `ProCmdWinActivate`;

James62
12-Amethyst
(To:TomU)

Nice one

tleati
12-Amethyst
(To:TomU)

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


Jose_Costa
12-Amethyst
(To:tleati)

That mapkey only works in Creo 3...

TomU
23-Emerald IV
(To:tleati)

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.

tleati
12-Amethyst
(To:TomU)

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)

Dale_Rosema
23-Emerald III
(To:TomU)

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?

Jose_Costa
12-Amethyst
(To:tleati)

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

Announcements
NEW Creo+ Topics: PTC Control Center and Creo+ Portal


Top Tags