Jump to content

WRP

Members
  • Posts

    12
  • Joined

  • Last visited

WRP's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. OK, so the explanation I needed is that without Local/Global, the default behavior is to make a variable declared within a function local UNLESS the name refers to an existing global variable. So the use of Local prevents reference to an existing global variable.
  2. I understand the argument of using Local/Global for code readability, but I don't see it for avoiding collisions. As far as I can tell, except for the case of Global within a function, AutoIt assigns the same scope to variables whether or not Local/Global is used. So, Local should have absolutely no effect wherever it is used.
  3. I have tried writing scripts without Local/Global and everything seems to work fine. I would expect there to be problem situations, though, since the single equals sign is overloaded as both assignment and test. Can you think of example cases where omitting Local/Global would break the code?
  4. A variable declared within a function is automatically Local. Anything declared outside a function is automatically Global, even if it was declared Local, since there is no file scope. As for declaring Global within a function, that's just a bad idea. So is there really any benefit to having the Local/Global declarations?
  5. I'm having trouble with the source code of version 1.4. Au3Check gives 226 errors. In fontviewer.au3: $WM_DROPFILES previously declard as a 'Const'. In ColorChooser.au3: $ghGDIPDLL: undeclared global variable. But most of them are like this in WinAPIEx.au3: _WinAPI_xxxxxxxx() already defined. What is the problem here?
  6. Let's try that attachment again...
  7. I have noticed this problem on a few AutoIt GUIs. The attached pic shows an example with the Code Wizard app that is distributed with SciTE4AutoIt3. The background color of the frame labels became corrupted when I moved the color chooser dialog over them. Is this a problem with AutoIt or with the way Code Wizard is coded?
  8. Don't read too much into the question. I'm just trying to learn the idomatic use of AutoIt to manage standard I/O, IPC, and output parsing. I just looked at llewxam's IP Scanner. '?do=embed' frameborder='0' data-embedContent>> That is interesting, but I'd like to find some scripts that make more extensive use of various command-line options. I particularly want to see how best to manage piping between tools.
  9. Only on Windows. I used the term "Unix filter" just to describe a type of application, not to imply any use of a *nix OS. "A filter is a small and (usually) specialized program in Unix-like operating systems that transforms plain text (i.e., human readable) data in some meaningful way and that can be used together with other filters and pipes to form a series of operations that produces highly specific results." Ideally, I'd like to see examples of AutoIt interfaces that coordinate use of multiple filters.
  10. The Example Scripts forum is vast and I couldn't turn up any on my own. I'm looking for examples of GUI interfaces for command-line tools. The target apps may take command-line options and input either data streams or text files. Output would generally be formatted text. It's the general category of "Unix filters". I'm hoping to find some good illustrative cases made with attention to efficiency, maintainability, and defensive coding.
  11. Thanks. Now it's clear what's happening. I'm trying to get a grip on coding GUIs with AutoIt. As far as I can tell, buttons and labels are the only things that change shape to fit their contents. Is that correct? Is there a way to have controls rearrange automatically? For example, if a button in a row of buttons changes size, then the buttons on the right shift to the right to make room. I guess for that to work, every other element would have to be subject to re-sizing/positioning. It looks like control positions are always hard-coded, but I wanted to make sure that I hadn't missed something.
  12. I'm having trouble with labels that don't expand to fit their text. According the docs, this should work, but the bottom two labels are truncated. How does expansion work, in general? #include <GuiConstantsEx.au3> GUICreate("Label Width Test", 250, 120) GUICtrlCreateLabel("Five Four Three Two One", 5, 5) GUICtrlSetBkColor(-1, 0x50cc40) GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlCreateLabel("Six Five Four Three Two One", 5, 35) GUICtrlSetBkColor(-1, 0x50cc40) GUICtrlSetFont(-1, 10, 400, 0, "Arial") GUICtrlCreateLabel("Five Four Three Two One", 5, 65) GUICtrlSetBkColor(-1, 0x50cc40) GUICtrlSetFont(-1, 10, 700, 0, "Arial") GUICtrlCreateLabel("Six Five Four Three Two One", 5, 95) GUICtrlSetBkColor(-1, 0x50cc40) GUICtrlSetFont(-1, 10, 700, 0, "Arial") GUISetState() While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd
×
×
  • Create New...