shornw Posted December 8, 2008 Share Posted December 8, 2008 This is very odd (well I think so). This script will publish a disclaimer when a user runs a program which they will have to acknowledge before the program will run. The window opens fine but the checkbox is invisible until the cursor is rolled over it, which will cause issues for users. Can anyone offer any suggestion as to why. expandcollapse popup#include <file.au3> #include <process.au3> #include <GuiConstants.au3> #include <GUIbutton.au3> $head = FileRead("\\pdc001\scripts\run\head.txt") $read = FileRead("\\pdc001\scripts\run\read.txt") GUICreate("== IMPORTANT MESSAGE ==", 450, 360) ;create checkbox $ACCEPT = GUICtrlCreateCheckbox("ACCEPT", 200, 270) ;Create Text GUICtrlCreateLabel("Text will go here", 10, 20, 400, 300, 0001) ;Create Buttons $exit = GUICtrlCreateButton("Exit", 270, 320, 70, 30) $OK = GUICtrlCreateButton("OK", 90, 320, 70, 30) ;WinActivate("** ") GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Or $msg = $exit Then Exit If $msg = $OK Then _RunProg() EndIf ; Exit WEnd Func _RunProg() If GUICtrlRead($ACCEPT) = $GUI_CHECKED Then Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://google.co.uk") Exit EndIf EndFunc ;==>_RunProg [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
KaFu Posted December 8, 2008 Share Posted December 8, 2008 The size of GUICtrlCreateLabel() was too large, it just painted over the checkbox.... expandcollapse popup#include <file.au3> #include <process.au3> #include <GuiConstants.au3> #include <GUIbutton.au3> $head = FileRead("\\pdc001\scripts\run\head.txt") $read = FileRead("\\pdc001\scripts\run\read.txt") GUICreate("== IMPORTANT MESSAGE ==", 450, 360) ;create checkbox $ACCEPT = GUICtrlCreateCheckbox("ACCEPT", 200, 270) ;Create Text GUICtrlCreateLabel("Text will go here", 10, 20, 400, 250) ;Create Buttons $exit = GUICtrlCreateButton("Exit", 270, 320, 70, 30) $OK = GUICtrlCreateButton("OK", 90, 320, 70, 30) ;WinActivate("** ") GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Or $msg = $exit Then Exit If $msg = $OK Then _RunProg() EndIf ; Exit WEnd Func _RunProg() If GUICtrlRead($ACCEPT) = $GUI_CHECKED Then Run("C:\Program Files\Internet Explorer\IEXPLORE.EXE http://google.co.uk") Exit EndIf EndFunc ;==>_RunProg OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
shornw Posted December 8, 2008 Author Share Posted December 8, 2008 How stupid do I feel 'cant see the wood for the trees' issue. Sorry and thank you [font='Comic Sans MS']Eagles may soar high but weasels dont get sucked into jet engines[/font] Link to comment Share on other sites More sharing options...
KaFu Posted December 8, 2008 Share Posted December 8, 2008 cant see the wood for the trees' issue. Sorry and thank youNo problem... can't count how often this happened to me already OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now