Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ^+q:: ; ctrl+shift+q starts this hotkey.
- clipboard =
- Sleep,30
- send ^c
- send ^c
- ClipWait
- src:= clipboard, pattern:="-[0-9]{3}|Site|Wormhole|Structure|Depot|Anomaly|Signature|%", pattern2:="100.00%"
- retex := RegExReplace(src, pattern, "$0,")
- if InStr(retex, "Wormhole|Depot")
- {
- } else {
- retex := RegExReplace(retex, pattern2, ", $0")
- }
- ;MsgBox, 262144, % "Clipboard", % "Original: `n" clipboard "`nRetex: `n" retex
- StringSplit, retexArray, retex, `,
- retexArray = %retexArray%
- fid = %retexArray1%
- StringTrimRight, id, fid, 4
- sgroup = %retexArray2%
- if InStr(sgroup, "sig")
- {
- sgroup_s = Signature
- sgroup_ss = Sig
- } else if InStr(sgroup, "anom")
- {
- sgroup_s = Anomaly
- sgroup_ss = Anom
- } else
- {
- sgroup_s = %sgroup%
- sgroup_ss = %sgroup%
- }
- tgroup = %retexArray3%
- if InStr(tgroup, "Wormhole")
- {
- tgroup_s= WH
- } else if InStr(clipboard, "Site")
- {
- src:= tgroup, pattern:="([a-zA-Z]* Site)"
- StringTrimRight, tgroup_s, tgroup, 5
- } else
- {
- tgroup_s = %tgroup%
- sleep 1
- }
- name = %retexArray4%
- sigstrength = %retexArray5%
- dist = %retexArray6%
- ; Possible outputs:
- ; id = 3-letter signature ID.
- ; fid = full signature ID with letters, hyphen, and numbers.
- ; tgroup = type group. (ie: Wormhole, Combat Site, Ore Site, Data Site, Ghost Site, Structure).
- ; tgroup_s = an abbreviated version of tgroup (Wormhole -> WH, Combat Site -> Combat, etc.).
- ; sgroup = signature group. basically splits between "Cosmic Signature" and "Cosmic Anomaly".
- ; sgroup_s = an abbreviated version of sgroup. Outputs "Signature" or "Anomaly".
- ; sgroup_ss = even more abbreviated version of sgroup. Outputs "Sig" or "Anom".
- ; name = signature name
- ; 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.
- ; 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?
- ;
- ; 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.
- ;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
- if InStr(tgroup, "Wormhole")
- {
- 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.
- } else if InStr(tgroup, "Site")
- {
- clipboard := % id " | " tgroup_s " | " name ; This result will display when a Site (Combat/Ore/Data/Ghost) is found.
- } else
- {
- 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.
- }
- MsgBox, 64, % "Capture Successful!", % clipboard, 1.5 ; Displays what is copied to your clipboard.
Advertisement
Add Comment
Please, Sign In to add comment