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