![]() |
script for your codes - Printable Version +- ORIGIN (https://origin.boreal-nights.space) +-- Forum: Out Of Character (https://origin.boreal-nights.space/forumdisplay.php?fid=32) +--- Forum: Maintenance (https://origin.boreal-nights.space/forumdisplay.php?fid=37) +---- Forum: OOC Archives (https://origin.boreal-nights.space/forumdisplay.php?fid=43) +---- Thread: script for your codes (/showthread.php?tid=1518) |
script for your codes - Game Master CJ - Sep 21 2015 hello class today we will learn about my favorite thing in the whole wide world: how to be lazy. first off, opening notepad is easier than you may think. hold the windows key and press R - it brings up the run window. type notepad.exe into the dialog box and press enter. when notepad comes up, you can press ctrl+O to bring up the open window. save your codes in one folder with easy to identify names. choose the table code you want, for example: bluetable.txt open it and ctrl+A to select all, then ctrl+C to copy. ctrl+P into the post window. tada! if you're on a mac i'm sorry there is probably a similar equivalent boy, that's a lot of steps though. like, dang. that was easily four things to do.... what if there was something that did it for you? or even better, just typed your code for you!? introducing, autohotkey! i wrote a script for you guys you can change the key combo if you want, i have it set to win+z (you have to download autohotkey to use this script) save this code as a notepad file save it as yourfilename.ahk giving it whatever file name you want make sure you choose all files instead of text document .txt it is important to end the file name in .ahk if you update it, after saving it, double-click on the file in your documents folder so that it prompts you to restart the script since an older version is running. click yes to have it run the new version. Code: ; CHOOSE TABLE BY CHARACTER Replace my characters with your own. The GM_Post and GM_Accept are just labels. You can make them whatever you want, but they have to be the same at the end of the menu line and after the return function. (So where they start with GM_Post: and then SendInput {Raw}) SendInput {Raw} is the fastest and easiest way to get your code to come up. When you press your desired hotkey (I used win+z in this script) in the active window, a menu will come up with your menu items. Choose the one you want and your code will type itself out (almost instantaneously). Note! There must not be line breaks in your SendInput {Raw} string. If you want line breaks to appear in your code (as I did with the GM_Accept for Accepted Applications) you must use `n in the code where you want your line break to appear. You can use more than one to achieve more than one line break (`n `n is the equivalent to a paragraph tag amount of space). here is a video of it in use please mind the watermark lol i downloaded some jank random program to record with enjoy! feel free to ask questions too :3 Shafaer Wrote:if you have a % in your code (along with some other things,, basically if it breaks!) you have to escape it using "`", so for example i have a "width:100%;" in my code, so i need to put "width:100`%;" ! RE: script for your codes - Talat - Sep 21 2015 neato i will have to get this setup......................... then i can actually use all my tables w/o being angry all the time RE: script for your codes - Bevy - Sep 22 2015 OH SOME IMPORTANT THINGS I FOUND! if you have a % in your code (along with some other things,, basically if it breaks!) you have to escape it using "`", so for example i have a "width:100%;" in my code, so i need to put "width:100`%;" ! ALSO, instead of using <br /> you can totally just use "`n" for a new line!! so enjoy that. there's a bunch more stuff you can do with the escape function/` but p much just check the documentation if you're having any problems ;;waves ( ;`;waves) RE: script for your codes - Leon - Sep 22 2015 I think I'm gonna have to give this a shot too, it looks really cool ;>; RE: script for your codes - Game Master CJ - Sep 22 2015 oh :0 i updated with the `n thing, thanks shaf :D i'm glad you guys are liking it! there is a ton of stuff you can do with autohotkey :3 RE: script for your codes - Arkrael - Oct 23 2015 Why have I not seen this sooner :'D I will have to set this up asap~ |