Hi,Im developing a plug in which should remove the extra spaces between and at the end of the text.
error = sAITextRun->SetTextRunByteCount(line,strlen((char*)buffer));
if(error)
{
MessageBox(NULL, "Error->SetTextRunByteCount", "LW TOOL", 0);
return error;
}
error = sAITextRun->SetTextRunByteCodes (line,0,strlen((char*)buffer),(unsigned char *)buffer);
if(error)
{
MessageBox(NULL, "Error->SetTextRunByteCodes", "LW TOOL", 0);
return error;
}
if(ccount1 >1 && buffer[ccount1-2] == ' ')
{
trim((char*)buffer);
sprintf(buf,"%d",strlen((char*)buffer));
MessageBox(NULL,buf,"trim",0);
error = sAITextRun->SetTextRunByteCount(prevline,strlen((char*)buffer)+1);
if(error)
{
MessageBox(NULL, "Error->SetTextRunByteCount", "LW TOOL", 0);
return error;
}
error = sAITextRun->SetTextRunByteCodes (prevline,0,strlen((char*)buffer),(unsigned char *)buffer);
if(error)
{
MessageBox(NULL, "Error->SetTextRunByteCodes", "LW TOOL", 0);
return error;
}
error = sAITextRun->GetTextRunByteCount (prevline,&ccount1 );
error = sAITextRun->GetTextRunByteCodes (prevline,0,ccount1,(unsigned char *)buffer );
}
While im using this code,while running in batch process it gets hanged.
Please tell me a solution.
Im using illustrator 10,VC++.