VOGONS

Common searches


First post, by cabinboy46

User metadata
Rank Newbie
Rank
Newbie

I like to play DOSBox at 1280 X 1024 windowed mode in XP, but I hate that I have to reposition the window each time so it's aligned properly and I can see all of my taskbar & the DOS Box menu bar. Is there a way I can save a DOSBox window position so it automatically starts & remembers this position? That's what I loved about WinUAE the Amiga emulator: it remembers the window positions. Is there a 3rd party program that will do this for me? I tried WindowManager but it doesn't seem to work with DOS boxes within XP. If not, I'd like to request this functionality in the next release of DOSBOX. Otherwise this is an absolutely brilliant program and I thank the developers for their hard work profusely.

C.

Reply 1 of 14, by IIGS_User

User metadata
Rank Oldbie
Rank
Oldbie
cabinboy46 wrote:

I tried WindowManager but it doesn't seem to work with DOS boxes within XP.

Please do not mix DOS boxes with DOSBox. It's not the same. 😉

Klimawandel.

Reply 2 of 14, by collector

User metadata
Rank l33t
Rank
l33t

I think he doesn't mean a DOS box, but is using DOSBox.

In Windows screen metrics are usually stored in the registry or in an ini file. While this is a feature that I would like, as well, I would imagine incorporating such a feature is too platform specific to easily be portable. Portability is important to DOSBox. One of the DOSBox devs can speak about this far better than I can.

Reply 3 of 14, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

I have no idea if/how AutoHotKey might be able to help, but give it a try. It can do a lot, and just maybe it will be able to do what you want.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 4 of 14, by cabinboy46

User metadata
Rank Newbie
Rank
Newbie

I tried AutoHotKey and I got it to do what I wanted it to do. Thanks for the suggestion. I'd still like to see a built-in save window position feature however, but this will do in the meantime. Thanks again. :-)

Reply 5 of 14, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Care to share how you did it? Because then I will add it to my own setup 😀

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 6 of 14, by cabinboy46

User metadata
Rank Newbie
Rank
Newbie

[quote="MiniMax"]Care to share how you did it? Because then I will add it to my own setup :)[/quote]

Certainly. Here's the AutoHotKey script I used for DOSBox to automatically open at 1280X1024 fully aligned to my desktop:

Run, I:\Emulation\DOS\DOSBox-0.72\dosbox.exe
WinWait, DOSBox 0.72
WinMove, 0, 0

You'll have to change & replace the path pointing to the DOSBox exe for your particular system, of course. It would be sooo much simpler if this ability to save window position were built-in by the developers, but in the meantime...

C.

Reply 8 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

a pathless way to move with autohotkey, especially usefull when you have a autohotkey script running anyway to move stuff around or so:

WinMove, DOSBox,, 0, 0,,,DOSBox Status Window ;moves the main window
WinMove, DOSBox Status Window,, 0, 0 ;moves the console window

It might need to be in a timer so it would look like this:

#NoEnv
#Persistent ; the time always runs
SetTimer, dosbox, 250 ; timer will be executed every 250ms
Return

dosbox:
{

WinMove, DOSBox,, 0, 0,,,DOSBox Status Window ;moves the main window
WinMove, DOSBox Status Window,, 0, 0 ;moves the console window
}
return

0,0 is the pixel position of the upper left corner of the window on the desktop. 0,0 is the upper left corner of your desktop.

further code explanation:
WinMove, DOSBox,, 0, 0,,,DOSBox Status Window
<- this moves any Window with Dosbox in the title (so all versions of Dosbox, if you want to differ between them, write WinMove, Dosbox 0.72....), except the Window with the title "DOSBox Status Window" (the console window), so you can place them independently.

BUT I'm sure that somewhere in the autohotkey forums is a script which will save Windows postition and will restore them for any program 😀

Reply 9 of 14, by cabinboy46

User metadata
Rank Newbie
Rank
Newbie

[quote="Dominus"]a pathless way to move with autohotkey, especially usefull when you have a autohotkey script running anyway to move stuff around or so:

[code]
WinMove, DOSBox,, 0, 0,,,DOSBox Status Window ;moves the main window
WinMove, DOSBox Status Window,, 0, 0 ;moves the console window[/code]

It might need to be in a timer so it would look like this:

[code]
#NoEnv
#Persistent ; the time always runs
SetTimer, dosbox, 250 ; timer will be executed every 250ms
Return

