gcriaco Posted February 6, 2005 Share Posted February 6, 2005 (edited) CodeWizard is a code generator.It generates code according to the user choices for the following functions:Message BoxInput BoxToolTipSplashTextSplashImageGUISetBkColorGUICtrlSetColorGUICtrlSetBkColorGUICtrlSetFontGUICtrlSetCursorIt's embedded in the Scite4AutoIt package (Thanks Jos)Version 1.5.2 released - 11/19/2006Changelog:- Changed: update the context help being keyhh.exe no longer installed with autoit- Changed: Indentation of generated code with @Tab (previously 3 blank chars)- Changed: "Dim" => "Local" in generated codeHappy codingPeppeCodeWizard_1.5.2.zip Edited November 20, 2006 by gcriaco Link to comment Share on other sites More sharing options...
BlankMind Posted February 6, 2005 Share Posted February 6, 2005 Man, your MsgBox and InputBox wizard were great, and now you merged them on a single program. Thank you for your program, it gives me a lot of time and make my life easier Link to comment Share on other sites More sharing options...
zcoacoaz Posted February 6, 2005 Share Posted February 6, 2005 good job these are really cool, maybe you could have it somehow tell you what number the message box will return when you press that button too. you could press Preview and when you click a button it tells you what number the box returned, this would make it alot easier (especialy for newbies) [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
CyberSlug Posted February 6, 2005 Share Posted February 6, 2005 Great use of $BS_PUSHLIKE+$BS_ICON checkboxes ....maybe you could have it somehow tell you what number the message box will return when you press that button too. you could press Preview and when you click a button it tells you what number the box returned...<{POST_SNAPBACK}>You can have a secondary AutoIt script display a tooltip when the mouse hovers over a msgBox button. Example implementation attached Modify CodeWizard.au3 around line 293 as follows:Case $msg = $btnPreview ;Preview Button If GUICtrlRead($txtMTitle) = "" Then GuiCtrlSetData($txtMTitle, " ");ShowHelpfulToolTips does not like a null title Run(@AutoItExe & " " & "ShowHelpfulToolTips.au3 " & '"' & GUICtrlRead($txtMTitle) & '"') $returnValue = MsgBox(_SetFlag(), GUICtrlRead($txtMTitle), GUICtrlRead($txtMText), GUICtrlRead($txtMTimeout)) If GUICtrlRead($txtMTitle) = " " Then GuiCtrlSetData($txtMTitle, "");Restore title if it were null ;Let's also report if the MsgBox timed out If $returnValue = -1 Then Tooltip("********************" & @CRLF & " Message box timed out!") sleep(1000) Tooltip('') EndIfTWO OTHER NOTES:1) I think your value for the right-justified attribute is wrong: It should be 524288. This was previously wrong in the help file and has been corrected.2) I think that your three "Miscellaneous" option buttons should really be two checkboxes becuase you might want any combination of top-most and right-justified attributes.ShowHelpfulToolTips.au3 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 More sharing options...
gcriaco Posted February 7, 2005 Author Share Posted February 7, 2005 Unfortunately, it doesn't work on non english OS, because message box buttons texts depend on Windows OS language (i.e. Sì, No instead of Yes, No on my pc). I thought that another solution could be using a SplashTextOn function to display a popup window with an abstract of the MsgBox features.Any other ideas?About the other 2 comments, I fixed code and will release it ASAP.Thanks CyberSlug.Great use of $BS_PUSHLIKE+$BS_ICON checkboxes You can have a secondary AutoIt script display a tooltip when the mouse hovers over a msgBox button. Example implementation attached Modify CodeWizard.au3 around line 293 as follows:Case $msg = $btnPreview ;Preview Button If GUICtrlRead($txtMTitle) = "" Then GuiCtrlSetData($txtMTitle, " ");ShowHelpfulToolTips does not like a null title Run(@AutoItExe & " " & "ShowHelpfulToolTips.au3 " & '"' & GUICtrlRead($txtMTitle) & '"') $returnValue = MsgBox(_SetFlag(), GUICtrlRead($txtMTitle), GUICtrlRead($txtMText), GUICtrlRead($txtMTimeout)) If GUICtrlRead($txtMTitle) = " " Then GuiCtrlSetData($txtMTitle, "");Restore title if it were null ;Let's also report if the MsgBox timed out If $returnValue = -1 Then Tooltip("********************" & @CRLF & " Message box timed out!") sleep(1000) Tooltip('') EndIfTWO OTHER NOTES:1) I think your value for the right-justified attribute is wrong: It should be 524288. This was previously wrong in the help file and has been corrected.2) I think that your three "Miscellaneous" option buttons should really be two checkboxes becuase you might want any combination of top-most and right-justified attributes.<{POST_SNAPBACK}> Link to comment Share on other sites More sharing options...
CyberSlug Posted February 7, 2005 Share Posted February 7, 2005 (edited) Unfortunately, it doesn't work on non english OS, because message box buttons texts depend on Windows OS language (i.e. Sì, No instead of Yes, No on my pc). <{POST_SNAPBACK}>An alternative would be to use "Button1" and "Button2" and "Button3" and based on the msgbox style (passed in as a paramter), you could determine the appropriate tooltip to display.I don't like my two-script approach anyway. If you still wanted to use tooltips, then perhaps it would be better to have the msgBox preview code written to a second script.... Psuedocode with stuff hard-coded:Case $msg = $btnPreview ;Preview Button FileWriteLine(@TempDir & "\msgboxPreview.au3", 'MsgBox(4096,"ExampleTitle","Text")') Run(@AutoItExe & " " & @TempDir & "\msgboxPreview.au3") WinWait("ExampleTitle") While WinExists("ExampleTitle") ;do tooltip processing stuff Wend Edited February 7, 2005 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! Link to comment Share on other sites More sharing options...
gosu Posted February 7, 2005 Share Posted February 7, 2005 Man, this script is just awsome. Hope it gets added to Scite, it makes life much easier. (At least programming life :"> ) [quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
bshoenhair Posted February 7, 2005 Share Posted February 7, 2005 @gcriaco Nice job. How about adding another tab for SplashTextOn ? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 7, 2005 Developers Share Posted February 7, 2005 Man, this script is just awsome.Hope it gets added to Scite, it makes life much easier. (At least programming life :"> )<{POST_SNAPBACK}>Done... will be part of the next installer... SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
zcoacoaz Posted February 7, 2005 Share Posted February 7, 2005 yeah you should add a tab for splash text and images that would make the program soooo cool [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
bshoenhair Posted February 7, 2005 Share Posted February 7, 2005 @gcriaco How about adding another button "Send To SciTE" ? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 7, 2005 Developers Share Posted February 7, 2005 @gcriacoHow about adding another button "Send To SciTE" ?<{POST_SNAPBACK}>The current version has already a /StdOut parameter, so when started from SciTE, the output is pasted at the place where the cursor is located.... SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Chris_1013 Posted February 8, 2005 Share Posted February 8, 2005 Heres a version of a SplashText generator I created a while ago. It uses Au3GuiXp though, but it may give some inspiration, if it's not too much hassle to hack around my environment specific bits it there.SplashText_ER.au3 Link to comment Share on other sites More sharing options...
gcriaco Posted February 8, 2005 Author Share Posted February 8, 2005 CodeWizard 1.1 released. ChangeLog: 1.1 - 8/2/2005 - Fixed: MsgBox right-justified attribute 5244288 => 524288 - Changed: "Miscellaneous" radio buttons => checkboxes (any combination of top-most/right-justified attributes are possible now) - Added: Resource Info (version, description,...) in the exe file - Added: #Region....#EndRegion around the generated code lines About the SplashTextOn function and the MsgBox Preview button tooltips: maybe i'll implement these features in the future. At the moment, I have to translate in italian the helpfile . Thanks guys for suggestions Peppe Link to comment Share on other sites More sharing options...
gosu Posted February 8, 2005 Share Posted February 8, 2005 Done... will be part of the next installer... <{POST_SNAPBACK}>Great! When will the next Scite for AutoIt come out? Coding without Scite is impossible [quote name='d2hacker88' date='Jan 6 2005, 05:10 PM']Can someone please help me out with autoit like gimme a link on how to use it cause i have no experience with computer languages and i'd like to make a program with autoit in order to empress my computer teacher.[right][snapback]52215[/snapback][/right][/quote] Link to comment Share on other sites More sharing options...
bshoenhair Posted February 8, 2005 Share Posted February 8, 2005 gcriaco or jdeb I tried the code wizard in latest Scite4AutoIt and when you click 'Copy' the code is not sent to scite until the code wizard is closed. Am I missing something here or are we going to have to close then reopen the code wizard everytime we use it ? Link to comment Share on other sites More sharing options...
Developers Jos Posted February 8, 2005 Developers Share Posted February 8, 2005 gcriaco or jdebI tried the code wizard in latest Scite4AutoIt and when you click 'Copy' the code is not sent to scite until the code wizard is closed. Am I missing something here or are we going to have to close then reopen the code wizard everytime we use it ?<{POST_SNAPBACK}>agree that, when the Copy button is pressed, the code should be written with ConsoleWrite (to SciTE) when used with /StdOut.I guess its an relative simple change but will leave it up to gcriaco to make the modifications in his script if he agrees...... SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bshoenhair Posted February 8, 2005 Share Posted February 8, 2005 (edited) agree that, when the Copy button is pressed, the code should be written with ConsoleWrite (to SciTE) when used with /StdOut.I guess its an relative simple change but will leave it up to gcriaco to make the modifications in his script if he agrees......<{POST_SNAPBACK}>@jbebOK@gcriacoI also noticed when the code is written to scite extra blank lines are added for some reason.#Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Abort, Retry, and Ignore, Icon=None, Miscellaneous=Top-most attribute Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(262146,"Title goes here","Text goes here") Select Case $iMsgBoxAnswer = 3;Abort Case $iMsgBoxAnswer = 4;Retry Case $iMsgBoxAnswer = 5;Ignore EndSelect #EndRegion --- CodeWizard generated code End ---;Should be#Region --- CodeWizard generated code Start --- ;MsgBox features: Title=Yes, Text=Yes, Buttons=Abort, Retry, and Ignore, Icon=None, Miscellaneous=Top-most attribute Dim $iMsgBoxAnswer $iMsgBoxAnswer = MsgBox(262146,"Title goes here","Text goes here") Select Case $iMsgBoxAnswer = 3;Abort Case $iMsgBoxAnswer = 4;Retry Case $iMsgBoxAnswer = 5;Ignore EndSelect #EndRegion --- CodeWizard generated code End ---;Also line 830 there is a mistype"InputBox features:"Should be";InputBox features:" Edited February 8, 2005 by bshoenhair Link to comment Share on other sites More sharing options...
Chris_1013 Posted February 9, 2005 Share Posted February 9, 2005 (edited) gcriaco - I hope you don't mind, but I'm trying to add in an adaptation of my SplashText generator. However, I'm having difficulty fitting everything in. I'm trying to keep in line with your design, but I can't really figure out fitting in the options bits. Namely, check boxes for; 0 = Center justified/always on top/with title (default) 1 = Thin bordered titleless window 2 = Without "always on top" attribute And radio buttons for; 4 = Left justified text 8 = Right justified text 16 = Windows can be moved If you're happy for me to play, do you - or anyone else who's better at GUIs, since I don't really like that, want to help with fitting them in? I've attached what I've got so far. I think I should be able to add the rest as your code is really cleanly written and easy to read. As I said, as long as you don't mind me doing this - don't want to step on toes.CodeWizard.au3 Edited February 9, 2005 by Chris_1013 Link to comment Share on other sites More sharing options...
gcriaco Posted February 9, 2005 Author Share Posted February 9, 2005 Hi Chris. I prefer adding the SplashText myself.Now, my priority are:1. to fix bugs reported by bshoenhair2. to translate in italian the 3.1 helpfile (it takes many days).BTW, thanks for help.Peppegcriaco - I hope you don't mind, but I'm trying to add in an adaptation of my SplashText generator. However, I'm having difficulty fitting everything in. I'm trying to keep in line with your design, but I can't really figure out fitting in the options bits. Namely, check boxes for; 0 = Center justified/always on top/with title (default) 1 = Thin bordered titleless window 2 = Without "always on top" attributeAnd radio buttons for; 4 = Left justified text 8 = Right justified text16 = Windows can be movedIf you're happy for me to play, do you - or anyone else who's better at GUIs, since I don't really like that, want to help with fitting them in?I've attached what I've got so far. I think I should be able to add the rest as your code is really cleanly written and easy to read.As I said, as long as you don't mind me doing this - don't want to step on toes.<{POST_SNAPBACK}> 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