Jump to content

Make gui invisible


Klexen
 Share

Recommended Posts

I have my program automate creating an outlook account by executing the mail config in control panel and clicking buttons and filling in input boxes. Is there a way that I could make the "Mail Setup" window invisible, and the "E-mail Accounts" window invisible while it goes through it's thing? Like make the windows invisible based off window title or something.

I was thinking I could use transparency and set window to 0 transparency by title, but wouldn't user see the window while it gets the window title and makes it invisible. I'm sure it would be fast, but I want to know if I could make it invisible right from the beginning..

Edited by Klexen
Link to comment
Share on other sites

I have my program automate creating an outlook account by executing the mail config in control panel and clicking buttons and filling in input boxes. Is there a way that I could make the "Mail Setup" window invisible, and the "E-mail Accounts" window invisible while it goes through it's thing? Like make the windows invisible based off window title or something.

I was thinking I could use transparency and set window to 0 transparency by title, but wouldn't user see the window while it gets the window title and makes it invisible. I'm sure it would be fast, but I want to know if I could make it invisible right from the beginning..

If Invisible = Transparent, then you can use WinSetTrans(). Here is an example.

:P

Edited by PsaltyDS
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

From your message I can't tell if you want a GUI or a Window hidden. If you want to hide a GUI (Made by you), then use PsaltyDS' idea. Otherwise, just use WinHide()

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

From your message I can't tell if you want a GUI or a Window hidden. If you want to hide a GUI (Made by you), then use PsaltyDS' idea. Otherwise, just use WinHide()

Ok, either of those work.. The only problem is, you see the window for a split second before it hides the window. Is there some way possible to make it never show?

Link to comment
Share on other sites

Ok, either of those work.. The only problem is, you see the window for a split second before it hides the window. Is there some way possible to make it never show?

I don't think there is, if you really wanna be complex then you could save a screen shot in the temp directory and display it for like 10 to 100 milliseconds, then delete it. I would definitely not recommend that though.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

I would definitely not recommend that though.

For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Link to comment
Share on other sites

If you need it transparent, what is wrong with:

#include<GUIConstants.au3>
$GUI = GUICreate( "test", 500, 500 )
WinSetTrans( $GUI, '', 0 )
GUISetState( @SW_SHOW )

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
    Sleep(10)
WEnd

Just set the transparency prior to calling GUISetState(@SW_SHOW)

Link to comment
Share on other sites

okay

if it is a gui then it will not be shown untill you call GUiSetState

if it is a window that you start it using run function then you can use this Run("filename.exe","",@SW_HIDE)

if it is an existing window you can use WinSetState("Window Name","",@SW_HIDE)

[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]
Link to comment
Share on other sites

If you need it transparent, what is wrong with:

#include<GUIConstants.au3>
$GUI = GUICreate( "test", 500, 500 )
WinSetTrans( $GUI, '', 0 )
GUISetState( @SW_SHOW )

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
    Sleep(10)
WEnd

Just set the transparency prior to calling GUISetState(@SW_SHOW)

I don't think the OP is talking about his own AutoIt GUI, it's a third-party application's window. WinSetState() with @SW_HIDE does make more sense than transparency for this, but it's not as much fun to watch!

:P

Edited by PsaltyDS
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

I don't think the OP is talking about his own AutoIt GUI, it's a third-party application's window. WinSetState() with @SW_HIDE does make more sense than transparency for this, but it's not as much fun to watch!

:idea:

I believe you're right. :P

But, when did "fun" have anything with functional, and in my opinion, "proper", code?. :/

I'm quite the guy that understands humor, but in my opinion, when it comes to code, I'd rather make it accurate, and (hopefully) understandable, rather than making it "fun". :(

No offense, I just think that when someone ask for something, one would rather respond with a more "proper" way to do it, rather than the one that gives more "bling". xD

Edit:

Meh, missed a letter. :/

Edited by FreeFry
Link to comment
Share on other sites

I believe you're right. :P

But, when did "fun" have anything with functional, and in my opinion, "proper", code?. :/

I'm quite the guy that understands humor, but in my opinion, when it comes to code, I'd rather make it accurate, and (hopefully) understandable, rather than making it "fun". :(

No offense, I just think that when someone ask for something, one would rather respond with a more "proper" way to do it, rather than the one that gives more "bling". xD

Edit:

Meh, missed a letter. :/

Right, it's outlook email account setup gui...

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...