dosbox:
{

WinMove, DOSBox,, 0, 0,,,DOSBox Status Window ;moves the main window
WinMove, DOSBox Status Window,, 0, 0 ;moves the console window
}
return[/code]

0,0 is the pixel position of the upper left corner of the window on the desktop. 0,0 is the upper left corner of your desktop.

further code explanation:
WinMove, DOSBox,, 0, 0,,,DOSBox Status Window
<- this moves any Window with Dosbox in the title (so all versions of Dosbox, if you want to differ between them, write WinMove, Dosbox 0.72....), except the Window with the title "DOSBox Status Window" (the console window), so you can place them independently.

BUT I'm sure that somewhere in the autohotkey forums is a script which will save Windows postition and will restore them for any program :)[/quote]

Thanks. This is a better script than my cumbersome one. I couldn't figure out how to implement the timer thing. This is useful to me. Too bad that the DOSBox developers probably won't be able to provide a native screen save position feature. Ah well.

C.

Reply 10 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

you're welcome. Since I'm having my Windows taskbar on top a couple of apps get confused and like to place their appbar underneath my taskbar and for the most annyoing I solved this problem with such an autohotkey script, so there was nothing new for me to look for 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 11 of 14, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Okay - this was fun!

Based on Dominus' code, I have come up with this:

#NoEnv                                          ; Avoid looking up empty variables in the environment.
#Persistent ; This script should always be running.

SetTimer, DOSBoxMonitor, 1000 ; Look for a new DOSBox window every 1 sec.
return

DOSBoxMonitor:
IfWinNotExist, DOSBox,,DOSBox Status Window ; If no DOSBox window exist, start an automatic
SetTimer, DOSBoxRepos, 500 ; re-position timer.
return ; Otherwise, we assume that is has already been
; been re-positioned.
DOSBoxRepos:
IfWinExist, DOSBox,,DOSBox Status Window ; If a DOSBox window is detected,
{ ; re-position both windows.
WinMove, DOSBox,,0,0,,,DOSBox Status Window ; Move the main window to top-left corner.
WinMove, DOSBox Status Window,,0,450 ; Move the status window below the main window.
SetTimer, DOSBoxRepos, Off ; Now that this DOSBox has been re-positioned,
; stop with the re-positioning.
}
return

With 2 timers like this, a new DOSBox window be automatically moved into the top-left part of the screen, but afterwards you are free to move it around.

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 12 of 14, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

nicely done....

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 13 of 14, by Zaytsev Artem

User metadata
Rank Newbie
Rank
Newbie

Donno if it's still actual (I guess DOS will be actual forever as long as good old games live), but what a f@#k should I install AutoHotKey — I know it's an awesome tool, but just for DOSBox it has to be in my processes list always?
The ideal solution to solve this task was to use Windows command "cmdow" with parameter "/run", but it doesn't support using "/run" and "/mov" simultaneously.
So I used a tool "StartX" (http://www.naughter.com/startx.html), which starts DOSBox and then corrects it's window position. Here's the mine usage:
d:\Distr\System\Util\Win2K\Misc\StartX\1.06\StartX.exe /D"C:\Program Files (x86)\DOSBox-0.74" /P50,50 "C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe -noconsole"

Reply 14 of 14, by osmanvielma

User metadata
Rank Newbie
Rank
Newbie
Zaytsev Artem wrote:
Donno if it's still actual (I guess DOS will be actual forever as long as good old games live), but what a f@#k should I install […]
Show full quote

Donno if it's still actual (I guess DOS will be actual forever as long as good old games live), but what a f@#k should I install AutoHotKey — I know it's an awesome tool, but just for DOSBox it has to be in my processes list always?
The ideal solution to solve this task was to use Windows command "cmdow" with parameter "/run", but it doesn't support using "/run" and "/mov" simultaneously.
So I used a tool "StartX" (http://www.naughter.com/startx.html), which starts DOSBox and then corrects it's window position. Here's the mine usage:
d:\Distr\System\Util\Win2K\Misc\StartX\1.06\StartX.exe /D"C:\Program Files (x86)\DOSBox-0.74" /P50,50 "C:\Program Files (x86)\DOSBox-0.74\DOSBox.exe -noconsole"

StartX is great.

At first I thought it was a little old but no.
I tried different options and programs.
AutoHotkey, CMDOW, studdied a lot CMD.EXE posibilities,
and none was quite as good and effective to RUN a program with position defined as StarX

StarX /P0,0 "file.exe"

and done!

Thank you.

It was hours hard work till I finally have it.

Thanks again.