Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Trying to open DF and the On-Screen Keyboard simultaneously  (Read 687 times)

tjg92

  • Escaped Lunatic
    • View Profile
Trying to open DF and the On-Screen Keyboard simultaneously
« on: December 07, 2009, 03:00:33 pm »

I've been trying to figure out how to make a program that opens DF and the On-Screen Keyboard at the same time. There's a thread here if you really want to read it:
http://forum.thegamecreators.com/?m=forum_view&t=162025&b=10

But basically, I'm playing on a laptop and I can't use the + - things without the numpad. So I use the on-screen keyboard. But I'm really lazy so I'd rather just click one thing. I'm trying to use a batch file now. It works, but when DF is opened from the batch file I get an error that says the index file isn't in the data folder, when it is. However if I open DF by clicking on it directly it works. What?

If you guys have any advice, I'd appreciate it. My batch file reads like this:

C:\Windows\system32\osk.exe
C:\Users\Tommy\Desktop\Stuff\gayms\df_28_181_40d\dwarfort.exe
exit
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Trying to open DF and the On-Screen Keyboard simultaneously
« Reply #1 on: December 07, 2009, 03:28:00 pm »

I just experimented with this.  You need to use "cd" to switch to the DF directory first, like so:

cd "C:\Users\Tommy\Desktop\Stuff\gayms\df_28_181_40d"
dwarfort.exe
Logged

tjg92

  • Escaped Lunatic
    • View Profile
Re: Trying to open DF and the On-Screen Keyboard simultaneously
« Reply #2 on: December 07, 2009, 03:51:38 pm »

Badass, works perfectly. Thanks man.  ;D
Logged

Danarca

  • Bay Watcher
  • [MILL_CHILD:ONLY_IF_GOOD_REASON]
    • View Profile
Re: Trying to open DF and the On-Screen Keyboard simultaneously
« Reply #3 on: December 08, 2009, 04:45:10 am »

Un an unrelated note, I once tried to make a batch file check the routers IP (192.168.1.1, 1.0, 0.1 or 0.0).
Didn't succeed, it's quite quirky :p
Code: [Select]
@echo off
ECHO --------------------------------
ECHO Checking if it's 192.168.0.0...
ping -n 1 192.168.0.0
ECHO --------------------------------
IF NOT ERRORLEVEL 1 goto :SUCCESS_00
IF     ERRORLEVEL 1 goto :01

:01
ECHO Nope!
ECHO --------------------------------
ECHO Checking it it's 192.168.0.1...
ping -n 1  192.168.0.1
ECHO --------------------------------
IF NOT ERRORLEVEL 1 goto :SUCCESS_01
IF     ERRORLEVEL 1 goto :10

:10
ECHO Nope!
ECHO --------------------------------
ECHO Checking it it's 192.168.1.0...
ping -n 1  192.168.1.0
ECHO --------------------------------
IF NOT ERRORLEVEL 1 goto :SUCCESS_10
IF     ERRORLEVEL 1 goto :11

:11
ECHO Nope!
ECHO --------------------------------
ECHO Checking it it's 192.168.1.1...
ping -n 1  192.168.1.1
ECHO --------------------------------
IF NOT ERRORLEVEL 1 goto :SUCCESS_11
IF     ERRORLEVEL 1 goto :FAILURE

:SUCCESS_00
ECHO Success!
ECHO --------------------------------
ECHO You are connected to your router through 192.168.0.0!
ECHO Will ping it continuously now.
ECHO --------------------------------
ping -t 192.168.0.0

:SUCCESS_01
ECHO Success!
ECHO --------------------------------
ECHO You are connected to your router through 192.168.0.1!
ECHO Will ping it continuously now.
ECHO --------------------------------
ping -t 192.168.0.1

:SUCCESS_10
ECHO Success!
ECHO --------------------------------
ECHO You are connected to your router through 192.168.1.0!
ECHO Will ping it continuously now.
ECHO --------------------------------
ping -t 192.168.1.0

:SUCCESS_11
ECHO Success!
ECHO --------------------------------
ECHO You are connected to your router through 192.168.1.1!
ECHO Will ping it continuously now.
ECHO --------------------------------
ping -t 192.168.1.1

:FAILURE
ECHO Nope!
ECHO --------------------------------
ECHO You are not connected to a router through one of these.
pause
goto :END

:END
Logged
Clutter god the god of godly gods.
Om Nom nom nom nom
Ah yes the god of stone stockpiles, long randomly generated names, and gods.