Author Topic: code replacement  (Read 140 times)

Offline john 30120

  • Newcomer
  • *
  • Posts: 8
    • View Profile
code replacement
« on: July 09, 2025, 03:49:49 AM »
Hi
I have  used` the very useful feature many times before but I just cannot get it to work on my new computer. I have created a file in wordpad, saved as utf-8, made # the code delimiter, saved to a folder and then identified it in PM. But nothing happens when I type in #uwc to a caption. Confused?
Help needed.  John

Offline Sven

  • Uber Member
  • ******
  • Posts: 1054
    • View Profile
Re: code replacement
« Reply #1 on: July 09, 2025, 08:19:54 AM »
I set mine to + as an delimiter. You need to open and close the text to be replaced.
So +uwc+ will be expanded to the 1st column in your replacement file.

# is a special thing as it indicates which column to put instead of the short code.

+text+ will refer to the 1st column.
+text#4+ will use the 4th.
After 5 years of absence I restarted the photography.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25422
    • View Profile
    • Camera Bits, Inc.
Re: code replacement
« Reply #2 on: July 09, 2025, 11:47:51 AM »
John,

I have  used` the very useful feature many times before but I just cannot get it to work on my new computer. I have created a file in wordpad, saved as utf-8, made # the code delimiter, saved to a folder and then identified it in PM. But nothing happens when I type in #uwc to a caption. Confused?
Help needed.  John

The file needs to be a plain text file, tab-delimited, encoded as UTF-8.  If you'd like us to investigate your file, please post it here or email it to support@camerabits.com.  Use the 'Attachments and other options' link when you're composing your reply to this message and there you'll be able to upload your file.

Thanks,

-Kirk

Offline Nhojdrib

  • Newcomer
  • *
  • Posts: 15
  • Photographing since 1957
    • View Profile
    • ANISTR all about trains
Re: code replacement
« Reply #3 on: July 09, 2025, 01:26:20 PM »
Hi Kirk and Sven
I have redone the txt file using + as the delimiter but still no joy. I must be doing some basic error but it is annoying when it used to work perfectly on my old PC. Hope you can see my error.
Thanks

John

Offline ahoward

  • Camera Bits Staff
  • Uber Member
  • *****
  • Posts: 1138
    • View Profile
Re: code replacement
« Reply #4 on: July 09, 2025, 01:58:54 PM »
Hi Kirk and Sven
I have redone the txt file using + as the delimiter but still no joy. I must be doing some basic error but it is annoying when it used to work perfectly on my old PC. Hope you can see my error.
Thanks

John

In your initial comment you stated you are typing "#uwc", but the code replacement file that you sent only has "wc" and "bb", so "uwc" wouldn't give you anything. You also need to type the delimiter on each side of the code. so if your delimiter was set to # and you were only typing "#uwc" then this would not return anything even if "uwc" was a legitimate code in your file. Based on what you've shared so far, if you type "+wc+ into Photo Mechanic, it should turn into "West Country Class No.". Is this not working for you?

Offline Nhojdrib

  • Newcomer
  • *
  • Posts: 15
  • Photographing since 1957
    • View Profile
    • ANISTR all about trains
Re: code replacement
« Reply #5 on: July 10, 2025, 05:37:22 AM »
Thanks for help!
I don't think I remembered to add the delimiter both before and after the code. I only placed it before the code. Have now tried and working perfectly. Thanks.
John