Eambo
Active Members-
Posts
43 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Eambo's Achievements
Seeker (1/7)
0
Reputation
-
Very smart M23, thank you for the example! (Sorry I didn't post my code, it's a mess of additional stuff right now. Was trying to cut it down to post here but didn't get that far yet!) I'll see if I can make this idea work within my code and come back with any issues. Thank you again! 🙂
-
Eambo reacted to a post in a topic:
GUI Button Resize/Repositioning Help
-
Howdy all, and happy new year to you! I have a form with a bunch of buttons, however those buttons can be removed by a *.ini file. At the moment when the buttons are hidden/deleted (I tried both!) it just leaves a blank space, whereas I'd ideally like the buttons to collapse into the empty space. Does anyone have any thoughts on the cleanest way of doing that? At the moment the buttons are all "hard coded" in positioning which may be the problem, but I'm not sure how to create a button otherwise. Thank you as always! 🙂
-
Eambo reacted to a post in a topic:
Array and GUICtrlSetState
-
Eambo reacted to a post in a topic:
Array and GUICtrlSetState
-
Eambo reacted to a post in a topic:
Array and GUICtrlSetState
-
Hi All, Thanks to everyone for their input, advice, and suggestions - as always the community here is very much appreciated 🙂 Additional thanks to Musashi - The flickering issue you mentioned was something I was going to tackle after this, and you solved it as part of this! 🙂
-
Howdy folks! I'm attempting to control multiple buttons using an array for tidiness, however I'm not having much luck. I've used messageboxes to pop up the output and it seems to be correct, but it doesn't seem to be hiding/showing as I would expect. Any thoughts on what I may be doing wrong, or how best to approach this if I'm approaching it very poorly? Ideally what I'm trying to have is: - Set all buttons to empty + combo box empty on start - Select an environment in the combo box - Environment buttons populate - other two environments buttons are hidden Thank you for any guidance you can offer! ; Script generated by AutoBuilder 0.9f Prototype #Region ---Head-- #include <Constants.au3> #include <GUIConstantsEx.au3> #include <Misc.au3> #include <WindowsConstants.au3> #include <Array.au3> #include <ComboConstants.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> If _Singleton("JETS", 1) = 0 Then MsgBox($MB_SYSTEMMODAL, "Warning", "JETS is already running!") Exit EndIf $hGUI = GUICreate("JETS", 829, 600, -1, -1, $WS_OVERLAPPED + $WS_CAPTION + $WS_SYSMENU + $WS_VISIBLE + $WS_CLIPSIBLINGS + $WS_MINIMIZEBOX) $Combo_01 = GUICtrlCreateCombo("", 160, 20, 145, 21, -1) GUICtrlSetData($Combo_01, "Production|Shadow|QA", "") $Label_01 = GUICtrlCreateLabel("Select Your Environment:", 20, 25, 140, 30, -1) $btn_Production_01 = GUICtrlCreateButton("Production_01", 10, 70, 270, 50, -1) $btn_Production_02 = GUICtrlCreateButton("Production_02", 280, 70, 270, 50, -1) $btn_Production_03 = GUICtrlCreateButton("Production_03", 550, 70, 270, 50, -1) $btn_Production_04 = GUICtrlCreateButton("Production_04", 10, 120, 270, 50, -1) $btn_Production_05 = GUICtrlCreateButton("Production_05", 280, 120, 270, 50, -1) $btn_Production_06 = GUICtrlCreateButton("Production_06", 550, 120, 270, 50, -1) $btn_Production_07 = GUICtrlCreateButton("Production_07", 10, 170, 270, 50, -1) $btn_Production_08 = GUICtrlCreateButton("Production_08", 280, 170, 270, 50, -1) $btn_Production_09 = GUICtrlCreateButton("Production_09", 550, 170, 270, 50, -1) $btn_Production_10 = GUICtrlCreateButton("Production_10", 10, 220, 270, 50, -1) $btn_Production_11 = GUICtrlCreateButton("Production_11", 280, 220, 270, 50, -1) $btn_Production_12 = GUICtrlCreateButton("Production_12", 550, 220, 270, 50, -1) $btn_Production_13 = GUICtrlCreateButton("Production_13", 10, 270, 270, 50, -1) $btn_Production_14 = GUICtrlCreateButton("Production_14", 280, 270, 270, 50, -1) $btn_Production_15 = GUICtrlCreateButton("Production_15", 550, 270, 270, 50, -1) $btn_Production_16 = GUICtrlCreateButton("Production_16", 10, 320, 270, 50, -1) $btn_Production_17 = GUICtrlCreateButton("Production_17", 280, 320, 270, 50, -1) $btn_Production_18 = GUICtrlCreateButton("Production_18", 550, 320, 270, 50, -1) $btn_Production_19 = GUICtrlCreateButton("Production_19", 10, 370, 270, 50, -1) $btn_Production_20 = GUICtrlCreateButton("Production_20", 280, 370, 270, 50, -1) $btn_Production_21 = GUICtrlCreateButton("Production_21", 550, 370, 270, 50, -1) $btn_Production_22 = GUICtrlCreateButton("Production_22", 10, 420, 270, 50, -1) $btn_Production_23 = GUICtrlCreateButton("Production_23", 280, 420, 270, 50, -1) $btn_Production_24 = GUICtrlCreateButton("Production_24", 550, 420, 270, 50, -1) $btn_Production_25 = GUICtrlCreateButton("Production_25", 10, 470, 270, 50, -1) $btn_Production_26 = GUICtrlCreateButton("Production_26", 280, 470, 270, 50, -1) $btn_Production_27 = GUICtrlCreateButton("Production_27", 550, 470, 270, 50, -1) $btn_Production_28 = GUICtrlCreateButton("Production_28", 10, 520, 270, 50, -1) $btn_Production_29 = GUICtrlCreateButton("Production_29", 280, 520, 270, 50, -1) $btn_Production_30 = GUICtrlCreateButton("Production_30", 550, 520, 270, 50, -1) Dim $av_btn_Production[30] = ["$btn_Production_01", "$btn_Production_02", "$btn_Production_03", "$btn_Production_04", "$btn_Production_05", "$btn_Production_06", "$btn_Production_07", "$btn_Production_08", "$btn_Production_09", "$btn_Production_10", _ "$btn_Production_11", "$btn_Production_12", "$btn_Production_13", "$btn_Production_14", "$btn_Production_15", "$btn_Production_16", "$btn_Production_17", "$btn_Production_18", "$btn_Production_19", "$btn_Production_20", _ "$btn_Production_21", "$btn_Production_22", "$btn_Production_23", "$btn_Production_24", "$btn_Production_25", "$btn_Production_26", "$btn_Production_27", "$btn_Production_28", "$btn_Production_29", "$btn_Production_30"] $btn_Shadow_01 = GUICtrlCreateButton("Shadow_01", 10, 70, 270, 50, -1) $btn_Shadow_02 = GUICtrlCreateButton("Shadow_02", 280, 70, 270, 50, -1) $btn_Shadow_03 = GUICtrlCreateButton("Shadow_03", 550, 70, 270, 50, -1) $btn_Shadow_04 = GUICtrlCreateButton("Shadow_04", 10, 120, 270, 50, -1) $btn_Shadow_05 = GUICtrlCreateButton("Shadow_05", 280, 120, 270, 50, -1) $btn_Shadow_06 = GUICtrlCreateButton("Shadow_06", 550, 120, 270, 50, -1) $btn_Shadow_07 = GUICtrlCreateButton("Shadow_07", 10, 170, 270, 50, -1) $btn_Shadow_08 = GUICtrlCreateButton("Shadow_08", 280, 170, 270, 50, -1) $btn_Shadow_09 = GUICtrlCreateButton("Shadow_09", 550, 170, 270, 50, -1) $btn_Shadow_10 = GUICtrlCreateButton("Shadow_10", 10, 220, 270, 50, -1) $btn_Shadow_11 = GUICtrlCreateButton("Shadow_11", 280, 220, 270, 50, -1) $btn_Shadow_12 = GUICtrlCreateButton("Shadow_12", 550, 220, 270, 50, -1) $btn_Shadow_13 = GUICtrlCreateButton("Shadow_13", 10, 270, 270, 50, -1) $btn_Shadow_14 = GUICtrlCreateButton("Shadow_14", 280, 270, 270, 50, -1) $btn_Shadow_15 = GUICtrlCreateButton("Shadow_15", 550, 270, 270, 50, -1) $btn_Shadow_16 = GUICtrlCreateButton("Shadow_16", 10, 320, 270, 50, -1) $btn_Shadow_17 = GUICtrlCreateButton("Shadow_17", 280, 320, 270, 50, -1) $btn_Shadow_18 = GUICtrlCreateButton("Shadow_18", 550, 320, 270, 50, -1) $btn_Shadow_19 = GUICtrlCreateButton("Shadow_19", 10, 370, 270, 50, -1) $btn_Shadow_20 = GUICtrlCreateButton("Shadow_20", 280, 370, 270, 50, -1) $btn_Shadow_21 = GUICtrlCreateButton("Shadow_21", 550, 370, 270, 50, -1) $btn_Shadow_22 = GUICtrlCreateButton("Shadow_22", 10, 420, 270, 50, -1) $btn_Shadow_23 = GUICtrlCreateButton("Shadow_23", 280, 420, 270, 50, -1) $btn_Shadow_24 = GUICtrlCreateButton("Shadow_24", 550, 420, 270, 50, -1) $btn_Shadow_25 = GUICtrlCreateButton("Shadow_25", 10, 470, 270, 50, -1) $btn_Shadow_26 = GUICtrlCreateButton("Shadow_26", 280, 470, 270, 50, -1) $btn_Shadow_27 = GUICtrlCreateButton("Shadow_27", 550, 470, 270, 50, -1) $btn_Shadow_28 = GUICtrlCreateButton("Shadow_28", 10, 520, 270, 50, -1) $btn_Shadow_29 = GUICtrlCreateButton("Shadow_29", 280, 520, 270, 50, -1) $btn_Shadow_30 = GUICtrlCreateButton("Shadow_00", 550, 520, 270, 50, -1) Dim $av_btn_Shadow[30] = ["$btn_Shadow_01", "$btn_Shadow_02", "$btn_Shadow_03", "$btn_Shadow_04", "$btn_Shadow_05", "$btn_Shadow_06", "$btn_Shadow_07", "$btn_Shadow_08", "$btn_Shadow_09", "$btn_Shadow_10", _ "$btn_Shadow_11", "$btn_Shadow_12", "$btn_Shadow_13", "$btn_Shadow_14", "$btn_Shadow_15", "$btn_Shadow_16", "$btn_Shadow_17", "$btn_Shadow_18", "$btn_Shadow_19", "$btn_Shadow_20", _ "$btn_Shadow_21", "$btn_Shadow_22", "$btn_Shadow_23", "$btn_Shadow_24", "$btn_Shadow_25", "$btn_Shadow_26", "$btn_Shadow_27", "$btn_Shadow_28", "$btn_Shadow_29", "$btn_Shadow_30"] $btn_QA_01 = GUICtrlCreateButton("QA_01", 10, 70, 270, 50, -1) $btn_QA_02 = GUICtrlCreateButton("QA_02", 280, 70, 270, 50, -1) $btn_QA_03 = GUICtrlCreateButton("QA_03", 550, 70, 270, 50, -1) $btn_QA_04 = GUICtrlCreateButton("QA_04", 10, 120, 270, 50, -1) $btn_QA_05 = GUICtrlCreateButton("QA_05", 280, 120, 270, 50, -1) $btn_QA_06 = GUICtrlCreateButton("QA_06", 550, 120, 270, 50, -1) $btn_QA_07 = GUICtrlCreateButton("QA_07", 10, 170, 270, 50, -1) $btn_QA_08 = GUICtrlCreateButton("QA_08", 280, 170, 270, 50, -1) $btn_QA_09 = GUICtrlCreateButton("QA_09", 550, 170, 270, 50, -1) $btn_QA_10 = GUICtrlCreateButton("QA_10", 10, 220, 270, 50, -1) $btn_QA_11 = GUICtrlCreateButton("QA_11", 280, 220, 270, 50, -1) $btn_QA_12 = GUICtrlCreateButton("QA_12", 550, 220, 270, 50, -1) $btn_QA_13 = GUICtrlCreateButton("QA_13", 10, 270, 270, 50, -1) $btn_QA_14 = GUICtrlCreateButton("QA_14", 280, 270, 270, 50, -1) $btn_QA_15 = GUICtrlCreateButton("QA_15", 550, 270, 270, 50, -1) $btn_QA_16 = GUICtrlCreateButton("QA_16", 10, 320, 270, 50, -1) $btn_QA_17 = GUICtrlCreateButton("QA_17", 280, 320, 270, 50, -1) $btn_QA_18 = GUICtrlCreateButton("QA_18", 550, 320, 270, 50, -1) $btn_QA_19 = GUICtrlCreateButton("QA_19", 10, 370, 270, 50, -1) $btn_QA_20 = GUICtrlCreateButton("QA_20", 280, 370, 270, 50, -1) $btn_QA_21 = GUICtrlCreateButton("QA_21", 550, 370, 270, 50, -1) $btn_QA_22 = GUICtrlCreateButton("QA_22", 10, 420, 270, 50, -1) $btn_QA_23 = GUICtrlCreateButton("QA_23", 280, 420, 270, 50, -1) $btn_QA_24 = GUICtrlCreateButton("QA_24", 550, 420, 270, 50, -1) $btn_QA_25 = GUICtrlCreateButton("QA_25", 10, 470, 270, 50, -1) $btn_QA_26 = GUICtrlCreateButton("QA_26", 280, 470, 270, 50, -1) $btn_QA_27 = GUICtrlCreateButton("QA_27", 550, 470, 270, 50, -1) $btn_QA_28 = GUICtrlCreateButton("QA_28", 10, 520, 270, 50, -1) $btn_QA_29 = GUICtrlCreateButton("QA_29", 280, 520, 270, 50, -1) $btn_QA_30 = GUICtrlCreateButton("QA_30", 550, 520, 270, 50, -1) Dim $av_btn_QA[30] = ["$btn_QA_01", "$btn_QA_02", "$btn_QA_03", "$btn_QA_04", "$btn_QA_05", "$btn_QA_06", "$btn_QA_07", "$btn_QA_08", "$btn_QA_09", "$btn_QA_10", _ "$btn_QA_11", "$btn_QA_12", "$btn_QA_13", "$btn_QA_14", "$btn_QA_15", "$btn_QA_16", "$btn_QA_17", "$btn_QA_18", "$btn_QA_19", "$btn_QA_20", _ "$btn_QA_21", "$btn_QA_22", "$btn_QA_23", "$btn_QA_24", "$btn_QA_25", "$btn_QA_26", "$btn_QA_27", "$btn_QA_28", "$btn_QA_29", "$btn_QA_30"] GUISetState() $i = 1 While $i <= 29 GUICtrlSetState($av_btn_Production[$i], $GUI_HIDE) GUICtrlSetState($av_btn_Shadow[$i], $GUI_HIDE) GUICtrlSetState($av_btn_QA[$i], $GUI_HIDE) $i = $i + 1 WEnd #EndRegion ---Head-- #Region --- Form --- #Region --- Loop --- While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else $Environment = GUICtrlRead($Combo_01) If $Environment = "Production" Then $i = 0 While $i <= 29 GUICtrlSetState($av_btn_Production[$i], $GUI_SHOW) GUICtrlSetState($av_btn_Shadow[$i], $GUI_HIDE) GUICtrlSetState($av_btn_QA[$i], $GUI_HIDE) $i = $i + 1 WEnd ElseIf $Environment = "Shadow" Then $i = 0 While $i <= 29 GUICtrlSetState($av_btn_Shadow[$i], $GUI_SHOW) GUICtrlSetState($av_btn_Production[$i], $GUI_HIDE) GUICtrlSetState($av_btn_QA[$i], $GUI_HIDE) $i = $i + 1 WEnd ElseIf $Environment = "QA" Then $i = 0 While $i <= 29 GUICtrlSetState($av_btn_QA[$i], $GUI_SHOW) GUICtrlSetState($av_btn_Shadow[$i], $GUI_HIDE) GUICtrlSetState($av_btn_Production[$i], $GUI_HIDE) $i = $i + 1 WEnd Else $i = 1 While $i <= 29 GUICtrlSetState($av_btn_QA[$i], $GUI_HIDE) GUICtrlSetState($av_btn_Shadow[$i], $GUI_HIDE) GUICtrlSetState($av_btn_Production[$i], $GUI_HIDE) $i = $i + 1 WEnd EndIf EndSelect WEnd #EndRegion --- Loop --- #Region --- Additional Functions --- #EndRegion --- Additional Functions --- Exit
-
Thank you guys! I meant to respond earlier but you beat me to it, however yeah I realised later this was STDERR_CHILD being missing and not grabbign the StderrRead. Sorted, thank you for your assistance on my derpiness!
-
Hey guys! This is almost definitely just me doing something very silly, but as you can see in the screenshot below: - Super basic code - Returns "curl: (6) Couldn't resolve host 'TEST' - Trying to get this into a string - Stdout Read is returning empty it would seem. Would anyone be able to advise where I'm going wrong here? #include <AutoItConstants.au3> #include <MsgBoxConstants.au3> #include <Array.au3> ; Required for _ArrayDisplay only. $err6="(6) Couldn't resolve host" $iPID = Run("curl.exe -X POST TEST","", @SW_HIDE, $STDOUT_CHILD) Local $sOutput = "" While 1 $sOutput &= StdoutRead($iPID) If @error Then ; Exit the loop if the process closes or StdoutRead returns an error. MsgBox(0,0,@error) ExitLoop EndIf WEnd MsgBox($MB_SYSTEMMODAL, "Stdout Read:", $sOutput)
-
AutoIt Compiled EXE Being Blocked by Windows
Eambo replied to Eambo's topic in AutoIt General Help and Support
Nope, no website being opened. The core of the functionality is mainly ping and traceroutes - a combination of using the internal ping tool as well as launching a command prompt and getting the output from there. Shouldn't be anything opening a website however. -
AutoIt Compiled EXE Being Blocked by Windows
Eambo replied to Eambo's topic in AutoIt General Help and Support
Thanks for the help thus far! I've sent you the full source JohnOne - I'd rather not post it all together clear because it references some personal things all over the place and obfuscating it for here would be a bit of a nightmare. The error they get is: Which is SmartScreen blocking it from running - The English version being: Obviously you can go into "More Info" and allow it from there, but understandably people are put off immediately by this already :-( Thanks for your thoughts! Edit: Oh, compression! No compression being used :-) -
AutoIt Compiled EXE Being Blocked by Windows
Eambo posted a topic in AutoIt General Help and Support
Hi Everyone, My apologies if such information already exists - I could find some stuff about Antivirii products, but nothing about Windows itself. The tl;dr is that my compiled .exe is being detected and blocked by Windows from Windows 8 and up. It does not request admin or anything like that so UAC isn't a problem, but it seems to be Windows SmartFilter or whatever it is. Has anyone got experience in what exactly Windows does to determine how a file fails this check, and how I can potentially certify my program to be permitted? Understandably some users are dubious about opening it, which is entirely understandable. Sorry this is almost more a Windows question than AutoIt, but I figure someone has probably ran into this same issue before. Any advice very much appreciated! -
EDIT: UPDATE: So looks like "BitOR($GUI_SS_DEFAULT_EDIT, $ES_READONLY" was causing problems - I removed these, and looks good now. I see there's a separate ReadOnly in RichEdit, so I'll use that Hi again everyone! I've got myself to a nice place with basic autoit functionality, however I wanted to go a little extra with my ability to colour and highlight lines - so I'm trying to move over to RichEdit. Instantly though I'm having problems unfortunately - @CRLF doesn't seem to work, or even simply "&". As an example _GUICtrlRichEdit_InsertText($Edit1, "Selected " & @CRLF & "Test") Returns output of: Selected Selected Selected Selected When I hit it multiple times. Everything after the first "&" is just...gone. I also tried with "AppendText" and get the same output. Am I doing something really silly here, is this an issue with the latest AutoIt, or is there any better alternative to RichEdit? Thanks as always for any insight you guys can give!
-
Eambo reacted to a post in a topic:
Help Understanding How to Interrupt a GUI Function without OnEvent
-
Eambo reacted to a post in a topic:
Help Understanding How to Interrupt a GUI Function without OnEvent
-
Hi Mikell, Thank you for the help! I may be doing something extremely silly, and my apologies if so. So using your example, I've tweaked as follows: GUIRegisterMsg($WM_SYSCOMMAND, "On_WM_SYSCOMMAND") GUIRegisterMsg($WM_COMMAND, "WM_COMMAND") ... $BtnStop = GUICtrlCreateButton("Stop Action", 424, 136, 161, 65) ... Func On_WM_SYSCOMMAND($hWnd, $msg, $wParam, $lParam) Local Const $SC_MOVE = 0xF010 Local Const $SC_SIZE = 0xF000 Local Const $SC_CLOSE = 0xF060 Switch BitAND($wParam, 0xFFF0) Case $SC_MOVE ConsoleWrite("WM_Move detected" & @CRLF) Case $SC_SIZE ConsoleWrite("WM_Size detected" & @CRLF) Case $SC_CLOSE ConsoleWrite("WM_Close intercepted" & @CRLF) FileDelete(@TempDir & "\Heimerdinger_OriginalSkin.jpg") Exit Return -15 EndSwitch Return $GUI_RUNDEFMSG EndFunc Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam) #forceref $hWnd, $Msg, $lParam Switch BitAND($wParam, 0x0000FFFF) Case $BtnStop MsgBox(0,0,1) Return EndSwitch Return 'GUI_RUNDEFMSG' EndFunc Unfortunately now when compiling I get this: "C:\Users\eambo\Desktop\Multitool\Multitool.au3" (389) : ==> Variable used without being declared.: Case $BtnStop Case ^ ERROR I've tried a few things to remedy this, but none give me the desired results. I've tried commenting out the first "GUIRegisterMsg" incase they were conflicting, as well as declaring $BtnStop inside this function itself just out of interest - but it still does not show the messagebox I was trying to test. I've tried even declaring $BtnStop as global just out of interest, but it isn't playing nice. Any idea where I'm going wrong with this one? Thank you for the help thus far!
-
Hi Everyone, I know this question has been asked before, and even has a shiny tutorial page - but I'm having issues understanding the logic and just how this works. I was hoping some kind hearted hero might be able to help me understand things a bit better. Problem: I have a "Stop" button that I want to interrupt functions at any time when pressed. Scenario: I'm not using OnEvent At the minute, I have the following code. I know that this works for closing at any time, so I was hoping to utilise something similar when my button is pressed: Func On_WM_SYSCOMMAND($hWnd, $msg, $wParam, $lParam) Local Const $SC_MOVE = 0xF010 Local Const $SC_SIZE = 0xF000 Local Const $SC_CLOSE = 0xF060 If BitAND($wParam, 0x0000FFFF) = $BtnStop Then Exit Switch BitAND($wParam, 0xFFF0) Case $SC_MOVE ConsoleWrite("WM_Move detected" & @CRLF) Case $SC_SIZE ConsoleWrite("WM_Size detected" & @CRLF) Case $SC_CLOSE ConsoleWrite("WM_Close intercepted" & @CRLF) Exit Return -15 EndSwitch Return $GUI_RUNDEFMSG EndFunc As you can imagine, the move/size/close cases all work awesomely - but I'm not having much luck with $BtnStop. The tutorial has mentions of using flags, but I was hoping I could circumvent that entirely if possible. Anyone have any ideas on why this won't work who'd be willing to explain it to me? Or if it *is* possible, what I'm doing wrong? Thank you!
-
Disable InputBox when RadioButton Checked
Eambo replied to Eambo's topic in AutoIt GUI Help and Support
Beautiful John, thank you! I don't know how I missed that one, in my head I was using GUICtrlSetOnEvent, which would've been a messier way of doing it. Thanks for the guidance. -
Hey guys, This may be really simple and I'm just reading it wrong. Basically let's say I have the following: $Radio1 $Radio2 $InputBox When I click $Radio2, I want $InputBox to Active, and when $Radio1 is clicked, I want $InputBox to grey out. I'd prefer to do it without calling funtions if possible, although it may not be. What's the cleanest/shortest (coding wise) way of doing it? I can think of few ways but they're convoluted and messy :-( Thanks for your help, guys.