Open next menu in programm

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
fisher82_55
Posts: 2
Joined: 12 Oct 2021 13:13

Open next menu in programm

#1 Post by fisher82_55 » 12 Oct 2021 13:17

hi. i want to open a notepad
push on file and new

please help to write bar file

what a code to push enter or tab .thanks

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Open next menu in programm

#2 Post by aGerman » 13 Oct 2021 00:25

Batch code is unable to interact with graphical interfaces. So you cannot open menus or push buttons. For things like that choose another language like AutoIt and others.

You can, however, open a file in notepad.

Code: Select all

notepad "whateverfilename.txt"
Steffen

ShadowThief
Expert
Posts: 1160
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Open next menu in programm

#3 Post by ShadowThief » 13 Oct 2021 07:07

I've also never heard of any modern text editor that doesn't let you press CTRL+N to create a new file.

fisher82_55
Posts: 2
Joined: 12 Oct 2021 13:13

Re: Open next menu in programm

#4 Post by fisher82_55 » 13 Oct 2021 12:37

hi.thanks for your answer.
example
a want a open specific program into this program i have a more tabs/
i want to open a one of tabs.
in this tab i want will open a new window of something (nevermind what this do) just
example ( in excel ---> (open excel--->open data--->cluck on a filter )
you can help me with a bat commands/

Squashman
Expert
Posts: 4465
Joined: 23 Dec 2011 13:59

Re: Open next menu in programm

#5 Post by Squashman » 13 Oct 2021 12:53

fisher82_55 wrote:
13 Oct 2021 12:37
you can help me with a bat commands/
NO! You were just told that batch files cannot interact with graphical user interfaces.

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Open next menu in programm

#6 Post by aGerman » 13 Oct 2021 12:55

Seems you didn't understand my clear statement. You can NOT move the mouse to a certain window/control/tab/menu item/... and click it using Batch. Batch can NOT interact with graphical interfaces. Only with command line interfaces.

Steffen

atfon
Posts: 178
Joined: 06 Oct 2017 07:33

Re: Open next menu in programm

#7 Post by atfon » 13 Oct 2021 14:01

There is this post that discusses how to use wscript send keys for this and wrap it in a batch script:

viewtopic.php?t=4758

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Open next menu in programm

#8 Post by aGerman » 13 Oct 2021 14:57

This uses another scripting language. And not even VBS or JS will be able to emulate mouse clicks. You could, however, remote control MS Office applications using VBA in a VBScript. This would be rather off topic in this forum, and I'm only telling about it because the OP mentioned Excel as an example (while they actually asked about an unspecified "specific program" and "open a new window of something" where VBA is most likely no option anymore).

Steffen

Aacini
Expert
Posts: 1885
Joined: 06 Dec 2011 22:15
Location: México City, México
Contact:

Re: Open next menu in programm

#9 Post by Aacini » 13 Oct 2021 16:23

I suggest you to carefully review SendMessage.exe: Access to advanced Windows features thread and check if such an auxiliary program can help you to solve your problem...

Antonio

jfl
Posts: 226
Joined: 26 Oct 2012 06:40
Location: Saint Hilaire du Touvet, France
Contact:

Re: Open next menu in programm

#10 Post by jfl » 15 Oct 2021 02:05

If the goal is to open Notepad and push data into it in a scriptable way, you may try using my 2note.exe program.
To use it, send the text that you want to see in Notepad through a pipe.
For example:

Code: Select all

dir C:\Windows\system32 | 2note
or

Code: Select all

type myHugeLogFile.log | findstr /i error | 2note
2note.exe is part of my System Tools Library.

Post Reply