Skip to main content
16-Pearl
February 5, 2026
Solved

Mapkey to open an app in working directory

  • February 5, 2026
  • 3 replies
  • 381 views

Hello all,

 

I have a mapkey (ex) that opens the windows explorer in the working directory. I have recently switched to directory opus as an alternative explorer. I would like to make a macro that launches directory opus in the working directory. Do you know how I could achieve that ? How would you do ?

Thanks.

Best answer by RaphMORIN

Thanks all for your help.

 

Finally I made it using Autohotkey. The only thing, I had to add a few pause in the script (Sleep command) because the script was too fast to copy the working directory. Sometimes it was working, sometimes not. Now it works 100%. 😁

 

I had never used Autohotkey before, it's quite easy to learn. 

 

Here's the script if anyone is interested.

 

!e:: ; Raccourci ALT+E
Send {Alt}
Send f
Send m
Send w
Send {Tab}
Send {Tab}
Sleep 100
Send {Space}
Sleep 100
Send ^c
Sleep 100
Send {Esc}
Run, dopus.exe "%Clipboard%"
return

 

3 replies

21-Topaz II
February 5, 2026
RaphMORIN16-PearlAuthor
16-Pearl
February 5, 2026

Thanks for the tip. I'm just wondering how I could pass the working directory as argument to my command line ?

 

RaphMORIN_0-1770300891224.png

 

21-Topaz I
February 5, 2026

If you refer to this Directory Opus, you might as well request assistance to them directly.
I know that Direct Folders from Code Sector enables to switch browse automatically like :

  1. Open a directory in Windows Explorer 
  2. Leave Explorer open
  3. Then switch to Creo or any other application, when File > Open, the explorer lands on the above directory directly 

 The workflow is a little different but it saves lots of clicks.

12-Amethyst
February 5, 2026

This may help you. When you use "Open System Window" to open a command prompt in the current session it always opens to the location of the working directory.

 

MikePhillips_0-1770304327797.png

 

RaphMORIN16-PearlAuthorAnswer
16-Pearl
February 6, 2026

Thanks all for your help.

 

Finally I made it using Autohotkey. The only thing, I had to add a few pause in the script (Sleep command) because the script was too fast to copy the working directory. Sometimes it was working, sometimes not. Now it works 100%. 😁

 

I had never used Autohotkey before, it's quite easy to learn. 

 

Here's the script if anyone is interested.

 

!e:: ; Raccourci ALT+E
Send {Alt}
Send f
Send m
Send w
Send {Tab}
Send {Tab}
Sleep 100
Send {Space}
Sleep 100
Send ^c
Sleep 100
Send {Esc}
Run, dopus.exe "%Clipboard%"
return

 

14-Alexandrite
February 12, 2026

I think this will help you a lot! You can change path to your dopus.exe instead of my batch file

mapkey xd @MAPKEY_LABELautoimport;~ Command `ProCmdDwgTblSaveasText` ;\
mapkey(continued)\ @SYSTEM "C:\\Users\\Admin\\Desktop\\personal\\autoimport\\tpv.bat";

RaphMORIN16-PearlAuthor
16-Pearl
February 12, 2026

Thanks for the tip, but for now it doesn't work.

I wrote this in mapkey file

 

mapkey ed @MAPKEY_LABELOuvrir directory opus dans répertoire de travail;~ Command `ProCmdDwgTblSaveasText` ;\
mapkey(continued)\ @SYSTEM "C:\\Program Files\\GPSoftware\\Directory Opus\\dopus.exe";

 

It does open directory opus but not in the working directory.

 

I also get this message in the status bar in Creo : 

 

14:18 Erreur de macro clavier : Invalid trail file line : No palette found for command 'ProCmdDwgTblSaveasText' in context 'context_main_dlg_w1'.RaphMORIN_0-1770902333408.png