Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title>Central Batch</title>
  4.  
  5. <HTA:Application
  6. ApplicationName="HTACentralBatch"
  7. Border="Thin"
  8. BorderStyle="Static"
  9. Caption="Yes"
  10. ContextMenu="No"
  11. Icon="WScript.exe"
  12. ID="HTACentralBatch"
  13. InnerBorder="No"
  14. MaximizeButton="No"
  15. Scoll="No"
  16. ShowInTaskbar="Yes"
  17. SingleInstance="Yes"
  18. WindowState="Normal"/>
  19.  
  20. <SCRIPT Type="Text/VBScript">
  21. '----------------------------------------------------------------------
  22. WidthX = "525"
  23. HeightY = "323"
  24. Window.ResizeTo WidthX, HeightY
  25. Window.MoveTo (screen.Width - WidthX)/2, (screen.Height - HeightY)/2
  26.  
  27. Set WshShell = CreateObject("WScript.Shell")
  28. Set WshFSO = CreateObject("Scripting.FileSystemObject")
  29.  
  30. aString = "abcd "
  31.  
  32. nString = "19 25"
  33.  
  34. nTotal = "" : bString = aString
  35. '-----------------------------------------------------------------------------------
  36. Sub Window_OnLoad()
  37. nTotal = Len(aString)
  38. For i = 1 to nTotal
  39. bString = Replace(bString, Mid(aString, i, 1), "_" & Mid(aString, i, 1))
  40. Next
  41. Window.SetInterval "Conversor", 150
  42. End Sub
  43. '-----------------------------------------------------------------------------------
  44. Sub Conversor()
  45. cTexto = Document.all.TextArea1.value
  46. a = 1 : b = a
  47.  
  48. For i = 1 to nTotal
  49. cTexto = Replace(cTexto, Mid(aString, i, 1), Mid(bString, a, 2))
  50. a = a + 2
  51. Next
  52.  
  53. For i = 1 to nTotal
  54. cTexto = Replace(cTexto, Mid(bString, b, 2), Mid(nString, i, 1))
  55. b = b + 2
  56. Next
  57.  
  58. Document.all.TextArea2.value = cTexto
  59. End Sub
  60. '-----------------------------------------------------------------------------------
  61. </SCRIPT>
  62. </head>
  63. <body bgcolor="#204C77" style="overflow:hidden">
  64. <textarea id="TextArea1"
  65. style="border:solid 5px #BDC3C7; width:491px" rows="5"></textarea><p>
  66.  
  67. <textarea id="TextArea2" readOnly="True"
  68. style="border:solid 5px #BDC3C7; width:491px" rows="5"></textarea>
  69.  
  70. </body>
  71. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement