DOS command to launch program after input detected
Moderator: DosItHelp
DOS command to launch program after input detected
Hello,
Is it possible for a program to be launched via DOS after it detects input by the user?
The user will be scanning a Part number (e.g. P1234) at the DOS prompt.
Once this is detected the application Excel.exe will need to be launched.
Is it possible to do this?
Thanks.
Is it possible for a program to be launched via DOS after it detects input by the user?
The user will be scanning a Part number (e.g. P1234) at the DOS prompt.
Once this is detected the application Excel.exe will need to be launched.
Is it possible to do this?
Thanks.
Re: DOS command to launch program after input detected
That depends.
What do you mean by scanning? Do you have some application that uses a barcode scanner?
We would have no control over what the application can do.
What do you mean by scanning? Do you have some application that uses a barcode scanner?
We would have no control over what the application can do.
Re: DOS command to launch program after input detected
FrankOC wrote:Is it possible for a program to be launched via DOS after it detects input by the user?
The user will be scanning a Part number (e.g. P1234) at the DOS prompt.
Once this is detected the application Excel.exe will need to be launched.
This is in Windows, right?
With the right conditions a batch file can be run to launch the scanner software and then to launch excel.
If you supply details about the process then you may get a solution.
Re: DOS command to launch program after input detected
Hi guys,
Thanks for the replies.
Here is the scenario:
1) The user arrives at the Windows 7 workstation with a barcode.
2) User scans barcode using the attached handheld Honeywell Scanner and this triggers Excel application to launch.
Is it possible for DOS to detect input from the scanner?
If so is it possible to create a batch file which launches Excel after data is scanned into the DOS screen e.g. A product's part number.
Thanks
Thanks for the replies.
Here is the scenario:
1) The user arrives at the Windows 7 workstation with a barcode.
2) User scans barcode using the attached handheld Honeywell Scanner and this triggers Excel application to launch.
Is it possible for DOS to detect input from the scanner?
If so is it possible to create a batch file which launches Excel after data is scanned into the DOS screen e.g. A product's part number.
Thanks
Re: DOS command to launch program after input detected
Yes this is in Windows 7.
1) The user will scan a barcode using a Honeywell handheld barcode scanner attached to the Windows 7 workstation.
2) The script will detect that the barcode contains a min requirement of digits e.g. Part Number 012345. Once this minimum condition is met Excel application will be launched and the part number entered in spreadsheet.
Regards
1) The user will scan a barcode using a Honeywell handheld barcode scanner attached to the Windows 7 workstation.
2) The script will detect that the barcode contains a min requirement of digits e.g. Part Number 012345. Once this minimum condition is met Excel application will be launched and the part number entered in spreadsheet.
Regards
Re: DOS command to launch program after input detected
Whatever program is controlling the barcode scanner would have to do that.
Re: DOS command to launch program after input detected
FrankOC: Where does the output of the barcode scanning program go?
Does it get echoed to the cmd console? Is it in a file?
More information is needed.
Does it get echoed to the cmd console? Is it in a file?
More information is needed.
Re: DOS command to launch program after input detected
Barcode scanners usually emulate simple keyboard input. That means whatever application should receive the input has to have the keyboard focus (at least a Batch window has to). You can also adjust the scanner to append a line feed to the scanned string. This way you can use a simple SET /P command to get the string into a variable. Batch can also measure the string length and you can check if the input was numeric only and open an Excel file. But you can not insert the string into a spreadsheet using Batch only. You would have to run an Excel macro that reads the value out of a file or something similar.
May I suggest to use an Excel VBA form with a macro behind the scenes? Excel would be already open and the form could have the keyboard focus. Thus, the scanner input ends up directly in the application where it was expected.
Regards
aGerman
May I suggest to use an Excel VBA form with a macro behind the scenes? Excel would be already open and the form could have the keyboard focus. Thus, the scanner input ends up directly in the application where it was expected.
Regards
aGerman
Re: DOS command to launch program after input detected
Thank you for all of your replies.
Having read aGerman's suggestion of using a macro this will be the route I will take.
Thank you all for your input.
Best regards,
Frank
Having read aGerman's suggestion of using a macro this will be the route I will take.
Thank you all for your input.
Best regards,
Frank