DF-21 Forums Forum Index DF-21 Forums
The Dark Forces Community
 
DF-21.net Home | FAQ | Search | Memberlist  | Register 
Profile | Log in to check your private messages | Log in

NirCmd

 
Post new topic   Reply to topic    DF-21 Forums Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
Weregoose
Gamorrean

Joined: 05 May 2008

PostPosted: Aug 24, 2009 11:47    Post subject: NirCmd View user's profile Send private message Reply with quote

Alright. NirCmd. I've busted it out again, and it's not cooperating with the emulator.

Assume a fresh install of the latest version of DOSBox.

nircmd.exe and nircmdc.exe are both dropped into C.

In the Run dialog: c:\nircmdc.exe script "c:\df.ncl"

In df.ncl:

Code:
exec show "C:\Program Files\DOSBox-0.73\dosbox.exe"
cmdwait 2500 sendkey enter press


DOSBox should have an extra Z:\> in there afterward, but it prefers not to.

Going for broke now:

Code:
exec2 show "C:\Program Files\DOSBox-0.73" "C:\Program Files\DOSBox-0.73\dosbox.exe"
wait 2500
win activate ititle "Frameskip"
wait 500
sendkey 0x41 down // 'A'
wait 500
sendkey 0x41 up
wait 1000
win close title "DOSBox Status Window"


Nothing. It's actually stubborn enough to ignore that last line.

These commands will all work on Notepad, but not on the one application that I really care about. Any pokage in the right direction is much appreciated. Although as I finish writing this, I'm now thinking of running NirCmd from inside the belly of the beast. I wonder if that might work. *looks at invisible watch* Firstly, I've got a busy sleep schedule to attend to.

Edit: "This program cannot be run in DOS mode."

Thbpthbp! I'm off to bed.

The MAZZTer
Death Star
Death Star

Joined: 25 Sep 2003

PostPosted: Aug 24, 2009 14:25    Post subject: View user's profile Send private message Send e-mail Reply with quote

Yeah, nircmd is a windows app, won't run in DOS. Razz

[Edit: Looks like DOSBox doesn't respond to sendkey. You'll have to use a scripting app that can use the SendInput API. AutoIt may be able to do this, I'll check.]

[Edit: The following AutoIt script works for me:

Code:
Run("E:\Programs\Emulation\DOSBox\DOSBox.exe")
Sleep(5000)
Send ("{ENTER}")
]

_________________
http://www.mzzt.net/ | I am a respectable admin with a respectable sig.

Display posts from previous:   
Post new topic   Reply to topic    DF-21 Forums Forum Index -> General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group