Advertisement
pastamaker

autoClass

Jun 16th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  3. ; #Warn  ; Enable warnings to assist with detecting common errors.
  4. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  5.  
  6. SetWorkingDir %A_ScriptDir%
  7.  
  8.  
  9. #SingleInstance,force
  10. SetBatchLines,-1
  11. ;~ #Include,<hellbents_gdip>
  12.  
  13. gui,1:font,s20
  14. gui,1: add,edit , r1 w500 vedit1
  15. gui,1: add,button , r1 w500 gclip,This.x:=x
  16. gui,1: add,button , r1 w500 gclip2,x:=This.x
  17. gui,1: add,button , r1 w500 gremove,remove tooltip
  18. gui,1: show,,gui1
  19. gui,1: +alwaysontop
  20.  
  21.  
  22.  
  23. return
  24.  
  25. remove:
  26. ToolTip
  27. return
  28.  
  29. clip:
  30. Gui,submit,nohide
  31. Clipboard:=forward(edit1)
  32. ToolTip,% Clipboard
  33. return
  34. clip2:
  35. Gui,submit,nohide
  36. Clipboard:=backwards(edit1)
  37. ToolTip,% Clipboard
  38. return
  39. forward(x){
  40.     x:=split(x)
  41.     string=
  42.     for i,value in x {
  43.         string.= "This." value " := " value "`n"
  44.     }
  45.     return string
  46.    
  47. }
  48. backwards(x){
  49.     x:=split(x)
  50.     string=
  51.     for i,value in x {
  52.         string.= value " := " "This." value   "`n"
  53.     }
  54.     return string
  55.    
  56. }
  57.         split(string){
  58.     string := StrSplit(string, ",",a_space)  
  59.     t:=1
  60.     while ( string.length() >= t) {
  61.         if(string[t]<>"")
  62.             t++
  63.         else
  64.             string.Remove(t)
  65.     }
  66.     return string
  67. }
  68.  
  69. GuiClose:
  70. ExitApp
  71. ^x::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement