Sign in to follow this  
Followers 0
penggilas2

Mutli Gui and multi Process..??

4 posts in this topic

#1 ·  Posted (edited)

How to Make Notepad button active ??

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

$Gui = GUICreate("Main Gui", 300, 200)
$Button = GUICtrlCreateButton("Notepad", 40, 20, 90, 30)
GUISetState(@SW_SHOW)

$CreditGui = GUICreate("Splash Gui", 200,30, -1, 0, $WS_POPUP, 0)
$splas = GUICtrlCreateLabel("Try Multi Gui Run Multi Process", 5, 5, 200, 30,$SS_CENTER)
GUICtrlSetFont(-1, 14, 400, 0, "Gloucester MT Extra Condensed")
GUISetState(@SW_SHOW)

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button
Run("notepad.exe")
EndSwitch
Sleep(2000)
DllCall("user32.dll", "int", "AnimateWindow", "hwnd", $CreditGui, "int", 1000, "long", 0x10010)
DllCall ( "user32.dll", "int", "AnimateWindow", "hwnd", $CreditGui, "int", 1000, "long", 0x00040010 )
WEnd

Thank's For All.. ;)

Edited by penggilas2

Share this post


Link to post
Share on other sites



In the WIki you can find a tutorial on how to handle multiple GUIs.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

On the http://www.autoitscript.com/wiki/Managing_Multiple_GUIs process can not be active if the previous process was not completed.

So the notepad button can not be active if the animation does not end.

How to make Notepad button aktif. And $CreditGui always aktif..??

Thank You...

Share this post


Link to post
Share on other sites

The only way to do two things at the "same time" with AutoIt is to use AdLibRegister. This allows to run a function every x milliseconds and then return to the main script.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

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