Jump to content

Autoit-gui 102.13 Available


jpm
 Share

Recommended Posts

  • Replies 48
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Here's the change log:

30th March, 2004 - v3.0.102.13 (unstable)

Fixed : Resizing of control with default size.

Fixed : Resizing of CreateGUI with 0,0,0,0.

Added : GuiWrite can update Style and ExStyle.

By the way, WingDings can now be used as a font :whistle: Thanks

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Is there any way to obtain from this EDIT control(with multiline enabled), the

complete text? (with @CRLFs). e.g. When is a multiline edit...for example...

#include "Au3GUI_lib.au3"
GUI()

Func GUI()
   $title = "My Au3GUI test"
   Au3GUIForm(1, 100, 200, 400, 300, $title, -1, -1)
   Au3GUIFormHelpCmd("notepad")
   Au3GUIFormColor(0x00E0FFFF)

   $lang = Au3GUIControl("combo", "+", 5, 5, 80, 100, "", "", 0)
  ; Data accepts either "|" separated string or array
   Au3GUIData("Python|C++|Delphi|AutoIt|Java", "AutoIt")
   Au3GUITooltip("A programming language")
   
   $member = Au3GUIControl("combo", "+", 0, 30, -1, -1, "", "", 0)
   Au3GUIData("Trids|CyberSlug|Larry|Jon|Tylo", "Jon"); default Jon
   Au3GUITooltip("An AutoIt member")
   
   $chk1True = 0
   $chk1 = Au3GUIControl("checkbox", "+", 0, 30, -1, 20, "Hello", -1, $chk1True)
  ; "+" means relative positioning
   $chk2 = Au3GUIControl("checkbox", "+", 0, 30, -1, 20, "Goodbye", -1, 0)
   Au3GUIDisable(Not $chk1True, 0); Disable, but not hide (second param)
   
   Au3GUIRunBehave($chk1, "unchecked.disable1", $chk2); 
   Au3GUIRunBehave($chk1, "unchecked.disable2", $lang); 
   Au3GUIRunBehave($chk1, "checked.enable1", $chk2); 
   Au3GUIRunBehave($chk1, "checked.enable2", $lang); 
   
   Au3GUIControl("button", "+",  0, 30, -1, 20, "Apply", -1, 0)
   Au3GUIRunAction("submit")
   
   Au3GUIControl("button", "+",  0, 30, -1, 20, "Done", -1, 0)
   Au3GUIRunAction("close")
   Au3GUIRunAction("submit")
   
;; MY MULTILINE-EDIT
   $edit1= Au3GUIControl("edit", "-", 100, 5, 168, 75, "-msg-", "", 0x50B100C4)
   Run("Au3GUI")
   WinWait($title)
   
   While (WinExists($title))
      Do
  Sleep(300)
      Until Au3GUIFormChange()
      If (@error = 0) Then
         $res = ""
  $res = $res & Au3GUIRead($lang, "") & @LF
  $res = $res & Au3GUIRead($member, "") & @LF
  $res = $res & Au3GUIReadState($chk1) & @LF
  $res = $res & Au3GUIReadState($chk2) & @LF
  $res = $res & Au3GUIRead($edit1, "") & @LF
  MsgBox(0, "Result", $res)
      EndIf
      
   Wend
   Au3GUIClear()
EndFunc

Posted Image

Link to comment
Share on other sites

Is there any way to obtain from this EDIT control(with multiline enabled), the

complete text? (with @CRLFs). e.g. When is a multiline edit...for example...

josbe, add the following to the very beginning of your script:
HotKeySet("{Esc}", "DisplayText")
Func DisplayText()
   $text = ControlGetText ("My Au3GUI","", "Edit3")
   MsgBox(4096,"Edit contains:",$text)
EndFunc

GUIRead($edit1) might also work if you declare Global $edit 1

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

@jpm: I am having problems with the GUIWrite.

The help file says GUIWrite ( controlref ,state [,info [,style [,exStyle]]] )

BUT I get the message Error: Incorrect number of parameters in function call. when I try to use more than three parameters.

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

@jpm:  I am having problems with the GUIWrite.

The help file says GUIWrite ( controlref ,state [,info [,style [,exStyle]]] )

BUT I get the message Error: Incorrect number of parameters in function call. when I try to use more than three parameters.

I know that 13 was a bad number. I miss to update the max number of parameter. I reupload 102.14

Sorry for the trouble

Link to comment
Share on other sites

Thanks for the fast fix. Now I have other problems......

I want to toggle word-wrap on an edit control. I've tried two ways:

1) Create two edit controls; one with style 0x50200104, the other 0x50300104 and toggle their visibility. This works, but too complicated...

2) Create one edit control; toggle its style using GUIWrite. I cannot get this to work. It seems the control is not refreshing correctly. In fact, I need to use ControlDisable and ControlEnable to re-draw the control...

Global $title = "works but UGLY"
Global $text = "Here's a medium-length sentence to test wrapping of words."
Global $wrapping = 1  ;1 = disabled, 2 = enabled...

Opt("GuiNotifyMode",1)
GUICreate($title, 200, 200, 100, 100)
WinActivate($title)

Global $txt1 = GUISetControl("edit", $text, 0, 30 ,190 ,160, 0x50300104)
Global $txt2 = GUISetControl("edit", "",    0, 30 ,190 ,160, 0x50200104)
Global $wrap = GUISetControl("checkbox", "Word wrap", 5,5, 400,20)
ControlCommand($title,"", "Word wrap", "Check","" )

