Jump to content

HELP combine interface script with other script


bennyvo
 Share

Recommended Posts

hi,

I figure it out for my last question.

my new question, how do i make it so when i click on the "X' it close the interface and click "_" to minimize it.

thanks

; Script generated by AutoBuilder 0.5 Prototype

#include <GuiConstants.au3>

If Not IsDeclared('WS_CLIPSIBLINGS') Then Global $WS_CLIPSIBLINGS = 0x04000000

GuiCreate("MyGUI", 262, 70,(@DesktopWidth-262)/2, (@DesktopHeight-70)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)

$Label_1 = GuiCtrlCreateLabel("Hello", 10, 10, 270, 70)

GuiSetState()
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
  ;;;
    EndSelect

WinWaitActive("Untitled - Notepad")
while 1=1
send ("z")
wEnd

WEnd

Exit
Edited by bennyvo
Link to comment
Share on other sites

  • Developers

hi,

I figure it out for my last question.

my new question, how do i make it so when i click on the "X' it close the interface and click "_" to minimize it.

thanks

<{POST_SNAPBACK}>

X and _ work fine when you remove these lines:

WinWaitActive("Untitled - Notepad")
while 1=1
send ("z")
wEnd
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

lol...thanks for trying.

<{POST_SNAPBACK}>

:lmao:

I already know that...i need those line and it doesn't work that's why i need help here.

<{POST_SNAPBACK}>

As soon as you put in the WinWaitActive("Untitled - Notepad"), your script makes a hard stop and wait for Notepad to become active.

Then when it does it ends up in an endless loop.

Maybe have a look and see if you can get it to work with GUISetOnEvent() ....

Opt("GUIOnEventMode", 1)

GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents")
GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents")
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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