Automate 7 to 8 digit phone number conversion using AutoIT

Recently, as data cleansing exercise I need to convert 7 digit phone number. Well, this because there are old records that still using 7 digit instead of new 8 digit numbers. Lucky, there are freeware converter that can solve my problem.

Below are the sample how the software works.

HR2000

Now, my big problem is that I have about 120,000 record to convert. As my post title suggest, yes…. i solved it using my simple automate program using AutoIT

As I learn that sharing is caring , here I share how I did it.

Run(”C:\Program Files\HR2000 Software\Telekom 8 Digit\telekom8.exe”, “”,”")
WinWaitActive(”HR2000″)

Open the converter program and wait until the window is activate.

HotKeySet(”{F1}”, “Start”) ;F1 Key
HotKeySet(”{ESC}”, “Pause”);Esc Button - Pause for a while
HotKeySet(”{F4}”, “Close”) ;CLOSE telekom8 apps and autoit instance.

Register hotkey. I did a mistake previously where I don’t have this part. My simple program running more than 24 hours and still not completed.I can’t do my work since my mouse is been taking care by those program. :) (remember, i need to loop tru 120,000 records !)

$line = FileReadLine($Inputfile)

Read a source file that contain all the phone number that we want to convert.

Send($phoneNo)
MouseClick(”left”,613,333,1)
…..

MouseClickDrag(”left”,360,333,410,333)

Loop through the source file, send phone number to input box and do a mouce click. The position may be differ.You will need to use AutoIt Window Info to get the exact location.

Actually I’m not sure who will benefit from this code.ermm….never mind. just share lar yer.!

Download the source code here. The files has been downloaded 55 times.

Well, I don’t think my code is perfect but it solved my problem.So it is consider ok lah kan.

Kindly let me know and leave a comment if you have try this. :)

If you're new here, you may want to subscribe to my RSS feed or get my latest post directly in your mailbox. Thanks for visiting !

Related Post:
  • AutoIT - Connecting to SQL Server.
  • AutoIt - automate your task
  • Security Awareness - Pretexting
  • Design your AutoIt application using Koda FormDesigner
  • Hoax : Pin number reversal ?



  • Can't find what you are looking for? Go Gooogle...
    Google

    Leave a Reply


    AWSOM Powered