Sign in to follow this  
Followers 0
Rad

Other windows and processes

10 posts in this topic

I was just thinking about making a program that you could hide windows media player window (because I listen to it but it adds another button), then thought I usually have a window open I dont need the button for. So I want to make a program where you select a window and it lets you give it a stat (always on top, hidden, close etc)

But now I dont see a way to get a different windows name unless you know its title. Is there any way to list all the windows open or anything? Or at least have it so when you click "Set on top" it prompts you to select a window, then when you click a different window its on top?

What would be the easiest way to do this?

Share this post


Link to post
Share on other sites



Try Winlist()

This will get every window name or class there is. It returns an array type value.


F@m!ly Guy Fr33k! - Avatar speaks for itself__________________________________________________________________________________________ite quotes... - Is your refrigerator running? If it is, It probably runs like you...very homosexually - Christians don't believe in gravity - Geeze Brian where do you think you are, Payless?- Show me potato Salad!__________________________________________________________________________________________Programs available - Shutdown timer[indent][/indent]

Share this post


Link to post
Share on other sites

o.o ty! ill go mess with that

Share this post


Link to post
Share on other sites

Try Winlist()

This will get every window name or class there is. It returns an array type value.

It doesn't return the class. To return the actual class of it you'd have to use the API GetClassName.

@Rad... What do you want to do again???? I'm lost.

Do you have a GUI already that says set it on top or something?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Sorry i havent messed with the program yet my lil bro's friend crashed our minibike into my moms 8mo old car and left a 4 foot long gash across the doors....<.< goodbye air conditioner...

but i was going to make a program where it had options to set to any window to set it on top, hide it, or force it close with winkill(), but I couldnt think of a way to get the windows names with WinExists() and didnt have much luck with the helpfile

but that winlist looks like it will work

Share this post


Link to post
Share on other sites

Try Winlist()

This will get every window name or class there is. It returns an array type value.

Off-Topic : eynstyne, your avatar is classic! :whistle:

On-Topic : Your question was hard to understand completely, but I think WinList() is what you are looking for. the best code to look at is the help file's tutorial for winlist, I tried making my own but it didnt work so well. If I were you I would get familiar with the command, but since I am not you I will direct you to a place where you can for yourself. :)


Amp Energy Drink: the official sponsor of me scripting at 2AM.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I think I can figure it out ^^

How do you get what the highest index of an array is? Since Winlist() puts the windows in an array I need to know the size for the loop

or, if theres another way I cant think of off hand, what is it?

Nevermind - I just found:

#include <Array.au3>

_ArrayMaxIndex ( $avArray[[, $iCompNumeric], $i_Base] )

Lets see how this works :whistle:

Edit2:

$array[0][0] = Number of windows returned

thats right out of the winlist() :">

Edited by Rad

Share this post


Link to post
Share on other sites

o_o this returns ALOT more windows than I thought it would ^^

but thats good because now u can show hidden windows and stuff if it works out... jeez theres like 50 windows lol! it works so far though

Share this post


Link to post
Share on other sites

is there any way to get what item is selected when I use this:

GUICtrlCreateTreeViewItem

?? >.> that would be bad if there isnt...

Share this post


Link to post
Share on other sites

GUICtrlRead

lol >.> ........

Share this post


Link to post
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
Sign in to follow this  
Followers 0