Jump to content
Koumei & the Five Fates: Share Bug Reports and Feedback Here! ×

Trade Chat Powershell Script


Guest
 Share

Recommended Posts

I like to vary what I type into Trade Chat as far as WTS. For this, I have a script that scans a file and produces text I can copy and paste into Trade Chat. It follows this general form: 

 

WTS  Frostbite  GnashingPayara  HammerShot  Intensify  MaliciousRaptor  SeismicPalm  ShieldDisruption  ShotgunScavenger  SpoiledStrike  Stabilizer  tinyurl.com/jrjjue3

 

Where WTS and the link are static, and the items are randomly selected and sorted alphabetically. 

 

I like to use TinyURL.com because I can customize the link names. I'd just use my user name, but the Warframe forums lock topics after a while. Also, I'd rather leave a 300 redirect alone rather than modify it. So, I've been incrementing my links as my forum posts expire. Maybe a link to a Google Document might be less maintenance. At least on the forums, registered users can reply and send a private message. 

 

Also, TinyURL has a preview feature in case someone is paranoid about redirects. You can also set a cookie so all TinyURL redirects land you at TinyURL.com and give a link preview regardless of the 'preview' host name. Scroll past the ad's to see the full link. 

 


 

The way the script works is, you give it a path to two files: the inventory and a place to output the new text. The script runs on a continuous loop. It generates new text and beeps. Then, after a grace period, it beeps again. The first pause is to give you time to copy and paste. The second pause corresponds to the the flood protection on Trade Chat. 

 

I launch this in a normal PowerShell because ISE cannot produce system sounds (beeps). You must have System Sounds turned up under Volume Control on Vista and later otherwise the beeps will be inaudible. 

 

Press Ctrl+C while focused on the shell to stop the script. 

 

I copy and paste out of Notepad++ because it will detect changes without having to reopen the file. I copy and paste out of a file so I don't select stray characters from the shell: go to the file, select all, copy; paste. I also have a Notepad++ macro that copies everything to the clipboard. Just focus on the file in Notepad++ and use the macro. Below I have my macro. Insert the macro and parent tags as needed. I believe this is all that is needed. Otherwise record a macro of you selecting all, and copying. That is all this does. This way, I just have one menu item I can use. 

 


 

C:\Users\Michael\AppData\Roaming\Notepad++\shortcuts.xml

 

<NotepadPlus>

    <Macros>

        <Macro name="copy all" Ctrl="no" Alt="no" Shift="no" Key="0">

            <Action type="0" message="2013" wParam="0" lParam="0" sParam="" />

            <Action type="0" message="2178" wParam="0" lParam="0" sParam="" />

        </Macro>

    </Macros>

</NotepadPlus>

 

Below is a link to a ZIP file that contains all the relevant files. You can change the inventory and parts of the script as necessary. In particular, the file paths and (forum post) URL should be changed. 

 

----------


----------

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...