dcop Posted August 8, 2006 Share Posted August 8, 2006 I do the following to to cut down on the number of lines and increase my view using the &@CRLF&. Is there any other way to do it with AutoIt? TIA, Dennis $label1 = GUICtrlCreateLabel("Date Of Gas-Up", 2, 16, 90, 17) &@CRLF& GUICtrlSetResizing (-1,$GUI_DOCKALL) &@CRLF& GUISetBkColor(0x00FFFF) Link to comment Share on other sites More sharing options...
Helge Posted August 8, 2006 Share Posted August 8, 2006 This kind of works If GUICreate("", 300, 300) <> "thisnever" AND GUISetState() <> "happens" Then Sleep(2000) Link to comment Share on other sites More sharing options...
Valik Posted August 8, 2006 Share Posted August 8, 2006 Runtime performance should not be impacted by a programmer's coding habits. This isn't 1982. Windows have scrollbars. Whitespace is not something to be afraid of. I suggest you better spend your time writing clear code than trying to squeeze as much as possible into as little screen space as possible. Link to comment Share on other sites More sharing options...
dcop Posted August 8, 2006 Author Share Posted August 8, 2006 Runtime performance should not be impacted by a programmer's coding habits. This isn't 1982. Windows have scrollbars. Whitespace is not something to be afraid of. I suggest you better spend your time writing clear code than trying to squeeze as much as possible into as little screen space as possible.I agree but my I feel my code is clear. Anyhow, there is no other way to one line multile syntax? Link to comment Share on other sites More sharing options...
nfwu Posted August 8, 2006 Share Posted August 8, 2006 (edited) Single lines = a messy peice of code. Look at this one line of C++ code: int main(){for(int i=0, j=10, x=0; i<=5, j<=20; i++, j+=2, printf("%i", i+j), x+=i+j){}} May have syntax errors, but you get the idea. #) Edited August 8, 2006 by nfwu TwitterOut of date stuff:Scripts: Sudoku Solver | Webserver | 3D library (Pure AutoIt) | Wood's GadgetsUDFs: _WoodUniqueID() | _DialogEditIni() | _Console*() | _GetIPConfigData() | _URLEncode/Decode() Link to comment Share on other sites More sharing options...
/dev/null Posted August 8, 2006 Share Posted August 8, 2006 I do the following to to cut down on the number of lines and increase my view using the &@CRLF&. Is there any other way to do it with AutoIt? TIA, Dennis You really think this is more readable $label1 = GUICtrlCreateLabel("Date Of Gas-Up", 2, 16, 90, 17) &@CRLF& GUICtrlSetResizing (-1,$GUI_DOCKALL) &@CRLF& GUISetBkColor(0x00FFFF) than this? $label1 = GUICtrlCreateLabel("Date Of Gas-Up", 2, 16, 90, 17) GUICtrlSetResizing (-1,$GUI_DOCKALL) GUISetBkColor(0x00FFFF) Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Confuzzled Posted August 8, 2006 Share Posted August 8, 2006 PageSpaceTakenBySourceCodeDoesNotReflectOnSizeOfEndExeFile.Readability is paramount when you revisit your code six months down the track.Comments are free and you will really appreciate them whan you go back later and update your code to add functionality - it always happens. I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg The phaonmneal pweor of the hmuan mnid Aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it deosn't mttaer in waht oredr the ltteers in a wrod are, the olny iprmoatnt tihng is taht the frist and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it wouthit a porbelm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe. Amzanig huh? yaeh and I awlyas thought slpeling was ipmorantt Link to comment Share on other sites More sharing options...
Valik Posted August 8, 2006 Share Posted August 8, 2006 I agree but my I feel my code is clear. Anyhow, there is no other way to one line multile syntax?Okay, maybe you can read it, good for you. Can anybody else? Can you absolutely positively guarantee no other living (or dead) person will ever have to read your code for any reason what-so-ever? Most people can't and some people won't. For example, if I was handed a script written like you show, I'd immediately discard it and rewrite it from scratch no matter how big it is. My thoughts are if you make such a poor decision about the way you write the code, I can't imagine the poor decisions you make in designing the code. This is irrespective of your actual ability - I'm never going to make it far enough into the script to see if you can design good code or not.If you want to see more code on screen do everybody else a favor and use a smaller font and get a bigger monitor. Don't write nasty code. 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