Jump to content

Beginner needs expert's advice


qwert
 Share

Recommended Posts

I need to be able to control application windows using a script -- which is why I began investigating AutoIt3. In particular, it was this statement about AutoIt3's Window Management capabilities that gave me hope:

In addition to the "title/text" AutoIt v2 way of accessing windows you can also access windows by their class names and handles. As usual you can expect to move, hide, show, resize, activate, close and pretty much do what you want with windows.

Examples of actions I need to do are:

  • Move and/or hide an application window
  • Disable/remove a window's maximize, minimize and close controls
  • Remove the frame from an application window
  • Remove the scroll bars for a application's main window
I've found many examples of techniques for using AutoIt3 scripts to modify and control a GUI window that I create using GUICreate. HOWEVER, I can't locate (or maybe I just haven't recognized) examples of how to modify/control the main window of some other application. Is it possible with AutoIt3? -- or have I misinterpreted the implied capabilities?

If it is possible, can someone please provide an example -- maybe for removing the frame from an application window in XP -- or removing the scroll bars from an application's main window (and using the Title of the window as one of the parameters).

Any guidance and/or clarifications will be greatly appreciated.

Link to comment
Share on other sites

move=winmove("title","",X,Y)

hide=winsetstate("title","",@sw_hide)

not sure about max min disable but im sure someone can figure it out.

probably controlhide("title","",controlid) to get controlid use au3info

scroll bars shouldn't be hard.

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Link to comment
Share on other sites

Thanks, but as a complete beginner, I'm still a bit lost. For example, what would a script look like to remove the frame for the Solitaire game running under XP?

And is there a summary somewhere of window styles / controls that are controllable in another application's window?

Link to comment
Share on other sites

Thanks, but as a complete beginner, I'm still a bit lost. For example, what would a script look like to remove the frame for the Solitaire game running under XP?

And is there a summary somewhere of window styles / controls that are controllable in another application's window?

Scan through the AutoIt help file, which is the command reference. It contains a couple of basic tutorials, and functions like WinMove() and WinSetState() have example scripts with them.

Do yourself a favor and download the SciTE editor also. It will make you new AutoIt life much easier.

Code up your basic script to do just one of your functions to start. Post some code if you get stuck, and you'll get lots of help.

Welcome to AutoIt!

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...