The following warnings occurred:
Warning [2] Undefined array key "extra" - Line: 100 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 100 errorHandler->error
/inc/plugins/google_seo.php 311 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 233 pluginSystem->load
/global.php 18 require_once
/printthread.php 16 require_once
Warning [2] Undefined variable $location - Line: 1250 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 1250 errorHandler->error
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 311 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 233 pluginSystem->load
/global.php 18 require_once
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.0.30 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.0.30 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.0.30 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5025 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 5025 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7271 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 7271 errorHandler->error
/inc/functions.php 5045 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7271 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 7271 errorHandler->error
/inc/functions.php 5045 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7271 - File: inc/functions.php PHP 8.0.30 (Linux)
File Line Function
/inc/functions.php 7271 errorHandler->error
/inc/functions.php 5045 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$bottomlinks_returncontent - Line: 6 - File: global.php(938) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/global.php(938) : eval()'d code 6 errorHandler->error
/global.php 938 eval
/printthread.php 16 require_once
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 5890 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 67 makeprintablenav
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 5890 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 67 makeprintablenav
Warning [2] Undefined array key 36 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1381 google_seo_url_cache
/inc/functions.php 5890 google_seo_url_forum
/printthread.php 213 get_forum_link
/printthread.php 218 makeprintablenav
/printthread.php 67 makeprintablenav
Warning [2] Undefined array key 4 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1412 google_seo_url_cache
/inc/functions.php 5922 google_seo_url_thread
/printthread.php 124 get_thread_link
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1412 google_seo_url_cache
/inc/functions.php 5922 google_seo_url_thread
/printthread.php 124 get_thread_link
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 5807 google_seo_url_profile
/inc/functions.php 5875 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Trying to access array offset on value of type null - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 5807 google_seo_url_profile
/inc/functions.php 5875 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "time" - Line: 2 - File: printthread.php(181) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/printthread.php(181) : eval()'d code 2 errorHandler->error
/printthread.php 181 eval
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key 1 - Line: 833 - File: inc/plugins/google_seo/url.php PHP 8.0.30 (Linux)
File Line Function
/inc/plugins/google_seo/url.php 833 errorHandler->error
/inc/plugins/google_seo/url.php 1347 google_seo_url_cache
/inc/functions.php 5807 google_seo_url_profile
/inc/functions.php 5875 get_profile_link
/printthread.php 177 build_profile_link
Warning [2] Undefined array key "time" - Line: 2 - File: printthread.php(181) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/printthread.php(181) : eval()'d code 2 errorHandler->error
/printthread.php 181 eval
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.0.30 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "time" - Line: 2 - File: printthread.php(181) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/printthread.php(181) : eval()'d code 2 errorHandler->error
/printthread.php 181 eval



Computer Limbo
Set /p coding problems on XP - Printable Version

