Sign in to follow this  
Followers 0
prazetto

Graphical AutoIt3 Control (UDF)

11 posts in this topic

#1 ·  Posted (edited)

UDF provide graphical control based on static class.

Button
Progressbar

v1.01. Fix on Syntax Error Checking

Download

Choose server where you will download:

fxControl.zip - code.google.com (renamed from zettoControl_v1.02.zip)

fxControl.zip - autoitscript.com

The next version of this UDF will named as fxControl (Control Framework).


Screenshot

post-60356-0-09092200-1355553892_thumb.p
post-60356-0-02072900-1355553901_thumb.p
post-60356-0-78441500-1355553922_thumb.p

Sample

Application using zettoControl

Z-Compressor [link fixed]

Clean PC

Clean PC Source available in spoiler below 'Codice Sorgente' text,

in that page. but download link: dead. Its still useful because at

least the source are here while you able replace image file with

what you have.

cleandw.jpg

zettoControl_v1.02.zip

Edited by prazetto

# Button. Progressbar - Graphical AutoIt3 Control (UDF) # GTK on AutoIt3 - GTK+ Framework | Widgets

Share this post


Link to post
Share on other sites



i wanted to try your examples but...

C:UsersadminDesktopzettoControl_v1.00zettoControl.au3(1713,100) : ERROR: _zettoscript_GetValueEx() called with Const or expression on ByRef-param(s).

$value = _zettoscript_GetValueEx(StringTrimLeft($button[$loop],StringInStr($button[$loop],':')))

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\zettoScript.au3(364,43) : REF: definition of _zettoscript_GetValueEx().

Func _zettoscript_GetValueEx(ByRef $param)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersadminDesktopzettoControl_v1.00zettoControl.au3(1943,102) : ERROR: _zettoscript_GetValueEx() called with Const or expression on ByRef-param(s).

$value = _zettoscript_GetValueEx(StringTrimLeft($caption[$loop],StringInStr($caption[$loop],':')))

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\zettoScript.au3(364,43) : REF: definition of _zettoscript_GetValueEx().

Func _zettoscript_GetValueEx(ByRef $param)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersadminDesktopzettoControl_v1.00zettoControl.au3(1976,98) : ERROR: _zettoscript_GetValueEx() called with Const or expression on ByRef-param(s).

$value = _zettoscript_GetValueEx(StringTrimLeft($color[$loop],StringInStr($color[$loop],':')))

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files (x86)\AutoIt3\Include\zettoScript.au3(364,43) : REF: definition of _zettoscript_GetValueEx().

Func _zettoscript_GetValueEx(ByRef $param)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersadminDesktopzettoControl_v1.00zettoControl.au3(2010,40) : ERROR: _parser_default() previously called with Const or expression on ByRef param(s).

Func _parser_default(ByRef $v,ByRef $n)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersadminDesktopzettoControl_v1.00zettoControl.au3(1992,66) : REF: first call to _parser_default().

_parser_default($skin[$__ZETTO_SKIN_BUTTON_TEXT_FORMAT__],0x0000)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersadminDesktopzettoControl_v1.00zettoControl.au3(2237,37) : ERROR: __zetto_ButtonXWND() previously called with Const or expression on ByRef param(s).

Func __zetto_ButtonXWND(ByRef $xwnd)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersadminDesktopzettoControl_v1.00zettoControl.au3(1449,56) : REF: first call to __zetto_ButtonXWND().

Local $lfoc = __zetto_ButtonXWND(_WinAPI_GetFocus())

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:UsersadminDesktopzettoControl_v1.00ExampleExample.Progressbar.Example2.au3 - 5 error(s), 0 warning(s)

!>09:59:22 AU3Check ended. Press F4 to jump to next error.rc:2

>Exit code: 0 Time: 0.410


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

many errors in your UDF

try placing at the top of your script the following

"#AutoIt3Wrapper_AU3Check_Parameters=-w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7"

and then execute it to see the errors

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

Have tried your updated zettoControl_v1.02 and it works now.

Thanks to share.


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Some Errors I found in your current Version

Example.All.SetState.au3 - Progress never shows up

Example.All.CtrlDelete - Del Btn causes an error for out of bounds of array

Example.Progressbar.Example2 - I dont find any progress in it

Rest the UDF is working now and the graphics are cool :)


My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Share this post


Link to post
Share on other sites

Well, it's great.

Just one thing (Which I have noticed).

You have declared

Global $NULL

Which is a good trick, just want to say, in this mode $NULL is an empty string, you can simple check it with

VarGetType($NULL)

If you want it to be an Int32 0 like the actual NULL in for example C++, it's better to declare it like this:

Global Const $NULL = 0

Or even:

Global Const $NULL = Int(0)

Cheers.

Share this post


Link to post
Share on other sites

Is there anyway to run the embed image in dll or resource?

Share this post


Link to post
Share on other sites

Thanks.

I'm still unsure what you mean with enigmaprotector had to do with the question, though?

Share this post


Link to post
Share on other sites

Clean PC Source available in spoiler below 'Codice Sorgente' text,

in that page. but download link: dead. Its still useful because at

least the source are here while you able replace image file with

what you have.


# Button. Progressbar - Graphical AutoIt3 Control (UDF) # GTK on AutoIt3 - GTK+ Framework | Widgets

Share this post


