I have a Powershell script that I launch from ConEmu, and I would like to be able to have this script change the name of the current tab (from where it was launched) so that I can see from which tab I launched the script. I see that I could change the name of the tab using a GUIMacro Rename command, but it has to specify which tab by number. Is there a way to pass the current tab number into my script so I can execute the GUIMacro rename command with the correct tab number?

  • 1
    Have you even tried it? Rename function does not require tab number. conemu.github.io/en/GuiMacro.html#Rename – Maximus Nov 13 '15 at 18:48
  • Yes, sorry Maximus. I saw a RenameTab in a previous question and didn't see just plain Rename. It worked very well. Thanks again! – Matt Nov 13 '15 at 19:23

Thanks, Maximus, for the obvious answer in the comments.

I added something like this to the end of my Powershell script and it works very well:

$tabName = "Thing1"
& "C:\Program Files\ConEmu\ConEmu\ConEmuC.exe" -GUIMacro Rename(0,"Stuff-$tabName")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.