AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Snippets and Tutorials (https://forums.alliedmods.net/forumdisplay.php?f=112)
-   -   TOGs SourcePawn Syntax Converter [MS Excel Based for now] (https://forums.alliedmods.net/showthread.php?t=290805)

ThatOneGuy 11-24-2016 01:37

TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
3 Attachment(s)
I wasnt sure which forum section to post this in, but since there are syntax highlighters and other indirectly related stuff to SP coding, I thought this the best fit.

I created some code in VBA in a Microsoft Excel environment to convert SourcePawn plugins from old syntax into new syntax. While the project is not yet finished, I thought I would release it for others to use, and for feedback (provided I have time to implement much feedback). It REALLY should be ported over to another language so that MS Excel isnt required. Despite all that, here it is. Perhaps in the future, myself or another will port my code to PHP and make a web version...

Also, it isnt perfect (and probably never will be). Here is the identified TO-DO's, should I find the time for them...the point is that the tool gets you most of the way there, taking a lot of the work out of it (if not all).

To Do and Stuff Not Yet Handled:


Things handled by this program:


Usage/Instructions:


Note:The changelog is available with the spreadsheet in the "changelog" sheet.

I hope this is helpful! To see the code in Excel, press Alt+F11, or right click the tab and click "View Code". This tool will NOT edit the source file, but will create a new file with the same name then " newsyntax" appended. If a file already exists with that name, it will get a number appended in addition to that.

Timocop 11-24-2016 04:09

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
You could also use Visual Basic Script *.vbs as a single file. Works for all Windows versions and should work for Linux with Wine aswell, i think (i saw MS Scripting Control in winetricks).

ThatOneGuy 11-24-2016 07:17

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
Quote:

Originally Posted by Timocop (Post 2472270)
You could also use Visual Basic Script *.vbs as a single file. Works for all Windows versions and should work for Linux with Wine aswell, i think (i saw MS Scripting Control in winetricks).

I actually started the conversion to vbs and havent finished it because of some of the differences. Ideally, I'd rather just port the logic to php and make a web page for people to use, but we'll see.

friagram 11-24-2016 10:11

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
convert back to old syntax would be useful

ThatOneGuy 11-24-2016 14:08

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
Quote:

Originally Posted by friagram (Post 2472328)
convert back to old syntax would be useful

lol...but why would someone want to do that?! I'm sure there are times it would be useful though...

Miu 11-24-2016 15:12

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
what the fuck vba :psyduck:

ThatOneGuy 11-24-2016 15:35

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
Quote:

Originally Posted by Miu (Post 2472393)
what the fuck vba :psyduck:

^This. lol. I already had a lot of code available from past projects I've done at work, so after a few drinks one night...

Anyways, when I finish the project, I'll probably make a PHP page to do the same. For now though, the development is easier in VBA, specifically for the includes processing, which I'm working on now. I dont know if you can easily follow a recursive include model from PHP without the user uploading all of those files as well...

ThatOneGuy 11-25-2016 04:02

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
Updated code and OP description.

shavit 11-25-2016 05:34

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
great job!

headline 11-25-2016 15:38

Re: TOGs SourcePawn Syntax Converter [MS Excel Based for now]
 
:bacon:

Good Job!


All times are GMT -4. The time now is 17:00.

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