Link to post
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
Sign in to follow this  
Followers 0

  • Similar Content

    • Skysnake
      By Skysnake
      Scite comes up occasional, almost incidentally, in some support topics.  I have not found a "Scite" topic in the forums, so this is where I will start.  I have recently been using Scite intensively, specifically with a large project and I have certain issues.  I know that Scite is not an AutoIt product, but it is so closely integrated to the core release that it makes sense to raise issues and request support here.  If this is not the right please refer me to the right forum.
      Thx
       
      Skysnake
    • BrewManNH
      By BrewManNH
      I have created a UDF that will allow you to easily create a customizable GUI with either a standard progress bar or a marquee style progress bar. You can change the size and back ground color of the GUI, as well as the font, font size, and color of the text. The function doesn't require any parameters to operate, but the default text is very generic so you probably would want to set that at the very least.
    • IAMK
      By IAMK
      Hello,
       
      I have a script which uses a GUI with two buttons. It gets shown and hidden., and pressing the buttons (including their hotkeys) highlights the button, making you able to press enter the next time.
      However, I don't want that.
       
      I've tried using WinActivate() to make enter do things on another program, but the enter is still tied to the AutoIT GUI (which still has the button highlighted).
       
      Here's the important part of my code:
      $MY_GUI = GUICreate("Check.exe", 400, 300, ((@DesktopWidth / 2) - 200), -500) WinSetOnTop($MY_GUI, "", 1) ;Keeps the window on the top. $Button1 = GUICtrlCreateButton("Pass (Ctrl+P)", 40, 250, 120, 40, $WS_GROUP) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $Button2 = GUICtrlCreateButton("Fail (Ctrl+F)", 240, 250, 120, 40, $WS_GROUP) GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif") $GUIText = GUICtrlCreateLabel("", 20, 10, 360, 230) GUICtrlSetFont(-1, 13, 400, 0, "MS Sans Serif") GUICtrlSetData($GUIText, Execute($stepMessage[$step])) $showGUI = "True" GUISetState(@SW_SHOW) While($showGUI = "True") $buttonPressed = GUIGetMsg() Switch $buttonPressed Case $Button1 ;Pass $pass = "True" $buttonPressed = 0 $showGUI = "False" GUISetState(@SW_HIDE) Case $Button2 ;Fail $buttonPressed = 0 $showGUI = "False" GUISetState(@SW_HIDE) While($message = "") $message = InputBox("Check.exe", "Please enter the reason the step failed." & @CRLF, "", "", 300, 200, ((@DesktopWidth / 2) - 150), -400) WEnd Return $message EndSwitch WEnd Local $pass = "False" ;Whether "Pass" or "Fail" was pressed. Local $failLog = xxxfunc($pass) ;Returns a message to log if the step failed. ##THIS CALLS THE CODE SNIPPET ABOVE## FileWrite($file, _Now() & ": Step " & $step & getStatus($pass) & "and took " & Ceiling(TimerDiff($timer) / 1000) & " seconds." & @CRLF) If($failLog <> "") Then FileWrite($file, "Logged comment: " & $failLog & @CRLF) EndIf WinActivate("[TITLE:ProgramName]") ;Hotkeys: HotKeySet("^{p}", "pressPass") HotKeySet("^{f}", "pressFail") Func pressPass() $buttonPressed = $Button1 EndFunc Func pressFail() $buttonPressed = $Button2 EndFunc  
      The GUI's button/hotkey pressing works correctly.
      The same WinActivate code works in another script of mine.
      Together, WinActivate is not take "Active" away from the GUI's last-pressed button. How do I fix this?
       
      Thank you in advance.
    • P3rsp3ctiv3
      By P3rsp3ctiv3
      Hello how can I send a {Enter} into the edit window ($cmd)? I tried it first with:
      GUICtrlSetData($cmd, "Line 1" + "{ENTER}")
      but it doesn´t work. Can someone help me please?
      #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> $Admin = GUICreate("Admin", 234, 168, 192, 229, $GUI_SS_DEFAULT_GUI, BitOR($WS_EX_OVERLAPPEDWINDOW,$WS_EX_TRANSPARENT,$WS_EX_WINDOWEDGE)) GUISetBkColor(0xB4B4B4) $exit = GUICtrlCreateButton("Close", 160, 136, 65, 25) $cmd = GUICtrlCreateEdit("",0, 0, 225, 137, $ES_AUTOVSCROLL + $WS_VSCROLL) GUICtrlSetData(-1, "") GUICtrlSetFont(-1, 10, 400, 0, "Candara") GUICtrlSetBkColor(-1, 0xE3E3E3) $cmd_clear = GUICtrlCreateButton("Clear", 9, 136, 65, 25) GUISetState(@SW_SHOW) HotKeySet("{f1}", CMD_1) HotKeySet("{f2}", CMD_2) While 1 $msg = GUIGetMsg(1) Switch $msg[0] Case $GUI_EVENT_CLOSE Exit Case $exit GUIDelete($Admin) Exit EndSwitch WEnd Func CMD_1(); GUICtrlSetData($cmd, "Line 1" & "{ENTER}") GUICtrlSetData($cmd, "Line 2" & "{ENTER}") EndFunc Func CMD_2(); GUICtrlSetData($cmd, "Line 3" & "{ENTER}") GUICtrlSetData($cmd, "Line 4" & "{ENTER}") EndFunc
    • nacerbaaziz
      By nacerbaaziz
      hello
      please i need to link a progress bar with a time can you help me?
      e.g
      i want to set a progress bar for 10 sec
      am waiting for your answers
      thank you.