Sign in to follow this  
Followers 0
kambodianboi

Disable a control on Print dialog

2 posts in this topic

Hey guys,

Im trying to disable a control on the Print dialog. I created a simple script, it kinda works, but for some reason, it does not take effect when the Print window pop up. But if I click outside of it, and it refocus itself, then it disable the control.

#include <GUIConstantsEx.au3>
If WinExists("Print") Then
    If ControlCommand ( "Print", "", 1153, "IsEnabled", "" ) Then
        ControlDisable ( "Print", "", 1153)
    EndIf
EndIf
    
    
While 1
    $msg = GUIGetMsg()

    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        EndSelect
WEnd

Any help would be much appreciated

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

While 1 
  If WinExists("Print") Then
    If ControlCommand ( "Print", "", 1153, "IsEnabled", "" ) Then
        ControlDisable ( "Print", "", 1153)
    EndIf
 EndIf
 Sleep(100)
WEnd

Edited by Zedna

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