Jump to content

Recommended Posts

Posted

Thanks  :)  I'm sure josbe will also appreciate the repaintwindow fixes :)

ControlGetPos bothers me too, but I'm fine as long as it works.  After all, I do use the generic WinSetTitle to change the GUI's title.

<{POST_SNAPBACK}>

repainting is certainly good for your script but now my script experience a lot of repainting which produce a lot of flickering.

I need to think about why. ;)

  • Replies 151
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Thanks  :)  I'm sure josbe will also appreciate the repaintwindow fixes ;)

ControlGetPos bothers me too, but I'm fine as long as it works.  After all, I do use the generic WinSetTitle to change the GUI's title.

<{POST_SNAPBACK}>

@CS: Sure. :)

Maybe I should add a GuiCtrlGetPos function.  Or maybe a basic GuiCtrlGetInfo function that gives you the position, size and internal type?

@Jon: GuiCtrlGetInfo would be useful. (Obtaining this info more directly).
Posted

repainting is certainly good for your script but now my script experience a lot of repainting which produce a lot of flickering.

I need to think about why. :)

<{POST_SNAPBACK}>

hmmm...since this new update(Oct 4), I downloaded and tested a GUI script with many TreeViewItems(generally, hiding and showing controls)

I'm seeing a 'strange regeneration' when I switch between items... :s

Posted

PushButton Icons work with checkbox controls :) but not radio buttons yet ;)

Anyway, here is a http://www.autoitscript.com/fileman/users/public/CyberSlug/autopad5pre-preview.zip.  The idea would be to combine it with the previous GUI sample....

<{POST_SNAPBACK}>

what should I win?

I am not sure to know what is the expected result. :)

Posted

Here's an updated image... Let me know if you don't like the order or any of the icons. By the way, I'm not using anything advanced to generate http://www.autoitscript.com/fileman/users/public/CyberSlug/iconset.icl... just AutoIt, mspaint, IrfanView, @iconSushi

http://www.autoitscript.com/fileman/users/public/CyberSlug/controlselector_oct8.png

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted (edited)

Try http://www.autoitscript.com/fileman/users/public/CyberSlug/prototypeoct10.zip! :)

Difficulties I've run into:

- I want the toolbar GUI to be a child of the main form GUI; but in order for controls to be created on the main window, I have to create the toolbar first and the main second :) Right now I've just made both windows normal (so they both have taskbar entries)

- In order to create a resizable window with no minimum size, height must be greater than the titlebar height.... Moreover, the window must be resized AFTER I call GuiSetState(@SW_SHOW). If the height is too small, no window appears even though a window handle is returned and @error is fine.... If I WinMove before calling GuiSetState, the window lacks resizability....

- BitOr(BS_PUSHLIKE, BS_ICON) does not work with radio buttons. It was recently fixed to work with checkboxes, but radios need this too.

- small GuiCtrlSetPos bug

Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

Try http://www.autoitscript.com/fileman/users/public/CyberSlug/prototypeoct10.zip! :)

Difficulties I've run into:

- I want the toolbar GUI to be a child of the main form GUI; but in order for controls to be created on the main window, I have to create the toolbar first and the main second :)  Right now I've just made both windows normal (so they both have taskbar entries)

- In order to create a resizable window with no minimum size, height must be greater than the titlebar height.... Moreover, the window must be resized AFTER I call GuiSetState(@SW_SHOW).  If the height is too small, no window appears even though a window handle is returned and @error is fine....  If I WinMove before calling GuiSetState, the window lacks resizability....

- BitOr(BS_PUSHLIKE, BS_ICON) does not work with radio buttons.  It was recently fixed to work with checkboxes, but radios need this too.

- small GuiCtrlSetPos bug

<{POST_SNAPBACK}>

pretty nice, if the cursor when not moving caan be other than the cross and just became a cross after the click on the object when the move will be done it will be perfect. ;)

just some question about your remarks

I don't understand how the radio control can have an icon with the current code.

I did the extension and I get the same result as for checkbox so not very useful just use checkbox instead of radiobox. Can you give me a script example and what you expect as result? Thanks.

  • Administrators
Posted

Try http://www.autoitscript.com/fileman/users/public/CyberSlug/prototypeoct10.zip! :)

Difficulties I've run into:

- I want the toolbar GUI to be a child of the main form GUI; but in order for controls to be created on the main window, I have to create the toolbar first and the main second :)  Right now I've just made both windows normal (so they both have taskbar entries)

Create your first window and leave it hidden - make the toolbar a child of this hidden window. Then create the main window as normal. This will give you the toolbar window with no taskbar entry and not reliant on the designer window.

- In order to create a resizable window with no minimum size, height must be greater than the titlebar height.... Moreover, the window must be resized AFTER I call GuiSetState(@SW_SHOW).  If the height is too small, no window appears even though a window handle is returned and @error is fine....  If I WinMove before calling GuiSetState, the window lacks resizability....

