Page 1 of 1

Controlling a window externally

Posted: Sun Mar 15, 2009 2:38 am
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!

Re: Controlling a window externally

Posted: Tue Mar 17, 2009 9:22 am
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

Re: Controlling a window externally

Posted: Tue Mar 17, 2009 11:43 am
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

Re: Controlling a window externally

Posted: Fri Mar 27, 2009 10:00 pm
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.