GUISetControlFont($txt1, 10, 400, "Courier New")
GUISetControlFont($txt2, 10, 400, "Courier New")

GUIShow()
while 1 ;loop until user clicks the close button
   sleep(100)
   If GuiMsg(0) = -3 Then ExitLoop
   $w = 1 + ControlCommand ($title,"", "Word wrap", "IsChecked", "")
   If $w <> $wrapping Then
      $bak = GUIRead( Eval("txt" & $wrapping) )
      ControlSetText ($title,"", "Edit"&$w, $bak)
      ControlShow ($title,"", "Edit"&$w )
      ControlHide ($title,"", "Edit"&$wrapping )
      $wrapping = $w
   EndIf
Wend
Exit

Global $title = "will NOT work"
Global $text = "Here's a medium-length sentence to test wrapping of words."
Global $wrapping = 2  ;1 = disabled, 2 = enabled

Opt("GuiNotifyMode",1)
GUICreate($title, 200, 200, 100, 100)
WinActivate($title)

Global $txt = GUISetControl("edit", $text, 0, 30 ,190 ,160, 0x50300104, 0x00000200)
Global $wrap = GUISetControl("checkbox", "Word wrap", 5,5, 400,20)
GUISetControlFont($txt, 10, 400, "Courier New")

GUIShow()
while 1 ;loop until user clicks the close button
   sleep(100)
   If GuiMsg(0) = -3 Then ExitLoop
   $w = 1 + ControlCommand ($title,"", "Word wrap", "IsChecked", "")
   If $w <> $wrapping Then
      $bak = ControlGetText($title,"", "Edit1")
      If $w <> 2 Then
         GUIWrite($txt, 256, $bak, 0x50200104, 0x00000200)
      Else
         GUIWrite($txt, 256, $bak, 0x50300104, 0x00000200)
      EndIf
     ; WORKAROUND to REFRESH VIEW --------->
      ControlDisable($title, "", "Edit1" )
      ControlEnable($title, "", "Edit1" )
      $wrapping = $w
   EndIf
Wend
Exit

Any ideas are appreciated :whistle:

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Is there any way to obtain from this EDIT control(with multiline enabled), the

complete text? (with @CRLFs). e.g. When is a multiline edit...for example...

I have some trouble to use the AU3GUI example. :whistle:

I want to see What happens with AU3GUI and see if it does the same with AutoIt-GUI

Thanks for the help.

Edited by jpm
Link to comment
Share on other sites

Thanks for the fast fix.  Now I have other problems......

I want to toggle word-wrap on an edit control.  I've tried two ways:

Any ideas are appreciated :whistle:

I didn't do anything for refresh so for the time being use the work around.

Why you need to use ControlCommand and ControlGetText inside the loop?

is Guiread not retrieveing the right information?

Link to comment
Share on other sites

Is #include working for you guys?  when i tried to #include the Gui_include.au3 it didn't include any of the file.

red

I assume you copy the file from the .zip in the right place.

What is not working?

Link to comment
Share on other sites

Why you need to use ControlCommand and ControlGetText inside the loop?

is Guiread not retrieveing the right information?

GUIRead seems to work fine. I was adapting scripts that used ControlGetText.

Is #include working for you guys? when i tried to #include the Gui_include.au3 it didn't include any of the file.

Thanks for bringing this up. I've also had problems with #include... The provided GUIinputbox.au3 example crashes on me. :whistle:
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

GUIRead seems to work fine.  I was adapting scripts that used ControlGetText.

Thanks for bringing this up. I've also had problems with #include... The provided GUIinputbox.au3 example crashes on me. :whistle:I need to apologize The include file in the .zip is the one before $WS_EX_ACCEPTFILES which has to be equal to 16 Edited by jpm
Link to comment
Share on other sites

JP, you may need to create a GUIRefreshControl([controlref]) function to allow the user to cause a control to be re-painted...

@Valik,

I was planning to have GuiWrite doing a refresh when updating style.

Do you see any situation it would be bettre to add this new function?

Link to comment
Share on other sites

I'm new to using Autoit-gui, so please bear with me.

I noticed that some of the example files used functions mostly starting with GUI ( like GUICreate, and these are in the help file). In other examples, and in some of the codes posted in this thread, many of the function start with Au3 (like Au3GUIForm).

Is this a shift to a new way of doing things, so I would be wasting my time getting to know the old way (which is the old way?)? And are these Au3 prefixed functions explained anywhere?

Thanks,

Ed

Link to comment
Share on other sites

I'm new to using Autoit-gui, so please bear with me.

I noticed that some of the example files used functions mostly starting with GUI ( like GUICreate, and these are in the help file).  In other examples, and in some of the codes posted in this thread, many of the function start with Au3 (like Au3GUIForm).

Is this a shift to a new way of doing things, so I would be wasting my time getting to know the old way (which is the old way?)?  And are these Au3 prefixed functions explained anywhere?

Thanks,

Ed

Hi etn,

if your new just forget AU3... they are there for comparison with the first GUI done by Larry.

Now you can use the new function inside an AutoIt script. Just read the doc AutoIt-gui.chm , use the Gui... examples.

We still at a beta testing. I hope pretty soon we will have an integrated version.

Good beta testing.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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