Microsoft > Microsoft DOS

Batch Programs Thread.

<< < (126/126)

brunoteta:
Hi, need help to create a .batch file to open paint(or oder image editor), one or more images, cut top left corner (custom width x height), select "pick color" tool to fill the hole, save and close.

its possible? thanks

Squashman:

--- Quote from: brunoteta on March 14, 2019, 07:48:42 PM ---Hi, need help to create a .batch file to open paint(or oder image editor), one or more images, cut top left corner (custom width x height), select "pick color" tool to fill the hole, save and close.

its possible? thanks

--- End quote ---
No.  Batch files cannot interact with Graphical User Interfaces.

Geek-9pm:

--- Quote from: Squashman on March 16, 2019, 09:15:58 PM ---No.  Batch files cannot interact with Graphical User Interfaces.

--- End quote ---
True.
The alternative is some kind of automation program that will invoke things like a human would. Either keystrokes or mouse movements.
Here is a link that might be relevant:

 5 best programs to automate PC tasks

He includes AutoHotkey
Here is the CH archive about AutoHotKey:
https://www.computerhope.com/jargon/a/autohotkey.htm
AutoHotkey is a fantastic free and open source Microsoft Windows tool that allows you to create macros, scripts, and automate frequently performed tasks on your computer. For example, Computer Hope uses this tool daily to help answer common questions asked in e-mail quickly and perform other common repetitive tasks.
It does have a learning g curve. But it is worth the effort.  :)

Salmon Trout:
There is a program called ImageMagick (spelled thus) which can do most or all of the OP's tasks from a script or the command line.

Hackoo:
Hi  ;)
I want to share with you this little batch : System_Info_HTML_Output.bat


--- Code: ---@echo off
CHCP 65001>nul
Title System Info With HTML Output by Hackoo 2022
Color 0B & Mode 57,3
Set Systeminfo_TXT=%~dp0Systeminfo_TXT.txt
Set Systeminfo_HTML=%~dp0systeminfo.html
echo(
systeminfo>"%Systeminfo_TXT%"
call :CreateHTMLtable "%Systeminfo_TXT%" "%Systeminfo_HTML%"
Start "" "%Systeminfo_HTML%"
Exit /b
::------------------------------------------------------------------------------------------------------------------------------------------------------
:CreateHTMLTable <inputfile> <outputfile>
>"%~2" (
echo ^<!DOCTYPE HTML PUBLIC
echo "-//W3C//DTD HTML 4.01 Transitional//EN"
echo  "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd"^>
echo ^<HTML^>
echo ^<HEAD^>
echo ^<META HTTP-EQUIV="Content-Type"
echo CONTENT="text/html; charset=utf-8"^>
echo ^</HEAD^>
echo ^<BODY^>
echo ^<style type="text/css"^>
echo .tftable {font-weight: bold;font-size:16px;color:#333333;width:100%;border-width: 1px;border-color: #bcaf91;border-collapse: collapse;}
echo .tftable th {font-size:16px;background-color:#ded0b0;border-width: 1px;padding: 8px;border-style: solid;border-color: #bcaf91;text-align:left;}
echo .tftable tr {background-color:#e9dbbb;}
echo .tftable td {font-size:16px;border-width: 1px;padding: 8px;border-style: solid;border-color: #bcaf91;}
echo .tftable tr:hover {background-color:#ffffff;}
echo ^</style^>
echo ^<center^>^<table class="tftable" border="1"^>
)
@for /f "tokens=1,* delims=:" %%a in ('Type "%~1"') do (
>>"%~2" echo ^<tr^>^<td^>%%a^</td^>^<td^>%%b^</td^>^</tr^>
)
>>"%~2" (
echo ^</table^>
echo ^</BODY^>
echo ^</HTML^>
)
Exit /B
::------------------------------------------------------------------------------------------------------------------------------------------------------
--- End code ---

Navigation

[0] Message Index

[*] Previous page

Go to full version