Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Anyway To Call A Specific Part In A Cmd File ?

Featured Replies

im wanting 2 have a popup which asks a question & only use 1 cmd file

example

have an autoit script popup & ask if i want to enable or Disable something & have it "goto Yes" or "Goto No" like u would in a batch file with the prompt command

see what i mean? lol i get confused even trying 2 explain it :P


@echo off

:START
CLS
SET /P var1=Would you like to enable something?
SET var1=%var1:~0,1%
IF /I %var1%==y (goto YES)
IF /I %var1%==n (goto NO)
GOTO START

:YES
echo YES
GOTO END

:NO
echo NO
GOTO END

That should do it...

  • Author

yes, i know how 2 do it with a prompt via cmd file..

but what im wanting 2 do, is have the message window instead of entering y/n in a cmd file

but im looking 4 a way 2 have the message window (autoit) pass the "goto yes/no" to the batch file

  • Author

no, whats that :P

  • Author

ya, thanks . after i posted i searched :P seems to work well, except its OK/Cancel instead of Yes/No :P but ohwell :P

This Is A Cmd That Outputs A YesNo Vbs Than Will

Return What The User Selected.

Blue The Vbs Out File

Green Is Where The Yes reply

Red Is The No Reply

Purple The Varible That Get Passed Between The Scripts

echo off && cls && mode 55,3 && color f3 && Title Gunsmokingman Cmd To Vbs Back To Cmd

set P1=Ping -n 1 127.0.0.1

set P3=Ping -n 3 127.0.0.1

set VBS01=%systemdrive%\YN.vbs

set Cmd1=%systemdrive%\Temp.cmd

> %VBS01% Echo Set Action = CreateObject("Wscript.Shell")

>> %VBS01% Echo SD = Action.ExpandEnvironmentStrings("%SystemDrive%")

>> %VBS01% Echo YesNo = Msgbox(SPACE(7) ^& "Some Text message" ^& vbcrlf ^& "Another Text Message" ^& vbcrlf ^&_

>> %VBS01% Echo "Yes For Some Action" ^& vbcrlf ^& "No For Some Other Action" , 4 + 48,"Gsm YesNo-2cmd")

>> %VBS01% Echo If strUserIn = vbYes then

>> %VBS01% Echo Set FS = CreateObject("Scripting.FileSystemObject")

>> %VBS01% Echo strFileName =  FS.BuildPath(Wscript.ScriptFullName ^& "\..", "\Gsm YesNo-2cmd")

>> %VBS01% Echo strFileName =  FS.GetAbsolutePathName(strFileName)

>> %VBS01% Echo Set TS = FS.OpenTextFile(SD ^& "\Temp.cmd", 2, True)

>> %VBS01% Echo TS.WriteLine "set Loc=" ^& YesNo

>> %VBS01% Echo TS.Close

>> %VBS01% Echo Else

>> %VBS01% Echo Set FS = CreateObject("Scripting.FileSystemObject")

>> %VBS01% Echo strFileName =  FS.BuildPath(Wscript.ScriptFullName ^& "\..", SD ^& "\Temp.cmd")

>> %VBS01% Echo strFileName =  FS.GetAbsolutePathName(strFileName)

>> %VBS01% Echo Set TS = FS.OpenTextFile(SD ^& "\Temp.cmd", 2, True)

>> %VBS01% Echo TS.WriteLine "set Loc=" ^& YesNo

>> %VBS01% Echo TS.Close

>> %VBS01% Echo End If

%P1%>nul

START /w %VBS01%

del %VBS01%

%P1%>nul

call %Cmd1%

%P1%>nul

del %Cmd1%  && goto %Loc%

:7

cls && Color fc && Title This Is Seven

set Loc=You Said No

Echo. && Echo   %Loc% && %P3%>nul

goto Quit

:6

cls && Color f2 && Title This Is Six

set Loc=You Said Yes

Echo. && Echo   %Loc% && %P3%>nul

goto Quit

:quit

cls && Color 5e

echo. && Echo Good Bye && %P3%>nul

goto EOF

exit

Edited by gunsmokingman

but im looking 4 a way 2 have the message window (autoit) pass the "goto yes/no" to the batch file

Take a looks at "call" in Windows XP Help. You will see that you can use "call" from a batch file to start a different batch file. You can also include a label in the "Call" statement. IF supplied with a label then the batch file will start AT the label passed.

That sounds like exactly what you are looking for.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.