Controlling a window externally

A place for Ogre users to discuss non-Ogre subjects with friends from the community.
Post Reply
mtest
Halfling
Posts: 85
Joined: Tue Jun 17, 2008 2:44 am
Location: United States

Controlling a window externally

Post by mtest »

Lets say my little brother is well past the threshold of legally blind. I would like to make a program to automatically change the font size when a word processor starts up, or to at least call up the program and then change the font size, so he can do it by himself (he can't see the font dialog.). Alas, I have no idea how to do this. The 'font' box thingy is a fairly standard editable combobox.

Uh, just point me in the right direction, and thanks!
scratchyrice
Gnome
Posts: 360
Joined: Thu Apr 27, 2006 9:14 pm
Location: United Kingdom - England
x 16

Re: Controlling a window externally

Post by scratchyrice »

Thats quite low level stuff. You would have to find the memory address or pointer of the font system, And change it using assembler.

Cheers

Scratchy

AMD Ryzen 7900x, Gigabyte Nvidia GeForce 3080 10GB, 32GB DDR5

User avatar
JoseMan
Kobold
Posts: 34
Joined: Thu Feb 19, 2009 10:48 pm
Location: Germany

Re: Controlling a window externally

Post by JoseMan »

scratchyrice wrote:Thats quite low level stuff. You would have to find the memory address or pointer of the font system, And change it using assembler.
Scratchy
Mhh, thats a good idea, but i think u don't need assembler. But this stuff is almost hacking! But very interseting, if I got free time, so i'll will looking for this problem! Just for me! :D

Bye
alex.t
Halfling
Posts: 42
Joined: Wed Feb 27, 2008 7:08 pm

Re: Controlling a window externally

Post by alex.t »

I haven't messed with this in ages, but you can use AutoIt (http://www.autoitscript.com/autoit3/index.shtml) to script windows GUI operations - you basically mimic mouse movements, clicks, and keypresses. So you could write an AutoIt script to open a program, and then based on the program find its font dialog and change it to a high number.

The upside is this isn't assembly or anything close, it's a pretty easy-to-use language.
The downside is that you'd have to rewrite at least part of the script per-program, because different word processors have their font dialogs set up differently, opened from different menus, etc.

Still, for a quick and dirty solution AutoIt might be what you're looking for.
Post Reply