Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Playing around with batch files


  • Please log in to reply
8 replies to this topic

#1 Barnack

Barnack

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Italy
  • Local time:05:40 AM

Posted 24 October 2015 - 06:47 AM

I was going to make a simple menu with sub-menus that closes explorer.exe at start and opens it when you close the batch menu. The starter closes explorer, and when you press enter it opens 2 other batches, one fullscreen with an ascii art image (used like a wallpaper), the other is the core, the real menu, which does various actions.

Now, since i've seen many batch files with box characters i became mad for a week till i found out how to add them to my menu (chcp 65001).

But then i thought i could add every unicode character for output. I tryed adding this one ֍, just for test. It is shown in the editor i use (notepad++), but it does not come with output.

Is there any command to add the entire unicode charset as possible output symbols?

 

And now the question about what is really essential:

Pressing "x" in the menu makes the menu close and starts Explorer.exe, but is there a way to close the "wallpaper" batch with the menu close command?



BC AdBot (Login to Remove)

 


#2 Barnack

Barnack
  • Topic Starter

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Italy
  • Local time:05:40 AM

Posted 25 October 2015 - 08:28 AM

Why i can't edit my post?

EDIT:

I've noticed that from android the symbol i've added isn't shown.

This is the website from which i took it:

http://unicode-table.com/en/#combining-diacritical-marks

 

Re-edit: i've noticed i can actually edit this post, but i can't edit the previous one :\


Edited by Barnack, 25 October 2015 - 08:29 AM.


#3 namealreadytaken

namealreadytaken

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:04:40 AM

Posted 26 October 2015 - 01:09 PM

Why i can't edit my post?

 

Re-edit: i've noticed i can actually edit this post, but i can't edit the previous one :\

 

 

Most forums across the internet have a one hour window where you can edit a post.


Edited by namealreadytaken, 26 October 2015 - 01:09 PM.


#4 JohnnyJammer

JohnnyJammer

  • Members
  • 1,114 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:QLD Australia
  • Local time:02:40 PM

Posted 26 October 2015 - 06:35 PM

What would the reason be to print all acsii chars? In a Dos prompt you can use CTR+G to make a Beep sound if thats what you mean?



#5 Barnack

Barnack
  • Topic Starter

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Italy
  • Local time:05:40 AM

Posted 27 October 2015 - 01:39 PM

Ehm... i've never mentioned the Beep, and i'm talking about unicode, not ascii. The question is: is there a way to include the full unicode table?

 

And the second question is about closing a previously opened batch file from another batch file



#6 JohnnyJammer

JohnnyJammer

  • Members
  • 1,114 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:QLD Australia
  • Local time:02:40 PM

Posted 27 October 2015 - 08:04 PM

Ehm yes you can print unicode in batch file, have you looked at what console code page you are using by issue the command chcp? ever tried the type command to read a text file instead of ECHO?

You might need to set notepad to unicode when creating the bat file, also to kill another bat file i would use the taskkill /IM theBatfile.bat /F comamnd in the batch file.

 

Morer eading reguarding the code page

https://en.wikipedia.org/wiki/Code_page_437



#7 Barnack

Barnack
  • Topic Starter

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Italy
  • Local time:05:40 AM

Posted 29 October 2015 - 09:19 AM

I don't know what "type" does, not even knew about its existence. To write i'm using notepad++ set to batch and unicode, so its fine. About chcp i've not fully understood how it exactly works, even if i'd like to. Can someone explain me the logic behind chcp's values?



#8 SpywareDoc

SpywareDoc

  • Members
  • 674 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Maryland, USA
  • Local time:12:40 AM

Posted 29 October 2015 - 07:36 PM

Wikipedia: List of DOS commands (including "type" and "chcp").



#9 Barnack

Barnack
  • Topic Starter

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Italy
  • Local time:05:40 AM

Posted 30 October 2015 - 08:39 AM

Got it, i was using UTF-16 while chcp 65001 gives UTF-8 code. But i can't find the codepage for utf-16 :\






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users