{"id":793,"date":"2025-09-22T16:21:36","date_gmt":"2025-09-22T16:21:36","guid":{"rendered":"https:\/\/protolinker.com\/?post_type=docs&#038;p=793"},"modified":"2026-04-01T21:12:54","modified_gmt":"2026-04-01T21:12:54","password":"","slug":"script-for-links","status":"publish","type":"docs","link":"https:\/\/protolinker.com\/pt\/documentation\/script-for-links\/","title":{"rendered":"Script para links"},"content":{"rendered":"<h2 class=\"wp-block-heading\" id=\"how-to-create-a-script-for-a-link\">Como criar um script para um link<\/h2>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Quando voc\u00ea j\u00e1 possui um link e deseja manipular como a Tag de destino receber\u00e1 os dados, \u00e9 poss\u00edvel adicionar um script para realizar as transforma\u00e7\u00f5es necess\u00e1rias, como converter unidades ou transformar um valor bin\u00e1rio em um valor real.\nVoc\u00ea pode usar qualquer linguagem de script ou execut\u00e1vel bin\u00e1rio compat\u00edvel com o sistema operacional onde o Protolinker est\u00e1 sendo executado.<\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">O primeiro passo \u00e9 selecionar a tag e localizar o link da tag de protocolo que voc\u00ea deseja manipular. Para isso, abra a janela de Links, clicando no bot\u00e3o de link no formul\u00e1rio de Configura\u00e7\u00e3o do Protocolo ou no bot\u00e3o Links no canto inferior direito.<\/p>\n\n\n<figure class=\"wp-block-image size-full\" style=\"\"><img fetchpriority=\"high\" decoding=\"async\" width=\"527\" height=\"550\" src=\"https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-71.png\" alt=\"\" class=\"wp-image-1131\" srcset=\"https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-71.png 527w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-71-287x300.png 287w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-71-11x12.png 11w\" sizes=\"(max-width: 527px) 100vw, 527px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Em seguida, selecione o protocolo de envio, a tag de envio e o protocolo de destino do link. Feito isso, uma lista com todas as tags desse protocolo de destino ser\u00e1 exibida na se\u00e7\u00e3o Destination Tags.\nNa linha de cada tag, haver\u00e1 um bot\u00e3o de Script. Basta clicar nele para abrir a janela de configura\u00e7\u00e3o do script.<\/p>\n\n\n<figure class=\"wp-block-image size-full is-resized\" style=\"\"><img decoding=\"async\" width=\"424\" height=\"439\" src=\"https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-78.png\" alt=\"\" class=\"wp-image-1142\" style=\"width:524px;height:auto\" srcset=\"https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-78.png 424w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-78-290x300.png 290w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-78-12x12.png 12w\" sizes=\"(max-width: 424px) 100vw, 424px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Na janela de configura\u00e7\u00e3o do script, voc\u00ea precisar\u00e1 definir o comando necess\u00e1rio para executar o script, se for scripts em Python, use python ou sh para scripts em Bash, ou outro interpretador compat\u00edvel com o seu sistema.\n\nEm seguida, selecione o caminho do script clicando no bot\u00e3o \u201cProcurar\u201d (Browse).\n\nSe necess\u00e1rio, voc\u00ea tamb\u00e9m pode adicionar argumentos extras, isso \u00e9 \u00fatil quando o mesmo script \u00e9 reutilizado por v\u00e1rias Tags ou links dentro do Protolinker.<\/p>\n\n\n<figure class=\"wp-block-image size-full is-resized\" style=\"\"><img decoding=\"async\" width=\"421\" height=\"439\" src=\"https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-79.png\" alt=\"\" class=\"wp-image-1143\" style=\"width:538px;height:auto\" srcset=\"https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-79.png 421w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-79-288x300.png 288w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-79-12x12.png 12w\" sizes=\"(max-width: 421px) 100vw, 421px\" \/><\/figure>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Algumas configura\u00e7\u00f5es adicionais incluem o tipo de retorno do script, que define o tipo de dado do novo valor a ser usado na Tag de destino.\n\nH\u00e1 tamb\u00e9m uma caixa de sele\u00e7\u00e3o para ativar ou desativar o script quando os protocolos estiverem online.\n\nPara manter todas as altera\u00e7\u00f5es, \u00e9 necess\u00e1rio clicar em Salvar em todas as janelas de configura\u00e7\u00e3o. Caso contr\u00e1rio, as configura\u00e7\u00f5es do script ser\u00e3o perdidas.<\/p>\n\n\n<p class=\"wp-block-paragraph\" style=\"\"><strong><em>Nota: <\/em><\/strong> <em>O script s\u00f3 ser\u00e1 executado se a caixa Link estiver marcada.<\/em><\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-remove-a-script-from-a-link\">Como remover um script de um link<\/h2>\n\n\n<p class=\"wp-block-paragraph\" style=\"\">Quando voc\u00ea n\u00e3o precisar mais de um script, siga os mesmos passos usados para cri\u00e1-lo.\n\nNa janela de configura\u00e7\u00e3o do script, como ele j\u00e1 estar\u00e1 configurado, o bot\u00e3o \"Remove\" ficar\u00e1 habilitado. Clique em \"Remove\" e depois em Salvar na janela de configura\u00e7\u00e3o do protocolo para excluir a configura\u00e7\u00e3o do script.\n\nSe voc\u00ea clicar em Cancelar, o script permanecer\u00e1 ativo no link, sem que nenhuma altera\u00e7\u00e3o seja aplicada.<\/p>\n\n\n<figure class=\"wp-block-image size-large\" style=\"\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"1024\" src=\"https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-80-973x1024.png\" alt=\"\" class=\"wp-image-1144\" srcset=\"https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-80-973x1024.png 973w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-80-285x300.png 285w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-80-768x808.png 768w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-80-11x12.png 11w, https:\/\/protolinker.com\/wp-content\/uploads\/2025\/09\/image-80.png 1190w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/figure>","protected":false},"excerpt":{"rendered":"<p>How to create a script for a link Once you have a link, and you want to manipulate how the receiving tag will get the data you can add a script and make the changes you need to it, like making a unit conversion or transforming a binary number into a real value, for that &hellip;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"doc_category":[17],"doc_tag":[],"class_list":["post-793","docs","type-docs","status-publish","hentry","doc_category-scripts"],"year_month":"2026-07","word_count":379,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"beraldoigor","author_nicename":"beraldoigor","author_url":"https:\/\/protolinker.com\/pt\/author\/beraldoigor\/"},"doc_category_info":[{"term_name":"Scripts","term_url":"https:\/\/protolinker.com\/pt\/docs-category\/scripts\/"}],"doc_tag_info":[],"_links":{"self":[{"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/docs\/793","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/comments?post=793"}],"version-history":[{"count":0,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/docs\/793\/revisions"}],"wp:attachment":[{"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/media?parent=793"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/doc_category?post=793"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/protolinker.com\/pt\/wp-json\/wp\/v2\/doc_tag?post=793"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}