fopetesl Posted November 8, 2018 Posted November 8, 2018 I have an aged WIN98 computer mostly running DOS programs. Needed because a vital measurement program has only DOS version. In order for some new interface hardware to work a configuration program needs to run on boot up. This program, "initfg.exe", will only terminate with ESC key pressed. I've tried with Windows Script Host and Nircmd (excellent freeware) but neither can pass a character to the running "initfg.exe". I have a feeling I should be able to do this with AutoIt but haven't found an answer. Also will an AutoIt EXE run in DOS mode? The most powerful number in the Universe. Zero.
Danp2 Posted November 8, 2018 Posted November 8, 2018 Have you considered ditching the Win98 machine and using vDos instead? Latest Webdriver UDF Release Webdriver Wiki FAQs
orbs Posted November 9, 2018 Posted November 9, 2018 @fopetesl, after 100+ posts to the forum, you ought to know it is better you provide the code you already have - even if not working, and even if it is vbs or batch, for that matter - so we may have some notion of what you are trying to do. if all you need is to send ESC to a window, that's pretty much the easiest thing to do. your course of action would be: first, grab the appropriate version of AutoIt to run on Windows 98. visit the download page, and scroll all the way to the bottom to the Previous Versions section. your AutoIt script would need to detect the window of the DOS program, activate it (if a window is not active, keys are not sent to it - i'd wager that is why your vbs/batch fail), and send the ESC key at the proper timing. to detect the window, use teh AutoIt Window Info tool (ships with the AutoIt installation). you may want to post a screenshot of that window, as well as the tool output, if you require further help with that. @Danp2, the OP mentioned a hardware device to be controlled by the DOS program. virtualizators of all kinds do not support direct hardware access. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff
Danp2 Posted November 9, 2018 Posted November 9, 2018 @orbs Thanks, I hadn't considered that limitation. Perhaps if the OP provided more details about the involved hardware, then we could determine if there are other options than sticking with the WIN98 machine. Latest Webdriver UDF Release Webdriver Wiki FAQs
AndyG Posted November 9, 2018 Posted November 9, 2018 Hi, try to use some "old fashioned"-DOS-Software, i.e. from http://www.retroarchive.org/garbo/pc/keyboard/index.html I would try "AutoKey". It "sends" Keystrokes to a Program. On 8.11.2018 at 2:05 PM, fopetesl said: In order for some new interface hardware to work a configuration program needs to run on boot up. Am I right, that the program starts via the Autoexec.bat? Then you could wait with the DOS-Command CHOICE /T timeinseconds https://en.wikipedia.org/wiki/Choice_(command) And then you could try to "send" an ESC via the AutoKey.com to terminate your configuration program...... Good old DOS-Day´s? 20 Years ago i would have said: "Yeahhhhhh", but now i like my Mouse, my WIN10 and last but not least...AutoIt ;-) FrancescoDiMuro 1
Zedna Posted November 11, 2018 Posted November 11, 2018 (edited) On 9. 11. 2018 at 9:50 AM, orbs said: @fopetesl first, grab the appropriate version of AutoIt to run on Windows 98. visit the download page, and scroll all the way to the bottom to the Previous Versions section. Just clarification: Apropriate AutoIt's version running on Win98 is 3.2.12.1 v3.2.12.1 – Last version to support Windows 95 and Windows NT 4.0. https://www.autoitscript.com/autoit3/files/archive/autoit/autoit-v3.2.12.1-setup.exe Edited November 11, 2018 by Zedna fix: 3.12.12.1 --> 3.2.12.1 Resources UDF ResourcesEx UDF AutoIt Forum Search
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now