Guest User

Untitled

a guest
Mar 30th, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ^+q:: ; ctrl+shift+q starts this hotkey.
  2. clipboard =
  3. Sleep,30
  4. send ^c
  5. send ^c
  6. ClipWait
  7. src:= clipboard, pattern:="-[0-9]{3}|Site|Wormhole|Structure|Depot|Anomaly|Signature|%", pattern2:="100.00%"
  8. retex := RegExReplace(src, pattern, "$0,")
  9. if InStr(retex, "Wormhole|Depot")
  10.     {
  11.     } else {
  12.     retex := RegExReplace(retex, pattern2, ", $0")
  13.     }
  14.  
  15. ;MsgBox, 262144, % "Clipboard", % "Original: `n" clipboard "`nRetex: `n" retex
  16.    
  17. StringSplit, retexArray, retex, `,
  18. retexArray = %retexArray%
  19.  
  20. fid = %retexArray1%
  21. StringTrimRight, id, fid, 4
  22.  
  23. sgroup = %retexArray2%
  24. if InStr(sgroup, "sig")
  25.     {
  26.     sgroup_s = Signature
  27.     sgroup_ss = Sig
  28.     } else if InStr(sgroup, "anom")
  29.     {
  30.     sgroup_s = Anomaly
  31.     sgroup_ss = Anom
  32.     } else
  33.     {
  34.     sgroup_s = %sgroup%
  35.     sgroup_ss = %sgroup%
  36.     }
  37.  
  38. tgroup = %retexArray3%
  39. if InStr(tgroup, "Wormhole")
  40.     {
  41.     tgroup_s= WH
  42.     } else if InStr(clipboard, "Site")
  43.     {
  44.     src:= tgroup, pattern:="([a-zA-Z]* Site)"
  45.     StringTrimRight, tgroup_s, tgroup, 5
  46.     } else
  47.     {
  48.     tgroup_s = %tgroup%
  49.     sleep 1
  50.     }
  51. name = %retexArray4%
  52. sigstrength = %retexArray5%
  53. dist = %retexArray6%
  54.  
  55. ; Possible outputs:
  56. ; id = 3-letter signature ID.
  57. ; fid = full signature ID with letters, hyphen, and numbers.
  58. ; tgroup = type group. (ie: Wormhole, Combat Site, Ore Site, Data Site, Ghost Site, Structure).
  59. ; tgroup_s = an abbreviated version of tgroup (Wormhole -> WH, Combat Site -> Combat, etc.).
  60. ; sgroup = signature group. basically splits between "Cosmic Signature" and "Cosmic Anomaly".
  61. ; sgroup_s = an abbreviated version of sgroup. Outputs "Signature" or "Anomaly".
  62. ; sgroup_ss = even more abbreviated version of sgroup. Outputs "Sig" or "Anom".
  63. ; name = signature name
  64. ; sigstrength = the strength of your hit on the signature. I don't know when you'd ever use this, but I had to delimit it out anyway so there you go.
  65. ; dist = the distance between your ship at the time of your scan and the object in question. Again, not sure when you'd use this. Maybe you could plot the distance between your safe spots by strategically placing yourself somewhere?
  66. ;
  67. ; To see all of these in action, just delete the semicolon in front of line 69 below and run the script. All the possible options will appear in a box.
  68.  
  69. ;MsgBox, 262144, % "result", % "id: " id "`nfid: "fid "`ntgroup: "tgroup "`ntgroup_s: "tgroup_s "`nsgroup: "sgroup "`nsgroup_s: "sgroup_s "`nsgroup_ss: "sgroup_ss "`nname: "name "`nsigstrength: "sigstrength "`ndist: "dist
  70.  
  71. if InStr(tgroup, "Wormhole")
  72.     {
  73.     clipboard := % id " | " tgroup_s " | " ; This result will display when a Wormhole is found. Add or remove variables as you see fit. Be sure to separate them with strings offset with quotation marks.
  74.     } else if InStr(tgroup, "Site")
  75.     {
  76.     clipboard := % id " | " tgroup_s " | " name ; This result will display when a Site (Combat/Ore/Data/Ghost) is found.
  77.     } else
  78.     {
  79.     clipboard := % id " | " tgroup_s " | " name ; This result will display when the object is neither a Site or Wormhole. Beware because these are untested and likely will be very broken.
  80.     }
  81.    
  82. MsgBox, 64, % "Capture Successful!", % clipboard, 1.5 ; Displays what is copied to your clipboard.
Advertisement
Add Comment
Please, Sign In to add comment