Example:
echo %@winapi[user32.dll,CloseClipboard,0]
1
If the function succeeds, the return value is non-zero.
If the function fails, the return value is zero.
Examples:
:clipistext
if %@winapi[user32.dll,OpenClipboard,0] LE 0 return -1
set rv=0
set uFormat=0
do until %uFormat == 0
set uFormat=%@winapi[user32.dll,EnumClipboardFormats,%uFormat]
if %uFormat == 1 .or. %uFormat == 7 .or. %uFormat == 13 (set rv=1 & leave)
enddo
set junk=%@winapi[user32.dll,CloseClipboard]
return %rv
More details on the JPSoft Forum: Detect Clipboard Format
Examples:
echo %@FindWindowClass[Shell_TrayWnd]
65690
echo %@FindWindowClass[Notepad]
1379358
echo %@FindWindowClass[Progman]
65818
Examples:
echo %@FindWindowTitle[Untitled - Notepad]
1379358
echo %@FindWindowTitle[Admin: Take Command Console]
394834
echo %@FindWindowTitle[%_winfgwindow]
394834
echo %@findwindowtitle[%_wintitle]
394834
echo %@findwindowtitle[Start]
65938
Example:
echo %@GetCurrentProcessID[]
14640
echo %_pid
14640
Example:
echo %@GetForegroundWindow[]
394834
Examples:
set hWnd=%@GetForegroundWindow[]
echo %hwnd
394834
echo %@GetSystemMenu[%hwnd]
198257
Example:
set fgWnd=%@getforegroundwindow[]
echo %@IsWindow[%fgWnd]
1
Example:
echo %@winapi[user32.dll,OpenClipboard,0]
1
If the function succeeds, the return value is non-zero.
If the function fails, the return value is zero.
Examples:
echo %@setenvironmentvariable["a","10"]
1
set a
10
Examples:
echo %@StrFormatByteSize[1024]
1.00 KB
echo %@StrFormatByteSize[10240]
10.0 KB
echo %@StrFormatByteSize[102400]
100 KB
echo %@StrFormatByteSize[1024000]
0.97 MB
echo %@StrFormatByteSize[10240000]
9.76 MB