Raised This Month: $32 Target: $400
 8% 

[AHK] Move .smx to plugins folder and overwrite old


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 07-29-2014 , 04:14   [AHK] Move .smx to plugins folder and overwrite old
Reply With Quote #1

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
__________________

Last edited by Chdata; 07-29-2014 at 04:36.
Chdata is offline
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 08-06-2014 , 14:55   Re: [AHK] Move .smx to plugins folder and overwrite old
Reply With Quote #2

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
__________________
VoiDeD is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 08-17-2014 , 22:35   Re: [AHK] Move .smx to plugins folder and overwrite old
Reply With Quote #3

more typing than drag n drop compile.exe ;P
__________________
Chdata is offline
turtsmcgurts
SourceMod Donor
Join Date: Jul 2011
Old 08-20-2014 , 02:14   Re: [AHK] Move .smx to plugins folder and overwrite old
Reply With Quote #4

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.
turtsmcgurts is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:57.


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