# Hide button

## Recommended Posts

Hmmm i am sorry  i had simular problem but i cant find back post.

How to hide a gui button ?

I Want to dodge the variable non déclaréd when i make button in

if statment

thx before

My video tutorials : HERE ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:

##### Share on other sites

I a so stupid nvm

GUICtrlSetState(-1, $GUI_HIDE) My video tutorials : HERE ( In construction ) || My Discord : https://discord.gg/S9AnwHw How to Ask Help || UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote Spoiler Water's UDFs: Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki #### Share this post ##### Link to post ##### Share on other sites Hi caramen, In fact, your post just helped me in a script, replacing 5 different Autoit instructions with 1 only ! These 5 instructions are : ControlHide(), ControlShow(), ControlDisable(), ControlEnable(), ControlFocus() I replaced them all with GUICtrlSetState(), which does exactly the same, as long as you provide the correct state parameter. Concerning GUICtrlSetState(), another parameter intrigued me in the help file :$GUI_DEFBUTTON
But after the negative comments I read from Melba23 and Zedna, I'll never use that one !
https://www.autoitscript.com/forum/topic/123817-gui_defbutton-seens-to-stick-after-guictrldelete/

So finally, thanks for your... forgetting

##### Share on other sites

Haha i like the Your...forgetting.

Even stupideness can lead to a good way then

By the way i am on a projet of 50 000 - 100 000 lignes so i am structuring a script actually so Replace 5 func with 1 is v good.

Maybe 500 Case

I never did that what do you think ?

It s better to have a function file in include or a single file ... wo did a so big project already ?

Edited by caramen

My video tutorials : HERE ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:

##### Share on other sites
33 minutes ago, caramen said:

It s better to have a function file in include or a single file ...

You can think to do your own UDF and use it in your project

Spoiler

Thoughts:

• I will always thank you for the time you spent for me.
I'm here to ask, and from your response, I'd like to learn.
By my knowledge, I can help someone else, and "that someone" could help in turn another, and so on.

/*--------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/

##### Share on other sites

I structured things to have maleable code atm i coded 500 lines i can have understanding of var without check the gui

And all are fractioned in func so i just code them when i need to do similar things

But is it good to do it ? It change somthing ?

My video tutorials : HERE ( In construction )  || My Discord : https://discord.gg/S9AnwHw

How to Ask Help ||  UIAutomation From Junkew || WebDriver From Danp2 || And Water's UDFs in the Quote

Spoiler

Water's UDFs:
Active Directory (NEW 2018-10-19 - Version 1.4.10.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (2018-10-31 - Version 1.3.4.1) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:

## Create an account

Register a new account

• ### Similar Content

• Good morning,

I am trying to align a two-line text in a button so that it would be centered in the button but can't succeed to do it for the vertical part.
Can someone tell me what I do wrong ?
Here is my code:
$btn3 = GUICtrlCreateButton("Execute " & @LF & " file 1", 100, 65, 60, 50, _ BitOr($BS_CENTER,$BS_BOTTOM,$BS_MULTILINE)) and here is the resulting layout I get in my window.
I tried to follow the help, made a lot of different parameter combinations (here it's $BS_BOTTOM, but I tried $BS_VCENTER and BS_TOP), still get the same result : vertical alignement is a no go for me. Can someone help ? TIA Gilles • By Pike Hey Everyone, I haven't been here in a while and recently picked up my old project. Still an FNG! To the point: I want to be able to push the button and either play an mp3, open a file, or open an exe program (all with the same button). The problem is that I don't know how to code for that at "case 1" Case 1 LocalsRead = IniRead("config.ini", "Config", "One", "Default")
SoundPlay($sRead, @HotKeyPressed) <------------------------------- Run($sRead, @HotKeyPressed)                                                                                 <------------------------------- This 'Run' doesn't work even by itself!
See code below for layout. If you need more information I will attach more code or answer any questions. Any help is greatly appreciated.

Much Respect,
Pike

Func _HandleButton() $iClickCount += 1$iTimer = TimerInit() AdlibRegister("CheckButtonPress", $CheckTime) EndFunc Func CheckButtonPress() If TimerDiff($iTimer) < $CheckTime Or$iTimer = 0 Then Return Switch $iClickCount Case 1 Local$sRead = IniRead("config.ini", "Config", "One", "Default") SoundPlay($sRead, @HotKeyPressed) Run($sRead, @HotKeyPressed) Case 2 MsgBox(0, "INFORMATION:", "Choose the file you want designated to this button") Local $sFileOpenDialog = FileOpenDialog(0, @ScriptDir & "\", "All (*.*)",$FD_FILEMUSTEXIST + $FD_MULTISELECT) If @error Then MsgBox($MB_SYSTEMMODAL, "", "No file(s) were selected.") EndIf Local $sFileName = InputBox("INFORMATION:", "Please Name Your File?" & @CRLF _ & @CRLF _ & "6 Characters or Less", "") IniWrite(@ScriptDir & "\config.ini", "Config", "One",$sFileOpenDialog) IniWrite(@ScriptDir & "\config.ini", "Config", "NameOne", $sFileName) EndSwitch$iClickCount = 0 AdlibUnRegister() EndFunc

• By misioooo
Hi!

I am writing some GUI and i need to use images as buttons, but with text on them (text is from INI file).
Part with button looks like this:
$ankieta1 = GUICtrlCreateButton($txtAnk1, 100,350,765,164) GUICtrlSetFont(-1, 22, 800, -1, "Arial") ;GUICtrlSetColor(-1,0xffffff) $hImageBtn_1 = _GUIImageList_Create(765, 164) _GUIImageList_AddBitmap($hImageBtn_1, "c:\path\to\ankieta_clean.bmp") _GUICtrlButton_SetImageList($ankieta1,$hImageBtn_1, 4) GUICtrlSetOnEvent(-1, "On_Ankieta1") The problem - if i uncomment GUICtrlSetColor, color of text changes, but button is just plain gray (no image). How i can change text color not touching image on a button here?
• By XinYoung
Quick question: How can I click this "Select All" button in IE? There's no ID, and the href is "#"
Am I looking at the wrong html code?
Am I looking
• By XinYoung
Hello again
I need to click this Submit button, but it's in a lightbox and has no ID (i think) and I can't figure out a way to target it. _IEFormSubmit doesn't work.

Thank you
×

• Wiki

• Back

• #### Beta

• Git
• FAQ
• Our Picks
×
• Create New...