[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result [phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027) [phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4149: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3027) Share some batch files! - Pete's QBASIC Site
The fiollowing batch file installs a program in ZIPped format on a RAM drive, runs it, then removes it from the RAM drive. It assumes that the RAM drive is drive D: and the files are stored in C:\RAMP. It also assumes you're using PKZIP for compression. If your setup is different, you need to alter the file. Give the ZIP file the name of the main executable in the program and provide it to the batch file. It shouldn't work on a batch file. It's untested.
Here's a second bath file for WinNT. It packs a program project in the current directory for distribution to drive A:. It looks for a file with the extension .zzz and names the distribution file with the same name but a .ZIP extension. You can substitute the extension in the second line and the compression program in the third line. If necessary, you can add to or change the files to compress in the third line and copy it to the fourth line.
@ECHO OFF
:About
:: O--------------------------------------------------------------O
:: |subShop.bat helps you create QB SUBs and FUNCTIONs in Crimson |
:: | Editor. Pass in your source file as %1. |
:: | |
:: | This file was created by Jason Bales |
:: | gamerplusplus@gmail.com |
:: | http://gamerpp.blogspot.com/ |
:: O--------------------------------------------------------------O
CLS
SETLOCAL
PROMPT
COLOR 47
TITLE WELCOME TO THE SUB SHOP!!
:: Are we to make a Sub or a Function?
SET /p subOrFunction="Are we to make a Sub or a Function?: "
CLS
:: What is the name of the Sub or Function?
SET /p name="What will we call it?: "
CLS
:: What are we passing in?
SET /p parameters="What are we passing in?: "
:: Simple choice
IF %subOrFunction% == SUB GOTO SUB
IF %subOrFunction% == sub GOTO SUB
IF %subOrFunction% == Sub GOTO SUB
IF %subOrFunction% == SUb GOTO SUB
IF %subOrFunction% == suB GOTO SUB
IF %subOrFunction% == sUB GOTO SUB
IF %subOrFunction% == sUb GOTO SUB
REM Notice you only need to type SUB if you want a SUB.
REM Any other input creates a FUNCTION.
:: Write a FUNCTION
> SCRATCH.TXT ECHO DECLARE FUNCTION %name% (%parameters%)
>>SCRATCH.TXT TYPE %1
>>SCRATCH.TXT ECHO.
>>SCRATCH.TXT ECHO ' ____________________
>>SCRATCH.TXT ECHO FUNCTION %name% (%parameters%)
>>SCRATCH.TXT ECHO ' Write your code here
>>SCRATCH.TXT ECHO %name% = ' Make sure the function returns something
>>SCRATCH.TXT ECHO END FUNCTION
> %1 TYPE SCRATCH.TXT
GOTO FIN
:: Write a SUB
:SUB
> SCRATCH.TXT ECHO DECLARE SUB %name% (%parameters%)
>>SCRATCH.TXT TYPE %1
>>SCRATCH.TXT ECHO.
>>SCRATCH.TXT ECHO ' ____________________
>>SCRATCH.TXT ECHO SUB %name% (%parameters%)
>>SCRATCH.TXT ECHO ' Write your code here
>>SCRATCH.TXT ECHO END SUB
> %1 TYPE SCRATCH.TXT
:FIN
DEL SCRATCH.TXT
ENDLOCAL
Burger,
You're right, but in my defense, most of the programming and scripting stuff I do is really "just because". I'm still tinkering with QB even though there are a hundred better options. My laptop has some issues with the QB IDE's menus and the IDE also doesn't like the touchpad, so I use a different text editor a lot of the time. I could probably insert SUBs all day long in the QB environment on another computer, but for now this BAT is the shizz. I did make a couple QB tools that are EXEs. One is made with QB and the other with VB6, but if a quick BAT will do the job, that's probably what I'll use. I like the BATs and I like QB. If I were into newer, "easier" stuff I'd probably be on a different website.