AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   [AHK] Move .smx to plugins folder and overwrite old (https://forums.alliedmods.net/showthread.php?t=245162)

Chdata 07-29-2014 04:14

[AHK] Move .smx to plugins folder and overwrite old
 
I made a simple AHK script that searches for newly compiled .smx files and moves them to your plugins folder (overwriting any old version if one exists - didn't bother with making a backup).

Code:

#NoEnv
#SingleInstance, Force

Loop
{
    Loop, .\compiled\*smx
    {
      FileMove, .\compiled\%A_LoopFileName%, ..\plugins, 1
    }
    Sleep, 5000
}

Save as smx.ahk. Install autohotkey if you don't have it.

Put this in your scripting\ folder (same folder that compile.exe is) and run it.

The folders are relatively pathed, so you don't need to change the filepath.

Some day I might figure out how to make it run automatically when you run compile.exe, but I'm not good enough to figure out how to do that immediately ;p

VoiDeD 08-06-2014 14:55

Re: [AHK] Move .smx to plugins folder and overwrite old
 
spcomp supports an output flag that you can use. Here's an example from my sublime build file that should give you an idea:

Code:

                "//trunk/SRCDS/srcds_new/tf/addons/sourcemod/scripting/spcomp",

                        // working directory
                        "-D//trunk/SRCDS/srcds_new/tf/addons/sourcemod/scripting",

                        // includes
                        "-i//trunk/Dev/SourceMod/plugins/includes",
                        "-i$file_path/include",
                        "-i$file_path/../include",
                        "-i$file_path/../thelpers",

                        // output file
                        "-o//trunk/SRCDS/srcds_new/tf/addons/sourcemod/plugins/$file_base_name.smx",

                        // input file
                        "$file"

How you'd use that:

Code:

spcomp -oC:\Plugin\Goes\Here.smx code.sp

Chdata 08-17-2014 22:35

Re: [AHK] Move .smx to plugins folder and overwrite old
 
more typing than drag n drop compile.exe ;P

turtsmcgurts 08-20-2014 02:14

Re: [AHK] Move .smx to plugins folder and overwrite old
 
for anyone wanting to do this with a remote directory (so it uploads automatically as you compile), the FTP client WinSCP has a Synchronize button that works flawlessly.


All times are GMT -4. The time now is 18:30.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.