Search found 100 matches

by Sounak@9434
09 Feb 2017 00:41
Forum: DOS Batch Forum
Topic: Help me with this inprofessional code!
Replies: 3
Views: 1714

Re: Help me with this inprofessional code!

The first problem is obviously the | (pipe), which is maybe the most poisonous character. You have to escape them with ^ (caret), so echo | will become echo ^| dbenhan said about it so I'm not going into further explanation. The second problem I see is that the way your code is built. It's not wrong...
by Sounak@9434
08 Feb 2017 22:59
Forum: DOS Batch Forum
Topic: Advanced Batch features via auxiliary .exe programs
Replies: 74
Views: 88679

Re: Advanced Batch features via auxiliary .exe programs

@Sounak@9434: Why do you split long lines at a few words? Perhaps you did not realized that this practice makes the text more difficult to read! I'm sorry for that Antonio, I will try to make my repuest more clear this time. I'm not a native english speaker , so sometime my english is somehow probl...
by Sounak@9434
08 Feb 2017 06:01
Forum: DOS Batch Forum
Topic: Advanced Batch features via auxiliary .exe programs
Replies: 74
Views: 88679

Re: Advanced Batch features via auxiliary .exe programs

A little request from me again Antonio, can you please add the keyboard button support to getmouse.exe so that it will return the value of the key pressed like in getkey.exe . For things like that I am currently using getinput.exe with hover(which is really helpful). But in some cases Getmouse.exe i...
by Sounak@9434
06 Feb 2017 10:06
Forum: DOS Batch Forum
Topic: Box-drawing characters in batch files...?
Replies: 25
Views: 23284

Re: Box-drawing characters in batch files...?

One thing I don't understand... is how Notepad++ uses UTF-8 encoding to save the batch file and it works fine, yet a batch file saved with UTF-8 in Notepad doesn't run properly. :-/ I'm not quite sure about this but as much as I have seen when I open .bat files saved as utf-8 in notepad++ with subl...
by Sounak@9434
05 Feb 2017 09:05
Forum: DOS Batch Forum
Topic: Box-drawing characters in batch files...?
Replies: 25
Views: 23284

Re: Box-drawing characters in batch files...?

Another little trick if I may. As aGermen said in his post codepage 437 supports almost all charecters so we are using chcp 437 at the top of our code. Now the thing is that we need to write the file in the same charecter-set. And here comes handy notepad++. Goto 'format->charecter sets->OEM-US' As ...
by Sounak@9434
03 Feb 2017 03:21
Forum: DOS Batch Forum
Topic: Mouse Hovering in Batch
Replies: 35
Views: 12050

Re: Mouse Hovering in Batch

misol101 wrote:Sounak: Sorry, didn't look into this before now. Well done, in both cases!

Thanks :D .
I was quite wondering that if my last two posts were that booring to be replied :mrgreen:
by Sounak@9434
21 Jan 2017 12:55
Forum: DOS Batch Forum
Topic: Firefox & Chrome history deleter
Replies: 5
Views: 2732

Re: Firefox & Chrome history deleter

Though you have made your script unnecesserily long and slow. Try using "if errorlevel 1 command" instead of 'if "%errorlevel%" == "1" command'
And also avoid using so many goto :label and use

Code: Select all

if errorlevel 1 (
 echo.Whatever
) else (
 echo.Something else
)
by Sounak@9434
21 Jan 2017 08:30
Forum: DOS Batch Forum
Topic: Need help changing a simple DOS script
Replies: 3
Views: 1886

Re: Need help changing a simple DOS script

I'm not quite sure what you want to do or what you want to achive but if you just want to strip away the filepath leaving only filename this code may help.(untested) setlocal enabledelayedexpansion set strip=0 set "file=%filename_with_path%" & rem change the %filename_with_path% with w...
by Sounak@9434
17 Jan 2017 04:46
Forum: DOS Batch Forum
Topic: Mouse Hovering in Batch
Replies: 35
Views: 12050

Re: Mouse Hovering in Batch

Eventually while creating the last code it hit me that in the very same way a dragging support could also be added. Check how is it? @echo off setlocal enabledelayedexpansion cmdgfx "box 0 b b0 29,9,17,2 & box 0 a 20 30,10,0,0 & box 0 c 20 45,10,0,0" set boxp=30 10 :main for /l %%1...
by Sounak@9434
16 Jan 2017 23:28
Forum: DOS Batch Forum
Topic: Mouse Hovering in Batch
Replies: 35
Views: 12050

Re: Mouse Hovering in Batch

This is a concept-thing, I'm not saying it's perfect and you might be able to find some unexpected behavior (e.g. hold down left mouse button and enter hover area=select button immediately) I found an (very)easy solution to this problem. Just add the value of LMB to another variable(In my case OLMB...
by Sounak@9434
13 Jan 2017 01:38
Forum: DOS Batch Forum
Topic: Firefox & Chrome history deleter
Replies: 5
Views: 2732

Re: Firefox & Chrome history deleter

You should add a tasklist check to check if the browser is closed and also a 'if exist' check to know if the browser is installed or not as let's say the person has Chrome installed but not Firefox. As your script deletes Firefox history first it would print 'system cannot find the file path specif...
by Sounak@9434
06 Jan 2017 08:52
Forum: DOS Batch Forum
Topic: batch script shutdown
Replies: 1
Views: 1214

Re: batch script shutdown

As aGermen said in your last question a batch script not running can't do anything. Though if you are triggering shutdown from a batch script(with shutdown command) you can just add a /f switch to force close all open windows or do a 'taskill' command(maybe a taskill and then a delaying loop with ta...
by Sounak@9434
06 Jan 2017 04:38
Forum: DOS Batch Forum
Topic: FOR command / batch including DIR
Replies: 28
Views: 7960

Re: FOR command / batch including DIR

drgt wrote:One says the pipe character must be used if file names contain spaces:

for /f "delims=|".....

True?

As filename can't contain "|"(pipe) character by default it does not matter if you use | as a delim or just leave "delims="

Sounak
by Sounak@9434
06 Jan 2017 00:10
Forum: DOS Batch Forum
Topic: FOR command / batch including DIR
Replies: 28
Views: 7960

Re: FOR command / batch including DIR

I am just replying based on the command you said earlier 'dir c:\a\b\c /a-d /on /b'

Code: Select all

for /f "delims=" %%a in ('dir c:\a\b\c /a-d /on /b') do (
   copy "%%a" "c:\d\e\f"
)
by Sounak@9434
05 Jan 2017 23:41
Forum: DOS Batch Forum
Topic: Advanced Batch features via auxiliary .exe programs
Replies: 74
Views: 88679

Re: Advanced Batch features via auxiliary .exe programs

Thank you very much Antonio for this quick reply. Maybe add it to the first post too. Just another small request from me. Add a '/t msec' switch to the tool. So that if no movement is detected within that time the code will terminate automatically. EDIT:- Recently noticed that this software does ret...