+- Computer Limbo (http://computerlimbo.com/forum)
+-- Forum: Computer Tech Support (http://computerlimbo.com/forum/Forum-computer-tech-support)
+--- Forum: Do It Yourself Projects (http://computerlimbo.com/forum/Forum-do-it-yourself-projects)
+--- Thread: Set /p coding problems on XP (/Thread-set-p-coding-problems-on-xp)



Set /p coding problems on XP - habeascorpus - 03-09-2010

I'm trying to create a batch program that gives a choice (Y/N or 1/2) and if Y (or 1) is input by the user It would run a program already on my computer. I've searched all I can but most things don't work (or I don't understand them). The one I'm currently using is gutted and adapted from the only working one I found but no matter what I try something goes wrong and it loops to the beginning without executing my program. Here's the code
Code:
@echo off
CLS
:LOOP
SET userInput=
SET /P userInput=So, Y or N?

:: check userInput
IF "%userInput%"=="" GOTO 3

:: /I makes the IF comparison case-insensitive
IF /I "%userInput%"=="Y" GOTO 1
IF /I "%userInput%"=="Y" GOTO 2
echo %userInput%
GOTO Again
:3
echo.
echo ERROR:Enter the message or type exit and press Enter.
GOTO Again
:1
echo good
CALL matrix.bat
pause
:2
GOTO Again
:Again
PAUSE
CLS
GOTO Loop
:End
When executed following is the output
======================================
SM:\ User Input Line
Input was unexpected at this time.
D:\SM>

I have very little clue as with what I should be fiddling...

By the way, the program is called matrix.bat and I'm running XP so choice doesn't work. I want it to read user input and would be grateful for any help on the matter.


RE: Set /p coding problems on XP - TheWiz - 04-02-2010

You did not correctly initialize the userinput method. You must verify to the program that you want to use wither numbers or letters as your choice. The choice command is better suited for yes or no, so here is a model for the set command that could actually be edited to suit either letters or numbers.

Code:
@echo offSet /P _dept=Please enter Department:If "%_dept%"=="" goto :sub_errorIf /i "%_dept%"=="finance" goto sub_financeIf /i "%_dept%"=="hr" goto sub_hr
goto:eof

:sub_finance
echo You chose the finance dept
goto:eof

:sub_hr
echo You chose the hr dept

TheWiz


RE: Set /p coding problems on XP - habeascorpus - 04-07-2010

Lol, i actually found that one already but scrapped it for ine reason or another (Something didn't work I think). Also what you, most others, and myself-at the time- failed to notice that made my current set up not work is here:
Code:
:: /I makes the IF comparison case-insensitive
IF /I "%userInput%"=="Y" GOTO 1
IF /I "%userInput%"=="Y" GOTO 2
so input "y" tells the program to continue but also close, not knowing what to do, it closes. Pretty simple but the bunch of people (I've posted this on other sites as well) that saw it missed it.
I got it working a little while ago and revamped it to serve as a pretty cool program to open websites, Microsoft Office Apps, and even my class notes. It won't work (only the Office Apps really, depending on what version you have, mine is 2003. You need to find your own notes/files paths' on your own) without some personalized touches but the code is kinda fun.
Code:
@echo off
COLOR 37
:0
CLS
TITLE Internet Shortcuts
ECHO Latin/Google/Calender/Games/Office/Notes/exit
SET /P userInput=

:: check userInput
IF "%userInput%"=="exit" GOTO 6

:: /I makes the IF comparison case-insensitive
IF /I "%userInput%"=="Latin" GOTO 1
IF /I "%userInput%"=="Google" GOTO 2
IF /I "%userInput%"=="Calender" GOTO 3
IF /I "%userInput%"=="Games" GOTO 4
IF /I "%userInput%"=="Limbo" GOTO 5
IF /I "%userInput%"=="Office" GOTO 7
IF /I "%userInput%"=="Notes" GOTO 12
IF /I "&userInput%"=="" GOTO 16
echo %userInput%
:16
GOTO 0
:1
START http://archives.nd.edu/words.html
goto exit
:2
START www.google.com
goto exit
:4
START www.onemorelevel.com
goto exit
:5
START www.computerlimbo.com
goto exit
:6
exit
:7
CLS
TITLE Microsoft Office Shortcuts
ECHO Word/Power Point/Publisher/Excel/Notes/Back
SET /P userInput=

IF "%userInput%"=="exit" GOTO 6

IF /I "%userInput%"=="Back" GOTO 0
IF /I "%userInput%"=="Word" GOTO 8
IF /I "%userInput%"=="Power Point" GOTO 9
IF /I "%userInput%"=="Publisher" GOTO 10
IF /I "%userInput%"=="Excel" GOTO 11
IF /I "%userInput%"=="Notes" GOTO 12
echo %userInput%
:17
GOTO 7
:8
cd\
cd program files\microsoft office
IF EXIST OFFICE11 CD OFFICE11
start WINWORD.exe
exit
:9
cd\
cd program files\microsoft office
IF EXIST OFFICE11 CD OFFICE11
start POWERPNT.exe
exit
:10
cd\
cd program files\microsoft office
IF EXIST OFFICE11 CD OFFICE11
START MSPUB.exe
exit
:11
cd\
cd program files\microsoft office
IF EXIST OFFICE11 CD OFFICE11
START EXCEL.exe
exit
:12
CLS
TITLE Course Notes
ECHO RELIGION/APWH/MUSIC/Back/Goto Start
SET /P userInput=

IF "%userInput%"=="exit" GOTO 6

IF /I "%userInput%"=="Back" GOTO 7
IF /I "%userInput%"=="Goto start" GOTO 0
IF /I "%userInput%"=="Religion" GOTO 13
IF /I "%userInput%"=="APWH" GOTO 14
IF /I "%userInput%"=="Music" GOTO 15
echo %userInput%
:18
GOTO 12
:13
CD\
CD documents and settings
CD %userprofile%
CD my documents
cd religion
start notes.doc
exit
:14
CD\
CD documents and settings
CD %userprofile%
CD my documents
CD APWH
start notes1.doc
exit
:15
CD\
CD documents and settings
CD %userprofile%
CD my documents
CD music
start notes.doc
exit