Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • February 07, 2016, 11:36:18 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: [Solved] help convert short text manipulations code from perl to AHK  (Read 3117 times)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 841
    • View Profile
    • Donate to Member
Anyone good at both perl and AHK? If so, care to help translate the format.pl code in the zip here http://nod5.dcmember...com/tiffdjvuocr.html ? I'm not getting it right.
« Last Edit: May 17, 2010, 03:15:32 PM by Nod5 »

ewemoa

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 2,836
    • View Profile
    • Donate to Member
Re: help convert short text manipulations code from perl to AHK
« Reply #1 on: May 16, 2010, 05:34:01 AM »
Don't know how much help I might be, but I've taken a brief look at format.pl.

One thing I wondered about was its specification of utf8 in the input and output from/to files:

Code: Perl [Select]
  1. open TXT, "<:utf8", "page_txt.txt";
  2. open BOX, "<:utf8", "page_box.txt";
  3. ...
  4. binmode(STDOUT, ":utf8");

I'm not experienced with AHK in that realm, but have the sense that that might present a tricky (or at least not-so-trivial) situation.

My impression so far with the rest of the script is that it doesn't look too bad.  May be if we can get close enough, help might arrive for any remaining difficulties :)

Do you have any sample input files and corresponding expected output that I might test with?

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 841
    • View Profile
    • Donate to Member
Re: help convert short text manipulations code from perl to AHK
« Reply #2 on: May 16, 2010, 10:11:48 AM »
txt examples attached (based on source image from http://www.pgdp.net/...through/04_Proof.htm )

there's also a python version of the same text manipulation actions in the zip in this post http://www.diybooksc...p=3300%23p3300#p3302  (between the ##### in the code)

Nod5

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 841
    • View Profile
    • Donate to Member
Re: help convert short text manipulations code from perl to AHK
« Reply #3 on: May 17, 2010, 03:13:56 PM »
Help received through PM, case closed. Thanks again ewemoa!  :Thmbsup: