{"id":1187,"date":"2014-02-04T14:28:56","date_gmt":"2014-02-04T14:28:56","guid":{"rendered":"http:\/\/bitmap2lcd.com\/blog\/?p=1187"},"modified":"2014-02-04T14:32:36","modified_gmt":"2014-02-04T14:32:36","slug":"text-processing-example-modify-a-hex-value-on-every-source-code-line","status":"publish","type":"post","link":"https:\/\/bitmap2lcd.com\/blog\/text-processing-example-modify-a-hex-value-on-every-source-code-line\/","title":{"rendered":"Text Processing Example : Modify a Hex value on every source code line"},"content":{"rendered":"<p><span style=\"color: #808080;\"><strong><em>Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems and a programmable text processing tool.<\/em><\/strong><\/span><\/p>\n<h3>Text Processing Batch Example<\/h3>\n<h4>Target : Modifying a Hex value on every source code line<\/h4>\n<ul>\n<li>Convert an image to code : The code array\u00a0then is visible\u00a0in the Text editor ( see below )<\/li>\n<\/ul>\n<p><em>Example here see the two first hex values<\/em> : 0x01 and 0x70<\/p>\n<p><a href=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1188\" alt=\"Bitmap2LCD Batch Text Processing 1\" src=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-1.png\" width=\"603\" height=\"400\" srcset=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-1.png 603w, https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-1-300x199.png 300w\" sizes=\"auto, (max-width: 603px) 100vw, 603px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>In the Text Processing Window, create a new batch and write this program, using the choice comboboxes and the editors\u00a0located\u00a0upwards\u00a0the\u00a0program lines :<\/p>\n<p><a href=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-2.png\"><img loading=\"lazy\" decoding=\"async\" alt=\"Bitmap2LCD Batch Text Processing 2\" src=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-2.png\" width=\"603\" height=\"400\" \/><\/a><\/p>\n<p><strong>if &#8216;0x&#8217;<\/strong><br \/>\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 then get hex (0)\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/strong><span style=\"color: #3366ff;\">&#8211;&gt;\u00a0Hex value prefix is\u00a0already 0x in the\u00a0configuration settings<\/span><br \/>\n<strong>shift left (1)<\/strong><br \/>\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 then overwrite (index)&#8217;\u00a0\u00a0\u00a0 &#8216;\u00a0\u00a0\u00a0 <\/strong><span style=\"color: #3366ff;\">&#8211;&gt; 4 x space inside the string <\/span><br \/>\n<strong>\u00a0\u00a0\u00a0\u00a0\u00a0 then insert hex (index)<\/strong><\/p>\n<p><span style=\"color: #3366ff;\">Remark : Everything between two &#8220;if conditions&#8221; is\u00a0one block of functions for this &#8220;if condition&#8221; !<\/span><\/p>\n<p style=\"text-align: justify;\">On every text editor line, checks if &#8216;0x&#8217; is found and if condition is &#8220;true&#8221;, gets the first hex value (index 0) , shifts left\u00a0 the hex value of 1 bit to the left , overwrites source from the index\u00a0where the &#8216;0x&#8217; was found with four space chars,\u00a0 and finally inserts the shifted hex value\u00a0at the index position&#8230;<\/p>\n<p style=\"text-align: justify;\">Activate the new batch and run it over the text editor.<\/p>\n<p style=\"text-align: justify;\"><a href=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1194\" alt=\"Bitmap2LCD Batch Text Processing 3\" src=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-3.png\" width=\"603\" height=\"400\" srcset=\"https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-3.png 603w, https:\/\/bitmap2lcd.com\/blog\/wp-content\/uploads\/2014\/02\/Bitmap2LCD-Batch-Text-Processing-3-300x199.png 300w\" sizes=\"auto, (max-width: 603px) 100vw, 603px\" \/><\/a><\/p>\n<p style=\"text-align: justify;\">The source file in the <strong>Text Editor<\/strong> has been\u00a0modified (<span style=\"color: #ff0000;\">red arrow<\/span>)<\/p>\n<p style=\"text-align: justify;\">You can read the processing report journal\u00a0(<span style=\"color: #0000ff;\">blue arrow<\/span>)<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n\t<div class=\"quickshare-container\">\r\n\t<ul class=\"quickshare-genericons quickshare-effect-round quickshare-effect-expand quickshare-small\">\r\n\t\t<li class=\"quickshare-share\"><\/li> \r\n\t\t<li><a href=\"https:\/\/facebook.com\/sharer.php?u=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Ftext-processing-example-modify-a-hex-value-on-every-source-code-line%2F&amp;t=Text+Processing+Example+%3A+Modify+a+Hex+value+on+every+source+code+line+<+Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming\" target=\"_blank\" title=\"Share on Facebook\"><span class=\"quickshare-facebook\">Facebook<\/span><\/a><\/li>\t\t<li><a href=\"https:\/\/twitter.com\/intent\/tweet?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Ftext-processing-example-modify-a-hex-value-on-every-source-code-line%2F&amp;text=Text+Processing+Example+%3A+Modify+a+Hex+value+on+every+source+code+line+<+Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming\" target=\"_blank\" title=\"Share on Twitter\"><span class=\"quickshare-twitter\">Twitter<\/span><\/a><\/li>\t\t<li><a href=\"http:\/\/pinterest.com\/pin\/create\/button\/?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Ftext-processing-example-modify-a-hex-value-on-every-source-code-line%2F&amp;media=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Fwp-content%2Fuploads%2F2014%2F02%2FBitmap2LCD-Batch-Text-Processing-3-300x199.png&amp;description=Bitmap2LCD+is+a+tool+for+programming+small+Graphic+LCDs+in+embedded+systems+and+a+programmable+text+processing+tool.+Text+Processing+Batch+Example+Target+%3A+Modifying+a+Hex+value+on+every+source+code+line+Convert+an+image+to+code+%3A+The%26hellip%3B\" target=\"_blank\" title=\"Share on Pinterest\"><span class=\"quickshare-pinterest\">Pinterest<\/span><\/a><\/li>\t\t<li><a href=\"http:\/\/linkedin.com\/shareArticle?mini=true&amp;url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Ftext-processing-example-modify-a-hex-value-on-every-source-code-line%2F&amp;title=Text+Processing+Example+%3A+Modify+a+Hex+value+on+every+source+code+line&amp;source=Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming&amp;summary=Bitmap2LCD+is+a+tool+for+programming+small+Graphic+LCDs+in+embedded+systems+and+a+programmable+text+processing+tool.+Text+Processing+Batch+Example+Target+%3A+Modifying+a+Hex+value+on+every+source+code+line+Convert+an+image+to+code+%3A+The%26hellip%3B\" title=\"Share on Linkedin\" target=\"_blank\"><span class=\"quickshare-linkedin\">Linkedin<\/span><\/a><\/li>\t\t<li><a href=\"https:\/\/plus.google.com\/share?url=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Ftext-processing-example-modify-a-hex-value-on-every-source-code-line%2F\" target=\"_blank\" title=\"Share on Google+\"><span class=\"quickshare-googleplus\">Google+<\/span><\/a><\/li>\t\t\t\t\t\t\t\t<li><a href=\"mailto:?subject=Bitmap2LCD+Software+Tool+Blog+%3A%3A+about+GLCD+displays+and+Programming:+Text+Processing+Example+%3A+Modify+a+Hex+value+on+every+source+code+line&amp;body=https%3A%2F%2Fbitmap2lcd.com%2Fblog%2Ftext-processing-example-modify-a-hex-value-on-every-source-code-line%2F\" target=\"_blank\" title=\"Share via Email\"><span class=\"quickshare-email\">Email<\/span><\/a><\/li>\t<\/ul>\r\n\t<\/div>\r\n","protected":false},"excerpt":{"rendered":"<p>Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems and a programmable text processing tool. Text Processing Batch Example Target : Modifying a Hex value on every source code line Convert an image to code : The code array\u00a0then is visible\u00a0in the Text editor ( see below ) Example here see the [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[445,448,394,403,400,446,399,447],"class_list":["post-1187","post","type-post","status-publish","format-standard","hentry","category-source-code-postrocessing","tag-batch-text-processing","tag-programmable-text-processing","tag-search-and-replace","tag-search-and-replace-program","tag-source-file-manipulation","tag-text-editor-with-processing","tag-text-file-manipulation","tag-text-processing-macro"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/1187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/comments?post=1187"}],"version-history":[{"count":20,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/1187\/revisions"}],"predecessor-version":[{"id":1210,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/posts\/1187\/revisions\/1210"}],"wp:attachment":[{"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/media?parent=1187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/categories?post=1187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bitmap2lcd.com\/blog\/wp-json\/wp\/v2\/tags?post=1187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}