Jump to content

Recommended Posts

  • Moderators
Posted (edited)

MyEarth,

 

  Quote

Bad bad example Melba lol

Does it work? Yes

Does it show the syntax? Yes

Was it part of a post to help people understand some of the new features? Yes

Didi it spark interest in the operator? Yes

Sounds like a result to me. ;)

If trancexx wants to provide better examples for the features she introduced then she has only to post them.

M23

Edit: Removed unpleasant comments and apologised to the target.

Edited by Melba23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted (edited)

How am I supposed to know who wrote the example? Does it matter who wrote it?

I had to look up for the meaning of expression "to cast aspersions". Hm, I'm not sure how exactly did I deserve the comments I got from Melba23. Once again I've been accused for doing things I didn't even thought of.

Melba23, if you have something personal against me then please deal with that privately. PM me or whatever, say what you want to say and then leave me alone.

Edited by trancexx

♡♡♡

.

eMyvnE

Posted

  On 7/11/2013 at 2:38 PM, Melba23 said:

Does it work? Yes

Does it show the syntax? Yes

Was it part of a post to help people understand some of the new features? Yes

Did it spark interest in the operator? Yes

Sorry to take a contrary view, but you would never actually write code like that, so I wouldn't want it in the helpfile.

TranceXX has already given an example where the operator actually provides new functionality rather than just a new syntax, and others have posted better examples.

  • Moderators
Posted

Mat,

It was not in the Help file - it was in a post from a self-avowed hobbyist poster offering some assitance to the community on how the syntax for the new features actually work, as explained in the very lines you quoted. :mad2:

Anyway, as I have now learnt how poorly my attempt was regarded by others, I will not bother in the future and leave it to those who consider themselves better coders. If they can be bothered to do it, of course. ;)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Posted

  On 7/11/2013 at 3:41 PM, Melba23 said:

It was not in the Help file - it was in a post from a self-avowed hobbyist poster offering some assitance to the community on how the syntax for the new features actually work, as explained in the very lines you quoted. :mad2:

Anyway, as I have now learnt how poorly my attempt was regarded by others, I will not bother in the future and leave it to those who consider themselves better coders. If they can be bothered to do it, of course. ;)

 

I didn't say it wasn't useful, I just said it was a bad example  :huh2:

Unfortunately you picked the one feature that is most likely to be abused in the future. That's probably why the users who have seen it in other languages were so quick to point that out to you.

Posted

Come'on guys, mine was only a gag / joke based on the "terrible terrible example", don't take it so seriusly and please continue with the constructive discourse. I can only learn from you because i can't teach nothing. Thanks

Posted (edited)
  On 7/11/2013 at 4:36 PM, James said:

Better learn Arabic then. Apparently that's the most readable language?

 

I thought they had no vowels in written Arabic. I think that's one of the major problems in International relations: things often get lost in translation.

Ths sntnce hs n vwls.

I think what the world really needs is a Babel fish.

Edited by czardas
Posted
  On 7/11/2013 at 4:36 PM, James said:

Better learn Arabic then. Apparently that's the most readable language?

 

Says who?  Not me.  From what I can tell, Arabic script looks like a drunk chicken walked through the inkpot.

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Posted

I don't share this opinion. Arabic is a beautiful and very ornamentic script. Have you ever been to one of the arabic countries or south of spain?

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted
  On 7/11/2013 at 10:39 PM, water said:

I don't share this opinion. Arabic is a beautiful and very ornamentic script. Have you ever been to one of the arabic countries or south of spain?

 

Blue_Drache's wording made me laugh. Andalucia is like a second home to me.

Posted

$ValueOfThisTopic = ($bMostlyArguing Or $bDiscussingArabic) ? -1 : 1

in the negatives i'm afraid...

On a side note, C, C++ and D allow the result to be used as an LValue so that you can conditionally modify/assign values to different variables:

(which ? x : y) += 5

My contributions:

  Reveal hidden contents

Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFsProcess CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen)Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery

Wrappers/Modifications of others' contributions:

_DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity)

UDF's added support/programming to:

_ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne)

(All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)

Posted
  On 7/12/2013 at 11:26 AM, Ascend4nt said:

On a side note, C, C++ and D allow the result to be used as an LValue so that you can conditionally modify/assign values to different variables:

(which ? x : y) += 5

Which is what AutoIt should do, I believe it doesn't at the moment. The ternary I put into Disk Manager was returning true, not the output of the ternary concatenated with a string I appended.

Posted

Good Code <----------------------------------------------------------------------------------------> Fun Code
Readable, Understandable, Maintainable, Self-Explanatory, Idiomatic, Efficient, Optimized, Elegant, Hackvalue

Also, AutoIt doesn't support ternary left hand values because assignment is not an equation operator.

Posted

Just because you don't feel you will use it doesn't means others will. Try to look beyond your limitations as a developer.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted
  On 7/12/2013 at 11:32 AM, James said:

Which is what AutoIt should do, I believe it doesn't at the moment. The ternary I put into Disk Manager was returning true, not the output of the ternary concatenated with a string I appended.

Referring to >this post:

$Export_File = (StringRight(StringLower($Export_File), 4) == ".dma") ? $Export_File : $Export_File & ".dma"

 

How do you suppose that is returning true?  I suspect you aren't fully grasping how the ternary operator, or AutoIt's interpreter, works. The condition is tested, if its TRUE then what comes between '? .. :' is evaluated, otherwise what follows ':' is evaluated.  After evaluation, if there is an assignment on the left hand side of the ternary expression, the result of the evaluated expression is then moved into that .

Optimizing compilers (which AutoIt isn't) could possibly fix that flawed code by doing a no-op or an append, but its better to fix the problem where it starts - at the programmer level.

My contributions:

  Reveal hidden contents

Performance Counters in Windows - Measure CPU, Disk, Network etc Performance | Network Interface Info, Statistics, and Traffic | CPU Multi-Processor Usage w/o Performance Counters | Disk and Device Read/Write Statistics | Atom Table Functions | Process, Thread, & DLL Functions UDFsProcess CPU Usage Trackers | PE File Overlay Extraction | A3X Script Extract | File + Process Imports/Exports Information | Windows Desktop Dimmer Shade | Spotlight + Focus GUI - Highlight and Dim for Eyestrain Relief | CrossHairs (FullScreen)Rubber-Band Boxes using GUI's (_GUIBox) | GUI Fun! | IE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) | Magnifier (Vista+) Functions UDF | _DLLStructDisplay (Debug!) | _EnumChildWindows (controls etc) | _FileFindEx | _ClipGetHTML | _ClipPutHTML + ClipPutHyperlink | _FileGetShortcutEx | _FilePropertiesDialog | I/O Port Functions | File(s) Drag & Drop | _RunWithReducedPrivileges | _ShellExecuteWithReducedPrivileges | _WinAPI_GetSystemInfo | dotNETGetVersions | Drive(s) Power Status | _WinGetDesktopHandle | _StringParseParameters | Screensaver, Sleep, Desktop Lock Disable | Full-Screen Crash Recovery

Wrappers/Modifications of others' contributions:

_DOSWildcardsToPCRegEx (original code: RobSaunder's) | WinGetAltTabWinList (original: Authenticity)

UDF's added support/programming to:

_ExplorerWinGetSelectedItems | MIDIEx UDF (original code: eynstyne)

(All personal code/wrappers centrally located at Ascend4nt's AutoIT Code)

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
  • Recently Browsing   0 members

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