Think I'll need a short example to decipher that. ;)
Posted (edited)

@jpm: I hope the code helps clarify. The bottom group of radio buttons should have images like the checkboxes, but they do not...

Global $BS_PUSHLIKE = 0x1000, $BS_ICON = 0x40
GuiCreate("Example")

; Top group of checkboxes
For $i = 1 to 3
   GuiCtrlCreateCheckbox("", $i*50, 10, 50, 50, BitOr($BS_PUSHLIKE, $BS_ICON))
   GUICtrlSetImage(-1, "shell32.dll", $i)
Next

; Bottom group of radio buttons
For $i = 1 to 3
   GuiCtrlCreateRadio("", $i*50, 100, 50, 50, BitOr($BS_PUSHLIKE, $BS_ICON))
   GUICtrlSetImage(-1, "shell32.dll", $i)
Next

GuiSetState()
While GuiGetMsg() <> -3
WEnd
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

@Jon: I'll try to post an example regarding window titlebar height.... Thanks for the info on the parent/child windows.

@Jon: Could we have a function that returns the ID# of the control currently under the mouse? You said you wrote something similar to support custom control cursors.... In case of overlapping controls (such as a checkbox inside a frame or tab) I'd probably want the "topmost" control...

@LazyCat: Are you using the current AutoIt version? What version of windows? :)

@this-is-me and others: I'm planning to offer the same features as the original AutoBuilder soon.... Any particular features you want? Suggestions as welcome regarding how to save GUI data and what the generated AutoIt code should look like.

@jpm and others: I need to work on moving controls. I'll change the mouse cursor... and I also need to make sure that edit/list/combo controls can be moved as easily as buttons and pics.... I might have to use some workaround from the original AutoBuilder...

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

From the helpfile:

GUIGetMsg ( [advanced])

1 = returns an array containing the event and extended information.

$array[2] = The control handle the event is from (if applicable)

Is that what you wanted for the "control under mouse"?

One thing I really want to see is the autobuilder completely be able to open and edit scripts that were not created by autobuilder. Therefore, there would be no need to save the gui code in any way other than the normal autoit form. That should be easier now that there are separate commands for each gui control and editing them.

Who else would I be?
Posted

GuiGetMsg would only return a control ID if the control is clicked.... I need the control when I simply move the mouse over it

One thing I really want to see is the autobuilder completely be able to open and edit scripts that were not created by autobuilder. Therefore, there would be no need to save the gui code in any way other than the normal autoit form.

This is impossible in the most general case. Consider the following AutoIt code. What if you replaced "$N = 21" in the following code with an InputBox?
Global $N = 21
$toolbar = GuiCreate("Choose Control Type", 150, 350, 10, @DesktopHeight/2-175, 0x00C00000);;;, -1, $main)
$tip = StringSplit("Cursor|Tab|Group|Button|Checkbox|Radio|Edit|Input|label|UpDown|List|Combo|Date|Treeview|Progress

|Avi|Icon|Pic|Menu|ContextMenu|", "|")
For $row = 0 to 6
   For $col = 0 to 2
      GUICtrlCreateButton($tip[3*$row + $col + 1], $col*50, $row*50, 50, 50)
   Next
Next

GuiSetState()
While GuiGetMsg() <> -3
WEnd

The best I can do is to create a well-defined file format for storing GUI information like the previous version of AutoBuilder. This would allow someone to write a program to convert arbitrary AutoIt scripts to my GUI data file format....

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted (edited)

Think I'll need a short example to decipher that. :)

<{POST_SNAPBACK}>

I guess my main question is why would calling WinMove before GuiSetState make any difference? But don't worry about this.... I'm much more interested in a function that returns the ID# of the control currently under the mouse? :)

I think part of the problem was the window style I was using....

BitOr($WS_POPUP, $WS_CAPTION, $WS_SYSMENU, $WS_MINIMIZEBOX, $WS_THICKFRAME) == 0x94CE0000 seems to work in all cases but 0x04CF000 has problems as shown below:

1) Try code as-is. [Window is resizable but has a minimum size?]

2) Swap the order of GuiSetState and WinMove [Window never appears]

3) Keeping the lines swapped, increase the value of $titlebar to 40 [Window is fine]

Opt("WinTitleMatchMode", 4);advanced
$titlebar = 10
$main = GuiCreate("foo", 1,1+$titlebar, 290, (@DesktopHeight-300)/2, 0x04CF000)
WinMove("handle=" & $main,"", 100, 100, 100, 100)
GuiSetState(@SW_SHOW)
While GuiGetMsg() <> -3
WEnd
Exit
Edited by CyberSlug
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Posted

CS, some functions (messages) don't seem to work on a GUI until after ShowWindow() has been called internally. See if calling GuiSetState(@SW_HIDE) helps with the WinMove() thing. You can then call it again, later with @SW_SHOW or whatever. It might work.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...