AutoIt: script for hotkeys usage

This script allows You to define the global Windows hotkeys via the configuration file.

The syntax of the config file is simple:


Here “Hotkey” is the combination of the keyboard key with one of the identifiers:

^ Ctrl
! Alt
+ Shift
# Windows-Key


;Win+C – start calculator

;Win+Shift+N – start notepad

;Win+N – start notepad++ together with apploc.exe
#{n},%windir%\AppPatch\AppLoc.exe,”%ProgramFiles%\Notepad++\notepad++.exe” -nosession /L0419

Continue reading

WHICH command for DOS

If You need the analog of Unix ‘which’ command and do not have Resource Kit, the following batch file will help.
The code was found on
Published with the permission of the author, Clay Calvert.

@echo off
(set WF=)

:: Look for file in the current directory

for %%a in ("" %PATHEXT:;= %) do (
if not defined WF if exist "%~1%%~a" set WF=%CD%\%~1%%~a)

:: Look for file in the PATH

for %%a in ("" %PATHEXT:;= %) do (
if not defined WF for %%g in ("%~1%%~a") do (
if exist "%%~$PATH:g" set WF=%%~$PATH:g))

:: Store the Help Error message

if NOT "%~x1"=="" goto:END
for /f "delims=." %%a in ('help.exe *') do set HlpErr=%%a

:: If command missing from Help, goto end

help.exe "%~1" |find "%HlpErr%">nul && goto:END

:: Listed in help so find file in System32

for %%a in (exe com) do (
if /i "%WF%"=="%windir%\system32\%~1.%%a" goto:END)

:: File not in System32, so must be an internal command

set WF="%~1" is an internal command

if defined WF (echo.%WF%) else (
echo The file: "%~1" was not found)

:: Credits:
:: Clay Calvert
:: alt.msdos.batch.nt

Start sqlplus in Windows .BAT script

Here is the example of emulating “HERE-documents” in Windows shell.


FIND "/*%none% some_label" <%0 |sqlplus USER/PASS@SERVER GOTO end : ----------- embedded SQL------------------------- /* some_label */ select count(*) from dba_free_space; /* some_label */ select tablespace_name from dba_tablespaces; : ----------- end of embedded SQL------------------------- :end

It's also possible to use procedures in .bat files.
%none% is replaced by empty string.
Spaces are mandadory in "/* some_label */" string.

Another possibility:
[cc lang="dos"]
echo select global_name from global_name ;
) | sqlplus USER/PASS@SERVER