jpm Posted March 13, 2004 Share Posted March 13, 2004 I am glad that with the help of a lot of you we reach a point that we can say the functions to manage the GUI directly inside AutoIt is ready for testing.Now is time to see if it fit in your script (AU3GUI like) before final inclusion in a release of AutoIt3.You can download from http://www.hiddensoft.com/fileman/users/jpm/AutoIt3-gui(actual version is 101.4)Have a nice testing just report by this thread.as a reminder the functions are:GUICoordMode (option)GUICreate ( "title", width, height, [left, top [,style [,exStyle]]] )GUICreateEx ( helpfile [,background [,iconfile]] )GUISetControl ( type, "text", left, top [,width [,height [,style [,exStyle]]] )GUISetControlCurFont (size [,weight [,fontname [,attribute]]])GUISetControlData ( data [,default] )GUISetControlEx ( state [,tip [,ext]] )GUISetControlNotify ( [action [,controlref]] ) GUIWaitClose ( [timeout] ) GUIShow ( ) GUIisChanged ( [timeout] ) GUIRead ( [controlref] )GUIWrite ( controlref ,state [,info] ) GUIHide ( ) GUIDelete ( ) Link to comment Share on other sites More sharing options...
Lazycat Posted March 13, 2004 Share Posted March 13, 2004 (edited) Wow! After short checking I mean this is exactly I wanted! Thanks again for excellent work! So here another mad idea If this is not very hard or size consuming, how about add similarity to GUIRead and GUIWrite functions? Now GUIWrite can set state of controls, for some controls - Input, Edit and Button - can set text for it. So for Combo and List will be logically to set active item (maybe given date for Date too), like GUIRead get them. So "info" in the GUIWrite will be mean: Combo, List sets the selection to given value Date sets the given date Of course, we know this is possible with ControlCommand function, but in this case it will not be linked to the control reference! Edited March 13, 2004 by Kot Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
Guest kotschi Posted March 13, 2004 Share Posted March 13, 2004 (edited) @jpm: Thanks So I reinserted my lines to the new code and a progressbar looks like this:..sh...doesn't work at geocities.com... Ok, try it with the zip-file at the end...The skript could be look so:expandcollapse popup$PBS_SMOOTH = 1 $PBS_VERTICAL = 4 GUICreate("Progressbar",220,100) $progressbar1 = GUISetControl("progress","clrbar=32250|clrbk=0",10,10,200,20) $progressbar2 = GUISetControl("progress","",10,40,200,20,$PBS_SMOOTH) ; other sample $progressbar = GUISetControl("progress","clrbar=8192|clrbk=0",10,10,200,20,$PBS_SMOOTH) $button = GUISetControl("button","Start",75,70,70,20) GUISetControlNotify(2) GUIShow() $wait = 20; wait 20ms for next progressstep $s = 0; progressbar-saveposition $n = 0 While $n = 0 $n = GUIisChanged(0) If $n > 0 And $n = $button Then GUIWrite($button,0,"Stop") For $i = $s To 100 If GUIRead($progressbar1) = 50 Then Msgbox(0,"Info","The half is done...") $m = GUIisChanged(0) If $m = -3 Then ExitLoop Else If $m > 0 And $m = $button Then GUIWrite($button,0,"Next") $s = $i;save the current bar-position to $s $n = 0 ExitLoop Else GuiWrite($progressbar1,0,"perc=" & $i) GuiWrite($progressbar2,0,"perc=" & (100 - $i)) Sleep($wait) EndIf EndIf Next Else If $n = -3 Then ExitLoop EndIf Sleep(1) WEndI think it is possible to optimize the script...I try it...Thanks again HolgerP.S.:a sample-exe could be found here:Sample-ZipMaybe a downloadmanager doesn't function.You know its my first time to write something in c++ Edited March 13, 2004 by kotschi Link to comment Share on other sites More sharing options...
alawoona Posted March 13, 2004 Share Posted March 13, 2004 Very nice jpm and all who helped make autoit-gui. Writing my first gui with it, noticed I am getting a "0" return from GUIWaitClose() if I click a Close button in the gui and also from the X button on the window. The latter should give me a -3 return? Link to comment Share on other sites More sharing options...
Lazycat Posted March 13, 2004 Share Posted March 13, 2004 P.S.:a sample-exe could be found here:Sample-ZipVery nice addition, and I think it easy to found use for it I would be like if this will be implemented officially. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
jpm Posted March 13, 2004 Author Share Posted March 13, 2004 Wow! After short checking I mean this is exactly I wanted! Thanks again for excellent work! So here another mad idea  If this is not very hard or size consuming, how about add similarity to GUIRead and GUIWrite functions? Now GUIWrite can set state of controls, for some controls - Input, Edit and Button - can set text for it. So for Combo and List will be logically to set active item (maybe given date for Date too), like GUIRead get them. So "info" in the GUIWrite will be mean:Combo, List sets the selection to given valueDate  sets the given dateOf course, we know this is possible with ControlCommand function, but in this case it will not be linked to the control reference!Thanks,I leave the answer to Larry, because I try to do exactly the same as AU3GUI does.So If the combo or list or date can be set with AU3GUI it should work with AutoIt3-gui.Pehaps I don't understand the remarks just be more precise with an example how it should workBe on touch Link to comment Share on other sites More sharing options...
jpm Posted March 13, 2004 Author Share Posted March 13, 2004 (edited) Very nice jpm and all who helped make autoit-gui.Writing my first gui with it, noticed I am getting a "0" return from GUIWaitClose() if I click a Close button in the gui and also from the X button on the window. The latter should give me a -3 return?I am not sure with GUIWaitClose but it does with GuiIsChanged.EDIT I made a doc error GUIWaitClose does not return -3 but 0 on close with red button. I will update the docI try to have GUIWaitClose the simpler so less return code. Edited March 13, 2004 by jpm Link to comment Share on other sites More sharing options...
jpm Posted March 13, 2004 Author Share Posted March 13, 2004 Very nice addition, and I think it easy to found use for it I would be like if this will be implemented officially.I cannot download from geocitie your stuff.How can I do it? Link to comment Share on other sites More sharing options...
Lazycat Posted March 13, 2004 Share Posted March 13, 2004 I cannot download from geocitie your stuff.How can I do it?It's not mine, it posted by kotschi. Try to disable download managers, seems this site requires referer to itself. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
Guest kotschi Posted March 14, 2004 Share Posted March 14, 2004 (edited) @jpm/larry/kot: I 'upload'ed the changed files to:guibox-changed-filesI marked (hopefully) all edited lines with // ... Holger...Search for 'holger' then you find them....Thanks.Ok, see/read you all next week, cause I'm ill since today Edited March 14, 2004 by kotschi Link to comment Share on other sites More sharing options...
Nutster Posted March 14, 2004 Share Posted March 14, 2004 I am impressed. And the executable is still less than 100 K (83.5K) David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... Link to comment Share on other sites More sharing options...
jpm Posted March 14, 2004 Author Share Posted March 14, 2004 @jpm/larry/kot: I 'upload'ed the changed files to:guibox-changed-filesI marked (hopefully) all edited lines with // ... Holger...Search for 'holger' then you find them....Thanks.Ok, see/read you all next week, cause I'm ill since today still no success to access geocities I send you a post an email so you can email them to me directly just the updateThanks Link to comment Share on other sites More sharing options...
jpm Posted March 14, 2004 Author Share Posted March 14, 2004 I am impressed. And the executable is still less than 100 K (83.5K) Thanks David,Perhaps you don't know but you were part of the game the inputbox calss was my starter. The Increment for debug was the same size (dbg-bastard) we will see what yoi reach (I know It will be a special link ...) Link to comment Share on other sites More sharing options...
Nutster Posted March 14, 2004 Share Posted March 14, 2004 Thanks David,Perhaps you don't know but you were part of the game the inputbox calss was my starter. The Increment for debug was the same size (dbg-bastard) we will see what yoi reach (I know It will be a special link ...) You are welcome. That was a bit of work. So you took what I did there and then expanded to the general case with all the function calls. All I had to work with when I did that was Jon's old V2 InputBox and a version I wrote with MFC. Then I had to write my own callback function to manage the windows messages and take out all references to the MFC. I'm still trying to figure out how to intercept the keypresses in the edit box. That way I can automatically capitalize or lower-case or whatever. Yeah, but this debug will do a whole lot more than dbg-bastard did. David NuttallNuttall Computer Consulting An Aquarius born during the Age of Aquarius AutoIt allows me to re-invent the wheel so much faster. I'm off to write a wizard, a wonderful wizard of odd... Link to comment Share on other sites More sharing options...
Lazycat Posted March 16, 2004 Share Posted March 16, 2004 I palying couple days with the new GUI and I'm impressed! But one thing in the GUI remain unclear for me I've seen GUIWriteList.au3 example, but in this one you can change combo/list data only if this directly after control initialization. This is possible to set current list/combo selection (or change its data) using control ref number (without using controlcommand to avoid linking to window title/control class)? Maybe it possible to add such feature, for example in the GUIWrite function?GUIWrite(controlref, state [, info])where "info" - string which must be selected, or maybe line number, or maybe data as in the GUISetControlData - any of this will be good. Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
jpm Posted March 16, 2004 Author Share Posted March 16, 2004 I palying couple days with the new GUI and I'm impressed! But one thing in the GUI remain unclear for me  I've seen GUIWriteList.au3 example, but in this one you can change combo/list data only if this directly after control initialization. This is possible to set current list/combo selection (or change its data) using control ref number (without using controlcommand to avoid linking to window title/control class)? Maybe it possible to add such feature, for example in the GUIWrite function? GUIWrite(controlref, state [, info]) where "info" - string which must be selected, or maybe line number, or maybe data as in the GUISetControlData - any of this will be good.I did some improvement in 101.5 release. After getting a message by GUIMsg you can set info to the clicked control with GUISetControlData or GUISetControlEx see 101.5 doc and tell me if that fit with your script. Link to comment Share on other sites More sharing options...
Lazycat Posted March 16, 2004 Share Posted March 16, 2004 (edited) I hope this will be enough for me But it seems not for all - just read discussion in other thread Edit: hmm... new build already out. But I still can't find way to set data/selection into concrete control... It seems Valik is right - it's need to add controlref into GuiSetControlData... Or i can't found something? Edited March 16, 2004 by Kot Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
evod510 Posted March 17, 2004 Share Posted March 17, 2004 how to setup the gui so that i can use it, the gui did not come with the original autoit3 setup files do i need to register it thanks Link to comment Share on other sites More sharing options...
jpm Posted March 17, 2004 Author Share Posted March 17, 2004 how to setup the gui so that i can use it,the gui did not come with the original autoit3 setup filesdo i need to register itthanksNo need to register, just run the autoit3-gui.exe giving or script as a parameter.Or rename temparory the AutoIt3.exe standard install and copy AutoIt3-gui.exe as Autoit3.exe same place.good testing Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now