This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 5101. |
Solve : need newer way of doing Old DOS command? |
|
Answer» oh, srry.Quote from: just-a-teddybear on APRIL 24, 2008, 08:43:31 PM EASIEST would be to just copy CHOICE.com from windows 98"easiest" In the long run the easiest way is the right way. Quote from: llmeyer1000 on April 25, 2008, 08:30:52 AM
Oh radhamurali92, Did you not look at the site (link above) which warns against using choice.com under NT? Better to use choice.exe which was written for NT. |
|
| 5102. |
Solve : Batch creation of new folders? |
|
Answer» Hello again. SCENARIO...10 files in a folder...Is it possible to use a batch command to create a folder for each of the files (with the name of each respective created folder the same as the file) and MOVE the file into it's new folder? Thanksihope its usfl |
|
| 5103. |
Solve : REG COMPARE HELP? |
|
Answer» How do I check for a value in the registry and based upon weather the registry value exist allow a PROGRAM to be installed. If registry value does exist, don't install a program. (How do I get the return valve from the REG COMPARE into a varable.)Use for then reg query, the file wont be created if the key doesent exist because reg query creates an error.. How do I get the return valve from the REG COMPARE into a varable. The Return Code is returned by the system as a variable already (Errorlevel): 0 - Successful 1 - Failed. You can use the if errorlevel - goto in your batch file to utilize the results. Test for errorlevel 1 first. If true goto an error message and exit. If errorlevel 1 is false, then the reg query was successful and you can proceed with the installation. Quote from: mrische1 on June 06, 2008, 11:28:17 AM Is there a way to prevent the command results from being displayed on the screen? /Q I couldn't find any way, but adding the code &cls to the line will clear the screen within a few nanoseconds, so that most users will not be able to see the output. (Warning, It may still be possible to capture the output while using the cls.) The following code tests for the existence of a specific string value name. [HKEY_CURRENT_USER\Software\7-Zip] "Test" If you need to check for a specific string value, it may be a bit more difficult. (You can eliminate the notes, echo's & pauses after testing & debugging.) Oops: The following code has been edited as of 06/08/2008 1:15 AM EST. The original posted code did the opposite of what mrische1 requested. It went to Don't_Instl, when it should have gone to Install. I read the request wrong. Code: [Select]@echo off :: Tests for the existense of string value name reg query HKCU\Software\7-Zip /v Test&cls if errorlevel 1 goto Install :: Add Installation Error Message here. IE: echo Sorry ... The system cannot install your program as desired. pause >nul goto End :Install :: Add Installation code here. IE: echo Installation proceeding as requested. pause >nul :End exitQuote from: llmeyer1000 on June 07, 2008, 08:53:19 AM adding the code &cls to the line will clear the screen within a few nanoseconds Not without seriously distorting the meaning of "few". Quote from: Dias de verano on June 07, 2008, 09:06:32 AM Not without seriously distorting the meaning of "few". WOW! Dias, I might have expected that out of some others, but I didn't expect you to be so picky. Do you really need to get so creative to increase your post count? I'm sorry I didn't do any research on the ELAPSED time between lines in a batch file, the processor refresh rate, the refresh rate on the average video card, and any other factors involved! The inaccuracy in my use of the word "few" might have actually made a difference on a 286, but on most computers in use today the difference is almost neglible, which is what the phrase was meant to convey. (I would have thought that most people would have realized that.) Besides, I think the warning that I posted should have been sufficient to cover the nanosecond error. Quote (Warning, It may still be possible to capture the output while using the cls.) No need to get sore, not to say nasty, over being caught out about an elementary error. A nanosecond is a billionth of a second. Quote from: Dias de verano on June 07, 2008, 11:42:23 AM A nanosecond is a billionth of a second. I think most of us know that already. Your posts usually a bit more useful than trying to finding "error" in someones choice of wording. The point was simply that the output would be displayed for only a very brief period of time. (two shakes of a LAMB's tail, a few nanoseconds, a very short period of time.) I really doubt that the writer of this article meant a few nanoseconds literally any more than I did: Take a Few Nanoseconds to Explore the Roots of ComputingOk, maybe I went over the top there, but it does bug me when people use terms like that loosely. As in off by a factor of 10,000. Other ones that bug me are using the phrase light year as a measure of time, or saying that using paper "kills rain forests" (it doesn't). I had to research "over the top" before I could reply. Were you referring to the military definition, leaving a safe condition for an unsafe one, the arm wrestling move, or the one referring to "excess, particularly outrageous behaviour or hyperbole." http://en.wikipedia.org/wiki/Going_over_the_top If it was the latter, I suppose I was guilty also, particularly in Reply #8. I may have overreacted a bit due to being too thin skinned at times. I really hope that "thin skinned" isn't another one of those expressions that get on your nerves. If it is then I'll probably just have to do something drastic, like reformat my HD. Opps, I just did it again. Sorry about that! I just couldn't resist. I hope mrische1 gets back with us soon and gets this thread back on track. Any more deviation on our part, & we may soon be accused of hijacking! Oops: Now here's an error worth fixing. In Reply #6 the posted code has been edited as of 06/08/2008 1:15 AM EST. The original posted code did the opposite of what mrische1 requested. It went to Don't_Instl, when it should have gone to Install. Quote from: mrische1 on June 05, 2008, 10:15:29 AM If registry value does exist, don't install a program. I read the request wrong. I read it as if "Do not install unless the value does exist. |
|
| 5104. |
Solve : Renaming files with DOS using part of the original name? |
|
Answer» I've managed to find the errror, it was a problem of carelessly copying & pasting copying & pastingi would expect you to understand what the script doing. |
|
| 5105. |
Solve : were can you get DOS Shell that came with version 4?? |
|
Answer» does anybody know were i can GET DOS Shell that came with VERSION 4 and later? You can download the Supplemental Disk directly from Microsoft. This version is for DOS 6.22 but was the only one I could find. Srry but after i installed it DOS Shell wasnt working. Any other ideas? Installed it on what? DOSShell is a component of DOS. Did the supplemental disk provide all the following files: DOSSHELL.COM DOSSHELL.EXE DOSSHELL.GRB DOSSHELL.INI DOSSHELL.VID DOSSWAP.EXE DOSSHELL.HLP? If I remember correctly, DOSShell installed with DOS, not as a separate package. Any error messages? Did it crash Windows Explorer? Wait it works! Thanks Sidewinder Aparrently i accendently renamed one of the files that prevented setup to install but it works now! Thanks! |
|
| 5106. |
Solve : run command on many files? |
|
Answer» Good day all.. Going to take a while though, it's about 500GB i thing u will smile like that when it finish successfully and if not i will be like this At the moment, I'm not even breathing Everyone knows thing always fail at 98%...i think u have the hope just don't be depressed 2% STILL a good ratio It worked... Im' happy... Thanks again all. Been a while since I did any sort of in depth batch programming... |
|
| 5107. |
Solve : Help...Any DOS command can get string from file ?? |
|
Answer» Hi, |
|
| 5108. |
Solve : how to make file splitter?? |
|
Answer» hi friends, hi friends, you need a a better language that KNOWS how to read files and cater for number of bytes read. A vbscript snippet Code: [Select] Dim fso, f, MSG Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("c:\testfile.txt", ForReading) ReadTextFileTest = f.Read(10) the example above reads in 10 characters. You can do a loop to read in the rest, then write them out to INDIVIDUAL files. is it not possible using dos shell script? |
|
| 5109. |
Solve : Wrong Output? |
| Answer» FIXED. | |
| 5110. |
Solve : Web Loading? |
|
Answer» resolved.The type command expects [drive:][path]filename parameters not internet addresses. Batch coding is not designed for the Web, but you have alternatives on your SYSTEM that will scrape and print the web page data: The type command expects [drive:][path]filename parameters not internet addresses. Batch coding is not designed for the Web, but you have alternatives on your system that will scrape and print the web page data:amazing works like a dream thanks very much |
|
| 5111. |
Solve : I have a problem at month end.? |
|
Answer» I'm new to this and have written a simple batch file that runs every day and copies a month-to-date performance file to a 'current_month' folder. When a new month starts I need it to copy the previous months final file from 'current_month folder to the 'archive' folder before saving down the first set of data for the new month. No problem until the last day of the month is say Thursday 31st - I pick up that days data on Friday 1st. did i mention that I don't work weekends ? Which means it is the 3rd before I am back to run the new months first file. How can I get the script to detect the month has changed from the last time it was run and automatically run the end of month routine before carrying on with the first file of the new month ? Many thanks for your attention and help. Trevwhen you reach the last day of the month, just copy the file to the archive folder. You don't have to wait to till next month when the job is run to do that. Quote from: trevorg2 on May 09, 2008, 09:32:22 AM How can I get the script to detect the month has changed from the last time it was run and automatically run the end of month routine before carrying on with the first file of the new month ? I won't write a batch file for you but i can suggest the logic of how to do this. First set up your archive and populate it with last month's files. Run the batch every work day. Write it so that it READS the system date and isolates the month. Then it checks in a certain location to see if there is a file called e.g. thismonth.txt. If there is no such file there, it means that this is the first time you have run the batch, so it writes e.g. "05" to thismonth.txt. If there is such a file there, then the batch has been run at least once already. Open the file and compare the 2 digit string it contains with the current month number contained in the system date. If they are the same, then the month end has not passed yet and you can exit. If they are not the same, then we are into the next (or another!)* month and you can do your archive stuff and finally write the new month value to thismonth.txt. Then you can do whatever you need to do next. * We assume for this simple DESCRIPTION that you never leave a gap long enough between runs so that more than one month end has passed. Quote from: ghostdog74 on May 09, 2008, 09:49:51 PM when you reach the last day of the month, just copy the file to the archive folder. You don't have to wait to till next month when the job is run to do that. Read his post, he mentions the problem of a month change happening on a non-working day when he is absent. Quote from: Dias de verano on May 10, 2008, 02:25:35 AM Quote from: ghostdog74 on May 09, 2008, 09:49:51 PMRead his post also, that his batch file copies files everyday. So when it reaches the last day of the month, either a 30th or 31st, (or 28/29) , just do an extra copy of the file to the archive directory. There's no need to extra code to detect a month. change. Or am i misinterpreting what OP wants? Quote from: ghostdog74 on May 10, 2008, 04:15:48 AMwhen you reach the last day of the month, just copy the file to the archive folder. You don't have to wait to till next month when the job is run to do that.
Every working day, I should think, in view of this that he wrote: Quote did i mention that I don't work weekends ? Which means it is the 3rd before I am back to run the new months first file. But it is ambiguous, so let's wait for him or her to clarify.Thanks for your replies - I'm okay to copy the last days file into the archive - I have a second 'EOM' batch file set up to do that. However, If I go on vacation at month end/crossover my cover could easily just run the daily file and end up over-writing the month end file ....Not good news !! I just wondered if I could somehow put the daily and EOM files together so that the super file could just be run - and it would sort out whether to continue saving to the 'current folder' or archive to the EOM folder before continuing. I love you all Trev If this sort of thing is really mission-critical then you are being (I am sorry to be blunt) foolishly cheeseparing to do things this way, getting IT SUPPORT from a web forum. Budget for some IT support costs. Dias de verano - You are right !! Also your earlier solution will work perfectly - Many thanks for that - I was toying with something similar but couldn't get it to work - your solution avoids the problem I has neatly. As for IT support ................. In our place ?? You are joking I'd be OLD and GREY before that happened !! Look after yourself and thanks also to everyone else who chipped in - we can call this one resolved. Trev |
|
| 5112. |
Solve : Possible Idea? |
|
Answer» My game currently loads THINGS by checking if the file is there and if it is then setting a variable to certain value. You can have something like this: How would i get the game to output the data into file1.bat please. Honestly, batch isn't one of my strongest areas but I've had a lot of experience with it. Try this (as an idea): file1.bat Code: [Select]set name=Jacob set weapon=MP5 set level=3 file2.bat Code: [Select]@echo off call file1.bat echo Hello %name%, you are using an %weapon% and you are currently on level %level%. pause cls echo please enter your name set /p name= : cls echo Please enter a weapon set /p weapon= : cls echo Please enter a level number set /p level= : cls del file1.bat echo set name=%name%>>file1.bat echo set weapon=%weapon%>>file1.bat echo set level=%level%>>file1.bat echo Successfully saved pause exit Side NOTE: you don't need the ':' when using the set command (set /p level= :). I just put it there because I think it looks better.Quote from: Carbon Dudeoxide on June 07, 2008, 04:15:01 AM Honestly, batch isn't one of my strongest areas but I've had a lot of experience with it. Thanks, But I'll keep my old way as it took a good week to perfect. And it will take a long TIME to incorporate this successfully. Thanks. No problem. (again) |
|
| 5113. |
Solve : Checking For A Folder Then Creating It.? |
|
Answer» I need to check for a folder called data, which is in the same area as the batch file. Yeah, my bad. I forgot the NOT.No Worries, Thanks. And What Does MD Do?MD is pretty much the same as MKDIR. They both create directories (A.K.A, folders)Quote from: Carbon Dudeoxide on June 07, 2008, 03:32:34 AM MD is pretty much the same as MKDIR.OKAY, Thanks, Your A Big Help. No problem. Glad to help. One thing I should ADD (if you didn't already know this), In Command Prompt, if you TYPE command /?, it will tell you what the command is and what it does. Example: Quote C:\Documents and Settings\Brian> MD /?Quote from: Carbon Dudeoxide on June 07, 2008, 03:37:39 AM No problem. Glad to help.Thanks Brian Hehe, no problem Jacob. |
|
| 5114. |
Solve : Displaying Data From A .txt? |
|
Answer» I am in the PROCESS of making a simple TEXT based game. Instead of this: Thanks Very Much. |
|
| 5115. |
Solve : problem to catch errorlevel? |
|
Answer» Dear All, i'm newbie. I tried to make a batch file to backup data(files). But before it copy the files which are needed to backup, it checks first whether there is a data to backup and give information... FOR /F "tokens=1" IN ('DIR /B %src%') DO XCOPY %src% %dest% /d /y /s Thank u for your respond, Could u help me to explain ur logic of that code? Because if i were not mistaken, it won't copy,only if %src% directory is empty. But the idea of my coding is that there will always be files in %src% dirct. and xcopy /d /s /y /l gives display list whether there is a file changing or update than check with "find" to KNOW whether there is file update and than need to backup... And also i want to give message to the user...that there is no file need to backup because no file changed. Or maybe ur code has worked like my idea, just perhaps i didn't understand it well? once again thank u...The flaw in the original logic is twofold. One there is no leading space in the string you're using in the find instruction. If you fix the first ("0 "), any numeric that is a multiple of ten will produce an errorlevel not zero. Code: [SELECT]:BACKUP new or changed files :: Check whether there are files to backup echo. Checking files... set task=There were no files to backup for /f %%i in ('xcopy %src% %dest% /d /s /y /q /l') do ( if %%i==0 goto JOBDONE ) set task=Backup new or changed files echo. %task% in %src% xcopy %src% %dest% /d /y /s goto JOBDONE Quote from: Sidewinder on June 06, 2008, 05:49:46 AM The flaw in the original logic is twofold. One there is no leading space in the string you're using in the find instruction. If you fix the first ("0 "), any numeric that is a multiple of ten will produce an errorlevel not zero. Wow....u r right, now my code is working... I didn't realize that. And i tried ur coding, it's nice, worked very well, and i never thought about that logic which is very cool ...(need more practice) also this forum... i think i'll use yours... Thank u very much.... |
|
| 5116. |
Solve : how to echo % in dos? |
|
Answer» hey all, |
|
| 5117. |
Solve : long path names in FOR loop? |
|
Answer» I have a little BATCH file that doesn't seem to recognize the long pathname. Looks like this... I don't understand the first /fdirectly after the FOR. Also the pathname for the directory of files to be used has a nest double quotes inside single quotes. "c:\Matt Files\*.dwg" has embedded space(s) and therefore needs to be quoted. The /f switch tells the for instruction that it will be processing a file-set (no quotes), a command (single quote), or a string (double quotes). In this case a command (dir) will be processed, therefore single quotes are needed. This explains why you have a double quotes string nested in a single quote string. The paths after the wait switch and the /b switch also have embedded spaces. The %%f variable could go either way with spaces, so quoting the variable does no harm. Is the code throwing an error or is everything fine? It might be EASIER to debug your file if you run from the command prompt and not by double-clicking the file. For starters the cmd window will STAY open. |
|
| 5118. |
Solve : Messenger? |
|
Answer» Hey guys, i've taken a break from programming because i'm starting to suck at it. So i came back to batch for a bit and this my 'messenger' all it uses is the messenger service and so on. Hope you enjoy it. Code: [Select]@echo off |
|
| 5119. |
Solve : games in dos messed up? |
|
Answer» When I try to play a game in dos part of the top i on the BOTTOM, and the bottom is elevated so if I move my mouse up, it goes to the top, which is at the bottom. How do I fix this?please someone answerYou waited only 20 minutes before bumping! This is not a chat room. How are you starting DOS? |
|
| 5120. |
Solve : find special characters? |
|
Answer» I am hopefull you guys can help me out with this question. Check out the findstr command. Where does this string exist? If from a file you can check if not A-Z, and not a-z and not 0-9. If a character is not one mentioned, it must be a special character. This is the commands I am trying to run with some others to check for length and such. I have the string I am working with set as the varable choice. rem checks to see if special used set errorlevel= echo %choice% |findstr /i /r "[^0-9]" if /I %errorlevel% lss 1 goto spchar it works but it also seems to be grabbing everything not just the special charactors. any ideas?It seems the findstr command does not support multiple ranges in the regex expression. The good news is there is always a way to build a better mousetrap. For this solution I had to reach deep into the DOS gene pool and then fast forward to the present. Code: [Select]@echo off set spechar=N echo;;|choice /c=%choice%; set > p.bat CALL p.bat for %%v in (%[%) do call :check %%v set [= del p.bat > nul if %spechar% equ Y echo This string: %choice% contains special characters goto :eof :check echo %1 | findstr /r "[0-9]" > nul if %errorlevel% EQU 0 goto :eof echo %1 | findstr /r "[A-Z]" > nul if %errorlevel% EQU 0 goto :eof echo %1 | findstr /r "[a-z]" > nul if %errorlevel% EQU 0 goto :eof set spechar=Y This works with the DOS version of choice not the NT version.I couldn't find a source for the choice command but you may have better luck with Google. You can also borrow a copy from another machine. Good luck. vbscript Code: [Select]Set objArgs = WScript.Arguments strToCheck = objArgs(0) WScript.Echo strToCheck Set objRE = New RegExp objRE.Global = True objRE.IgnoreCase = False objRE.Pattern = "[^a-z0-9]+" Set colMatches = objRE.Execute(strToCheck) For Each objMatch In colMatches WScript.Echo "At position " & objMatch.FirstIndex & " matched " & objMatch.Value WScript.Quit(2) Next usage: save the above as script.vbs and on command line : Code: [Select]C:\test>cscript /nologo script.vbs "s^dfs" s^dfs At position 1 matched ^ C:\test>echo %errorlevel% 2 I have it working now but it is giving me some weird results here is my code Code: [Select]@echo off GOTO itemB :nowearly cls echo time not valid echo please do not use between midnight and 1 AM echo. goto LOOPA :spchar cls echo time not valid echo please do not special charctors echo. goto itemB :badtime cls echo time not valid echo please do not add a : to the time echo. goto itemB :badtimesc cls echo time not valid echo please do not add a ; to the time echo. goto itemB :badtimep cls echo time not valid echo please do not add a . to the time echo. goto itemB :badtimes cls echo time not valid echo please make sure time is in 24 hour format echo see example below echo. goto itemB :badtimel cls echo time not valid echo please do not use LETTERS in time echo. goto itemB :tooearly cls echo time not valid echo please do not use between midnight and 1 AM echo. goto itemB :overtime cls echo time not valid echo please do not set time greater then 2400 echo. goto itemB :minover cls echo time not valid echo please do not set minutes greater then 60 echo. goto itemB :itemB set spechar=N rem gets user input and set a variable for the input SET Choice= echo Type the time in military (24 hour) format and press Enter: echo Example: 1300 is 1:00 PM SET /P Choice=time: rem only accepts the first 4 characters entered set choice=%choice:~0,4% REM sets the number of characters to length echo %choice%> %temp%\string.txt REM get the file size in bytes for %%a in (%temp%\string.txt) do set /a length=%%~za REM do some batch arithmetic set /a length -=3 if /i %length% lss 4 goto badtimes REM clean up temp file del %temp%\string.txt rem sets the time to variables to be checked set choice1h=%choice:~0,1% set choice2h=%choice:~1,1% set choice1m=%choice:~2,1% set choice2m=%choice:~3,1% set choicemm=%choice:~2,2% goto check REM checks for special charctors :check rem checks to see if a : is used set errorlevel= echo %choice% |findstr /i /r "[:]" if /I %errorlevel% lss 1 goto badtime rem checks to see if a ; is used set errorlevel= echo %choice% |findstr /i /r "[;]" if /I %errorlevel% lss 1 goto badtimesc rem checks to see if a . is used set errorlevel= echo %choice% |findstr /i /r "[.]" if /I %errorlevel% lss 1 goto badtimep echo %choice1h% | findstr /r "[0-9]" >nul if %errorlevel% EQU 1 goto lettest echo %choice2h% | findstr /r "[0-9]" >nul if %errorlevel% EQU 1 goto lettest echo %choice1m% | findstr /r "[0-9]" >nul if %errorlevel% EQU 1 goto lettest echo %choice2m% | findstr /r "[0-9]" >nul if %errorlevel% EQU 1 (goto lettest) else goto timetest :lettest echo %choice% |findstr /i /r "[a-z]" >nul if /I %errorlevel% lss 1 goto badtimel echo %choice1h% |findstr /i /r "[a-z]" >nul if /I %errorlevel% lss 1 goto badtimel echo %choice2h% |findstr /i /r "[a-z]" >nul if /I %errorlevel% lss 1 goto badtimel echo %choice1m% |findstr /i /r "[a-z]" >nul if /I %errorlevel% lss 1 goto badtimel echo %choice2m% |findstr /i /r "[a-z]" >nul if /I %errorlevel% lss 1 goto badtimel :spcset set spechar=Y if %spechar% equ Y goto spchar :timetest rem validating time if /I %choice% GEQ 2400 goto overtime if /I %choicemm% GEQ 60 goto minover rem makes sure that time is not set between midnight and 1 am set choicea1=%choice:~0,2% set choicea2=%choice:~0,3% set errorlevel= echo %choicea1% |findstr /i /r "/C:00" if /I %errorlevel% lss 1 goto tooearly echo %choicea1% |findstr /i /r "/C:000" if /I %errorlevel% lss 1 goto tooearly goto end :end echo done pause [\code] if you place a ; in the 3rd number place it goes to the following section: :badtimes cls echo time not valid echo please make sure time is in 24 hour format echo see example below echo. goto itemB do you have any ideas as to why this is happening?Quote It seems the findstr command does not support multiple ranges in the regex expression In any other script language regular expressions can contain multiple ranges, so you can exclude upper and lower alphas and numerics and by the process of elimination conclude that at least one character is special. Sending the entire string to the findstr command with a single range only proves you have upper, lower and numerics but tells you nothing one way or the other whether you have any special characters. The choice command, deprecated in NT machines but brought back in Vista is quirky enough to allow you to parse a string into it's component characters. The logic posted assumed each character was not special, then checked each character separately. If the checks fell through all the logic, the flag was flipped indicating that at least one character was special. Unless you want to do this with VBScript, you can download the choice command here. Good luck. There is a version of choice as a .exe file. Testing shows only the .com version of choice works as shown in my previous post. wbrost, you need to be aware of a problem with set /a. It treats numbers with a leading zero as being octal and not decimal, which means that 08 and 09 will be rejected and there will be an error. In my opinion batch language data validation sucks. You can break mosts scripts by inputting the '&' character, the so-called "poison character". Something like QBASIC is better. Ghostdog will be along in a minute with a VBscript. Quote from: Dias de verano on May 14, 2008, 12:41:23 PM Ghostdog will be along in a minute with a VBscript.already done. Post #4 |
|
| 5121. |
Solve : telnet probelm...? |
|
Answer» Hey guys, i've been having an issue with telnet. I've started the telnet service on both of my laptops, and when i use my laptop to telnet to the other one it doesn't work. Any ideas? Thanksdid u CHECK and SEE if you TYPE the right parameters in |
|
| 5122. |
Solve : Cann't install windows after formatitng? |
|
Answer» Hi, I run fdisk and think I did it okay,but at the end I see c: but nothing more, I try to put a XP CD to install windows, but it seems not to READ it bcause it SAY 'no cdrom. |
|
| 5123. |
Solve : barcode printer command? |
|
Answer» i try to run a barcode printer USING .bat file ,but it will read the 1st line only |
|
| 5124. |
Solve : Reading a file through DOS commands? |
|
Answer» Dear members, |
|
| 5125. |
Solve : unwanted repeat? |
|
Answer» okay my sci teacher GOT this document in a email and EVERYTIME he OPENS it it says the exact time it is when you open it, it says this "c\:Documents and Settings\"ME"\pt1.bat" It should be "C:\Documents and Settings\"ME"\pt1.bat" If the batch file is located in the same place as the other, you just type Code: [Select]start pt1.bat Otherwise: Code: [Select]start "" ""C:\Documents and Settings\"ME"\pt1.bat" [i]Note, you need the double '""'[/i] Quote everytime i type edit it says " (the code up there) is not a system command blah blah" and now i cant edit any of my batch files whats goin on?What exactly do you mean? Are you talking about the EDIT command in the Command Prompt? You can use notepad to edit batch files. |
|
| 5126. |
Solve : A minor tweak to a loop.? |
|
Answer» I could use a little help. For reasons that my peers KNOW, I need to get the shutdown -a COMMAND to repeat infinitely. I can get it to happen, but the command prompt window remains open. Is there any way that I can get it to run and have the window not appear? |
|
| 5127. |
Solve : Batch file for renaming all files inside a folder? |
|
Answer» does anybody know the COMMAND??u can use the command MOVE hi pwekn68 i am sorry i typed folder instead of files Quote from: pwekn68 on May 06, 2008, 12:56:36 PM Go to Dos prompt You may also use ? in PLACE of the *. This is useful if you have a specific naming convention where you do not want to change specific characters within the filename. For Example: I had two files named: "igsg09op.4" and "igsg08op.5" (Yes weird extensions, but my program requires them to run properly.) However I needed to change the names to all uppercase. Using the ? in place of the "09" or "08" within the name allows this to work: c:\> rename igsg??op.* IGSG??OP.* The two files changed respectively. IF I were to use only asterisks: c:\> rename igsg*op.* IGSG*OP.* I would get the following filenames: IGSG08op.4OP and IGSG09op.5OP By the way, Thank you pwekn68. Your method helped me solve my more complex naming convention. Kudos! |
|
| 5128. |
Solve : Copy the names of root folder, sub folders and the files with in? |
|
Answer» there is nothing with the comand i think its SOMTHING related to the OS he is using or some SECURITY issues'Path' is just the example. " Volume in drive E is DATABTW, this is normal, I have this too.I think so, not able to troubleshoot... see u tomorrow |
|
| 5129. |
Solve : Using .bat to move a file with an unknown file name? |
|
Answer» System: Win2k3 Server Code: [Select]@echo off Awesome! I changed it slightly: Code: [Select]@echo off for /f "tokens=* delims=" %%v in ('dir /s /b c:\path\to\file') do ( copy "%%v" \\192.168.1.111\path\to\archive\directory move "%%v" "C:\path\to\local\staging\newfilename.extension" ) Thanks for such a fast reply |
|
| 5130. |
Solve : How to read the properties in a dos file? |
|
Answer» I do have a set of properties in the file, which needs to be made used in my .BAT file. |
|
| 5131. |
Solve : add comma in the begining of each row by batch? |
|
Answer» hello, how to add comma in the begining of each row by using batch file? |
|
| 5132. |
Solve : help fixing computer? |
|
Answer» - About a month ago, my antivirus program(Avast) said it detected a virus in MEMORY. - SUGGESTED I shut computer down and reboot. - Did so. - Everything went fine with no RESULTING errors or messages. - When attempted to return MS-DOS prompt level, received message that it couldn't fine the .pif file. - Researched and found it still there. - Tryed to recreate an ms-dos prompt. - Then receive message that system couldn't find command.com. - Tryed c:\windows\system32\command.com. - System still couldn't find it, even though file is there. - Then ran virus check; spybot checkers(Adaware, Spybot, SpyDoctor, etc.), etc. - They did find instances of viruses, etc. and removed them. - Ran defrag, checkdisk, scandisk, etc. etc. - Check registery for .EXE and exefile settings. All o.k. here - Rebooted computer. - Tryed other user logons. - Tryed creating new user logon. - Still same results. - Did extension research into problem. - Can't find anything that works. - Did extensive research on this board concerning MS-DOS. - Have not found anything new that is helping. - NOTE: ---- - Can get cmd command to work and get me to DOS level. - However that are certain dos command I use frequently such as 'edit' 'fd(changes date of file(s))', etc. - These are not working. - I don't want to do a system restore at this point. I just want to fix the problem. - B-T-W. - Have Compaq Presario V5305. - WINDOWS XP MEDIA EDITION - VERSION 2002 - SERVICE PACK 2 - Only have RESTORED disk - did not come with OEM disks. - Any suggestions...... -thanks -dan Double Post. Please see your other post for replies. Topic Closed. |
|
| 5133. |
Solve : how to calculate time lapse? |
|
Answer» Greeting, hi Dias de verano I just want to draw your attention to the first line of my post. hi dias i dont think it was there when i read ur code for that i didnt notice itThank you much, will try and see how it work Regards/VanskyThank you Sidewinder, your code work just great..... Regards/Vansk03 |
|
| 5134. |
Solve : Start Minimised? |
|
Answer» Is there a way to minimise an application from a batch file after it has opened up in a window? |
|
| 5135. |
Solve : How to print from a DOS file to Laser Jet?? |
|
Answer» Just bought a new computer and laser printer. For some reason, I cannot print the DOS files onto the laser.What do you mean by this?The Printer is HP Laserjet P2015d I have downloaded the printer driver from HP website to the computer, which is also an HP Pavilion Slimline, Vista Operating System. My DOS program is used for financial balance sheets, etc and has historical data The information and program is on disc, which is attached to the computer by cable. I need to print the information on this disc Therefore, I upload, work on it and then print it out I cannot print out since the laser jet is not accepting the print command from the dos program Thank youwell first your printer has to be connected to ur computer by means of a Parrallel port or serial port, not a Firewire or USB nor Ethernet because DOS was not made around the time Firewire, USB, and Ethernet were developed and so DOS isnt compatible with these Ports but is compatible with serial and parrallel. So once you have your printer connected to your computer using a serial or parrallel then in Command Prompt, type in this "copy .* lpt1" this prints your file to your printer if its connected by means of parrallel, now if you have it connected by serial port then type this "copy .* COM1" just remember that DOS doesnt support Firewire, USB, nor Ethernetif the printer is a modern raster type of printer, it will just plain not print from DOS. I HAVE gotten DOS to print to both USB and Ethernet Printers, "BUT" you have to do it through a share. You need to map LPT communications to the printer share. Also make sure the share is simple without spaces like HP2015 so your share is \\COMPUTERNAME\HP2015. Obviously enter your computer name in place of computername, and create the share to say HP2015 without spaces. DOS mapped printers dont like spaces, if you want to split its share name up you can use _ underscores!!! I also run old accounting software that NEEDS to print via DOS since the program is a 10 YEAR old priceless application that still serves a purpose without spending like $10,000 to replace it for our food store, where I am an IT Professional, and I used the trick below to make ours work to a shared printer on a computer that has its printer connected via ethernet. We hit this problem when the accounting department replaced their old HP4000 Laserjet which was communicating through LPT1 with a Savin 27 Color printer that is USB and Ethernet only!!! ((( and I didnt buy that Savin piece of junk...I call it the Spendin 27 color printer for as many problems as they have had with it and its Ricoh guts ))) This below should make it work for you... You will want to set the lpt2 shown below to the LPT that the DOS program is trying to print to...I'd try LPT1 first, and if LPT1 doesnt work, try LPT2 1. Click Start, and then click Run. 2. In the Open box, type cmd, and then click OK. 3. Type net use lpt2 \\computername\HP2015 /PERSISTENT:yes, and then press ENTER. 4. To quit the command prompt, type exit, and then press ENTER. http://support.microsoft.com/kb/314499 |
|
| 5136. |
Solve : Assigning Mouse Buttons to other purposes.? |
|
Answer» I would like to know how I could use a Batch file to assign the Left or Right mouse click function to something else (Like assign Right Mouse click to open Task Manager). I would like to know how I could use a Batch file to assign the Left or Right mouse click function to something else (Like assign Right Mouse click to open Task Manager).this is not possible in batch files, and there arent any 3rd party PROGS that i know of that can detect Mouse clicks. Oh, Well that's disappointing. Aren't there commands like this: Rundll32 user32,SwapMouseButton Rundll32 mouse,disable You can disable the mouse or even swap the functions of the mouse buttons yet you can't assign them to execute a file Hmm, Well thank you very much for your response. I appreciate it no that is possible in batch Quote Rundll32 user32,SwapMouseButton but im saying that you cant assign mouse presses as hot keys.Alright, Well do you think it would be possible with VBS?im not an expert on VB, but PROBABLY so.Quote You can disable the mouse or even swap the functions of the mouse buttons yet you can't assign them to execute a file I can't imagine why you'd want to do this. Might be very frustrating when left-clicking and some program pops-up and starts executing instead of the normal operations of the mouse event. Does your mouse software support assigning a button to a file? If so, a VBScript could mimic the mouse presses although in most cases it's easier to use the GUI. VBScript can create shortcuts where you can assign hotkeys. It might be possible to create a SHORTCUT in a directory other than the desktop (keep it invisible). The hotkey assignments should still be valid. Edit: not too sure about that last sentence; in fact the shortcut might have to be on the desktop for the hotkey sequence to work. I use a Logitech G5 mouse as well as the G15 keyboard. I have programmable keys on the keyboard with a GUI but the mouse does not have one. As I said in the initial post I am more interested in learning to see if it is possible and how to do it rather then actually doing it. Just curiosity. May come in handy down the road. Thank you for your responses |
|
| 5137. |
Solve : Use a .bat file to open a database routine/menu driven system? |
|
Answer» Windows XP Professional, V5.1, 1 MILLION megs RAM |
|
| 5138. |
Solve : Commands in bat file? |
|
Answer» Hi but if i add these two commands to a bat file then they do not work Does not work how? You are overwriting a single file so that only the data in the last file copied will exist in c:\auto\com1\tt1-10.txt. The most obvious error is the lack of double % WITHIN the batch file. A potential error EXISTS if the file names have embedded spaces. Code: [Select]DIR /S /B C:\rename\tt1-10.txt> TMP.DIR FOR /F "tokens=* delims=" %%F IN (TMP.DIR) DO COPY "%%F" c:\auto\com1\tt1-10.txt /y Thanks for the help, WORKS now. Thanks |
|
| 5139. |
Solve : Question about menu's in .bat, net name? |
|
Answer» Hi! |
|
| 5140. |
Solve : Mail from DOS prompt? |
|
Answer» I WANT to send a MAIL with attachment from DOS BATCH file. do i need to use any 3rd party tool? or in BUILD command available in DOS?? do i need to use any 3rd party tool? or in build command available in DOS??Do you mean you want to make it into a full-scale application? Plz explain http://www.google.com/search?q=send+mail+from+dos There are lots of different methods to do this, but it depends on if you mean from pure DOS (like MS-DOS) or a Windows command prompt.it all comes down to this, you cant send email in DOS without a 3rd party prog, unless you have an internal Dial-up modem that you can send files with the Copy command. or you could use the Netsh command(if ur using command prompt) to send files through a LAN. |
|
| 5141. |
Solve : How do I Parse data out of a file into a Variable?? |
|
Answer» This is one of the many attempts I have made to Parse data out of the file into a Variable. I think the problem here is that you are using a numeric loop variable, when it should be alphabetic Not quite. He wrote %4 not %%4. That's the problem. You can use %%a to %%z, %%A to %%Z and %%1 to %%9 as loop variables, although the number ones are not documented. Obviously you can't have as many implicit variables using "tokens=1,2,3" etc, if you choose to use numbers as the variable symbols in a loop. The problem is the number of % signs. There should be 2 in front of the variable letter or number in a batch file and 1 at the command prompt. CODE: [Select] SET INPUTVAR=%%4 ECHO INPUTVAR=%%4 Incidentally why not try this Code: [Select]FOR /F "delims=" %%4 IN (SPIMRF1.dat) DO SET INPUTVAR=%%4 ECHO INPUTVAR=%INPUTVAR% I tried several different variations using your posted suggestions. Either of the FOLLOWING TWO (2) pieces of code worked for me. FOR /F "delims=" %%P IN (SPIMRF1.dat) DO ( SET INPUTVAR=%%P ECHO INPUTVAR=%INPUTVAR% ) FOR /F "delims=" %%4 IN (SPIMRF1.dat) DO ( SET INPUTVAR=%%4 ECHO INPUTVAR=%INPUTVAR% ) Thank You very much for your help. Quote from: Dias de verano on June 04, 2008, 06:48:07 AM Not quite. He wrote %4 not %%4. That's the problem.DOH I didnt spot the single %4, he had %%4 on the FOR line I didnt know about %%num - all these years and theres still something new to learn !! Cheers Graham |
|
| 5142. |
Solve : save RTF Files in plain Text file format? |
|
Answer» Hello All, cd C:\(Where ever the folder is) Unfortunately it's not that simple. Changing the extension of a file does not change it's organization. If the OP has a copy of MS-Word, it is possible to write a simple VBScript to save the documents as text files. Let us know. I do have VB for the above function, but i want to know is it possible to create a batch program to achieve what the VB is doing. I think its possible through batch as batch files are easy to handle and work with. Thanks!Sidewinder, you beat me to it. Macdad, you goofed. Please check your answers before posting in future. This is a text file containing just the words "This is a text file.": Code: [Select]This is a text file. This is an RTF file containing just the words "This is a rich text format file": Code: [Select]{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang2057\deflangfe2057{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;} {\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);} {\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255; \red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0; \red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 \snext0 Normal;}{\*\cs10 \ADDITIVE \ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid219276\rsid13575563 \rsid13646503}{\*\generator Microsoft Word 11.0.6568;}{\info{\title This is a rich text format file}{\author User}{\operator User}{\creatim\yr2008\mo5\dy7\hr22\min40}{\revtim\yr2008\mo5\dy7\hr22\min41}{\version1}{\edmins1}{\nofpages1}{\nofwords5} {\nofchars29}{\*\company HOME}{\nofcharsws33}{\vern24579}}\paperw11906\paperh16838 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1800\dgvorigin1440\dghshow1 \dgvshow1\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct \asianbrkrule\nojkernpunct\rsidroot13646503 \fet0\sectd \linex0\headery708\footery708\colsx708\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang2057\langfe2057\cgrid\langnp2057\langfenp2057 {\insrsid13646503 This is a rich text format file.}{\insrsid13575563 \par }{\insrsid13646503 \par }}Quote I do have VB for the above function, but i want to know is it possible to create a batch program to achieve what the VB is doing. Under the circumstances, the CLOSEST to a batch file would be the one to launch your VB converter program. Is your VB program interactive or batch? wait you guys, wat if he put in the Findstr command and did that for all the converted txt files so he COULD look for anything in the brackets and delete EM from the file. except wat is the command for deleting specific lines in a file. edlin?Quote from: macdad- on May 08, 2008, 05:40:32 AM wait you guys, wat if he put in the Findstr command and did that for all the converted txt files so he could look for anything in the brackets and delete em from the file. Because {\insrsid13646503 This is a rich text format file.} is in brackets, it would GET deleted. Anyway, writing a VB script is, in my opinion, the easiest and most efficient way to achieve what the OP is trying to do.yea, i guess. |
|
| 5143. |
Solve : batch file to open multiple DOS windows? |
|
Answer» Hi there |
|
| 5144. |
Solve : how to make string for a commond?? |
|
Answer» 1. to run the commonds in dos i do have to switch to system32 directory each time when i open dos window. is there any way to come out from this issue so that it WOULD been possible to run commonds directly without switching again and again. although i know that this can be achieved by setting path variable to point to system32. but this variable already has been set already to point to java home directory as per my requremet. 2. how can i define a string for a commond suppose this is a commond C:\> cd c:\windows\system32 now i want that this commond would work as such if i write C:\> string regards san 1)I dont fully understand the question, if you understand you need a variable and one has already been set, why not just set another? 2)so instead of typing C:\windows\system32\batfile.bat , you just want to type batfile.bat , this can be done by placing the batch file inside the windows folder, and if that doesent work TRY windows\system32 folder.Quote from: diablo416 on May 08, 2008, 07:44:22 AM
yes!! isn't it possible to define two seprate variables such that both of them work? please read my problem again Quote 2)so instead of typing C:\windows\system32\batfile.bat , you just want to type batfile.bat , this can be done by placing the batch file inside the windows folder, and if that doesent work try windows\system32 folder. i meant how to define a small string for a lengthy commond?Quote although i know that this can be achieved by setting path variable to point to system32. The path variable can point to multiple directories by separating them with semi-colons. path=c:\java\directory;c:\windows\system32;c:\windows; After checking the current directory, the path is searched reading left to right. If a match is found, execution begins, if not you get the dreaded "is not recognized as an internal or EXTERNAL command, OPERABLE program or batch file." Many programs add themselves to the path when installed. You can also add your own directories so you don't have to store your own stuff in the Windows directories. The path also works with the pathext variable when files in a directory have the same name but different extensions. thanks!! and what about my second question? Quote how can i define a string for a commond Put it in a batch file called string.bat, put the batch file in a folder on the PATH and then you can just type string for example s32.bat Code: [Select]@echo off cd "c:\windows\system32" Now if you type s32 at the command prompt the effect is the same as if you had typed cd "c:\windows\system32" The power of batch files! PS the word command has an 'a' in it. Hmmm... somebody else was in the habit of spelling it "commond"... |
|
| 5145. |
Solve : Assign most recent file to a variable. (curious)? |
|
Answer» Hi all,
Cheers, Cameron.show samples of your file formats, and what you WANT to doHi ghostdog74 ... I'd provided the file format in the initial post... %xDIR%\%xMCode%%xCCode%%xTType%.%Year:~2,2%%Month%%Day%.* For example: C:\...\USCBTT.080604.155015 What I WANTED to do was INDICATED in the dot points. you can use the dir command to generate a file listing these switches would seem relevant /b ... generate a bare listing /o:d ... in date order, earliest first /o:-d ... in date order, latest first /T:C ... use file creation date /T:A ... use last access date /T:W ... last written You can add a wildcard to select the file(s) you require e.g. dir /b /o:-d /t:c [filespec] You can use FOR to process the output. You can use the IF EXIST test. |
|
| 5146. |
Solve : The "runas" command? |
|
Answer» HEY! I know what the "runas" COMMAND is doing, but I have no idea how to use it! I have seen some examples, but never got it explained. So could SOMEONE help me out? Thanks. s0br3.Maybe this will help .Ty |
|
| 5147. |
Solve : Paths with spaces, Help.? |
|
Answer» Hello, |
|
| 5148. |
Solve : How do activate and deactivate wireless and wired network? |
|
Answer» Hi! |
|
| 5149. |
Solve : Similar to 'tee' in batch/msdos ??? |
|
Answer» Hi All, |
|
| 5150. |
Solve : starting program in dos? |
|
Answer» Hi guys, also, when i try this on say, superscan, i start it fine and now am able to input info in the box, but what would the command be to make a button click called "Me" under the ip address i entered. Using only the keyboard, what actions do you have to take to give the "Me" button focus? It is these actions you need to script. Once the "Me" button has focus, sending the enter key will produce the button click. Note: If your application is updated, your script may break. Just something to be aware of. PS. I've always called the tilde a squiggle, but you won't find that in any reference. Nice site, Sidewinder. Mobzy, I think you will want to try the following right now: WshShell.SendKeys "~" or WshShell.SendKeys "ENTER" and WshShell.SendKeys "TAB" Just imagine you don't have a mouse and you have to use your keyboard but record all the keystrokes you make and turn it into a script.Thanks for your answer and trying to help me. ive added: set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "scanner.exe" WScript.Sleep 100 WshShell.AppActivate "scanner" WScript.Sleep 100 WshShell.SendKeys "Me" WScript.Sleep 100 WshShell.SendKeys "~" WScript.Sleep 100 WshShell.SendKeys "TAB" WScript.Sleep 2500 and set WshShell = WScript.CreateObject("WScript.Shell") WshShell.Run "scanner.exe" WScript.Sleep 100 WshShell.AppActivate "scanner" WScript.Sleep 100 WshShell.SendKeys "Me" WshShell.SendKeys "TAB" WScript.Sleep 100 WshShell.SendKeys "~" WScript.Sleep 100 and still the same thing. you say imagine i have no mouse, but when i try and press keys to see what buttons activate i just hear error sounds. Am i doing it right? thanks again .SOMETHING great happened thanks to you sir. ill post more in a bit. i thankyou so much!!!!you way works perfect and i understand about the imagine no mouse thing i was curious, say i wanted to enter an ip into the box normally id use WshShell.SendKeys "192.168.0.1" WScript.Sleep 100 how .. now this i think is confusing, would i be able to have a small dialog popup, and user enter an IP into that, and click ok, and it echos the info back into the superscan. hah, hard 1 ay?Glad you got it working. Quote how .. now this i think is confusing, would i be able to have a small dialog popup, and user enter an IP into that, and click ok, and it echos the info back into the superscan. Why the confusion? Typing into a small dialog popup is no different from typing into the scanner GUI. Quote hah, hard 1 ay? Not nearly as difficult as you might imagine. Check out this site for some ideas. thanks for advice above mate, ill check it out in a bit. I need some help guys. if used TAB to cycle through menus, and also ctrl+tab.. i found more menus, n cant seem to get anywhere, no commands seem to work to cycle through. any idears? maybe they arnt true gui buttons, but they link to say, start scan and they scan. ( not superscan ). Ive hiy a brick wall!:( any ideas? id really appreciated it!!! The plot thickens. With Windows objects, this can be accomplished by first writing a script to display all the verb names for an object and their values. With this information, you can work backwards to script the GUI. This was demonstrated in the second example. If your application supplied a COM object, you may have to research either the registry or an object browser for the program id and go from there. The sendkeys method has codes for almost every key or key combination except PRNTSCRN. You'll have to manually go through the key sequences needed to accomplish your task and then script every single keystroke. This can be a bit tedious so check out if your application has command line parameters where you can accomplish your task from the command prompt. If you give us more info on the superscan program, exact name and version, perhaps one the the members will have some experience with this specific software. Good luck. |
|