Loading ...
Sorry, an error occurred while loading the content.

put unicode characters to a textbox

Expand Messages
  • Amrita
    Hi friends, Am in real need of this. I have some input files in greek, slovak, etc...i have all the fonts n all so its displaying correctly in a text doc. Now
    Message 1 of 1 , Feb 14, 2007
    View Source
    • 0 Attachment
      Hi friends,
      Am in real need of this. I have some input files in greek, slovak,
      etc...i have all the fonts n all so its displaying correctly in a text
      doc. Now i need to read from those files and put each word in a text
      box of a tool . This is the problem... as soon as its doing that the
      text showing up is getting distorted .. the accents and all are
      becoming weird characters. plzzz help.

      am using wmsettext... here's the code.


      #!d:/Perl/bin/perl.exe
      use Win32::GuiTest qw( :ALL);
      require Encode;



      my @whnds = FindWindowLike( undef, "^LiloPlugInManualTester" );
      if( !@whnds ){
      die "Cannot find window with title/caption \n";
      }else{
      printf( "Window handle of calculator application is %x\n",
      $whnds[ 0 ] );
      }

      SetForegroundWindow( $whnds[ 0 ] );
      $filelist="FileList.txt";
      $command="dir /b .\\WinSoft_Correct_Spell_copy > $filelist";
      `$command`;

      open(fh, "<$filelist") or die "Could not open $filelist\n";
      @farray=<fh>;
      foreach $filename(@farray)
      {
      chomp($filename);
      open(sample,"<.\\WinSoft_Correct_Spell_copy\\$filename") or die
      "Could not open $filename\n";
      open(testwrite,">test.txt") or die "Could not open $filename\n";
      print $filename;
      @wordlist=<sample>;
      #print @wordlist;
      &TestWordList(@wordlist);
      close sample;
      }
      close fh;

      MainLoop;

      sub TestWordList(@wordlist)
      {
      foreach $word (@wordlist)
      {
      #chomp($word);
      # print testwrite $word;
      my $sp_ctrl_id = 1000;
      my @sp_hnds = FindWindowLike( $whnds[ 0 ], undef, "Edit",
      $sp_ctrl_id );
      $result= WMSetText( $sp_hnds[0], $word );
      #sleep 1;





      }
      }
    Your message has been successfully submitted and would be delivered to recipients shortly.