Jump to content

Recommended Posts

Posted

So, whats the actually difference/improvement to the old Resources UDF?

BTW, are you using these silly ternary operators to force people update to latest Autoit version? 

Posted (edited)

  On 7/3/2014 at 7:45 PM, JFX said:

So, whats the actually difference/improvement to the old Resources UDF?

BTW, are you using these silly ternary operators to force people update to latest Autoit version? 

Nothing but code tidying and a couple of bug fixes that I found. Also they are silly aren't they, I am glad it's not just me who giggles at them!

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)
  On 7/3/2014 at 7:09 PM, guinness said:

It's built using the UDF standards I have tried to enforce around here.

 

  On 7/3/2014 at 7:47 PM, guinness said:

Nothing but code tidying and a couple of bug fixes that I found. Also they are silly aren't they, I am glad it's not just me who giggles at them!

 

.... I'm working.

EDIT:

at the moment I finished.

I attach a result of the work.

changed:  $f.... >> $b.....
added #Region
added Header
added link to this Thread
added #Tidy_Parameters=/sort_funcs /reel

Cheers

mLipok

Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

@JFX

Do like I do: Just change for the good old "if-endif"

While I do not have evidence that ternary is faster than the if-endif, I will keep to the old method!

@guinness

Is excellent, once again: Thank you!

JS

http://forum.autoitbrasil.com/ (AutoIt v3 Brazil!!!)

  Reveal hidden contents

Somewhere Out ThereJames Ingram

somewh10.png

dropbo10.pngDownload Dropbox - Simplify your life!
Your virtual HD wherever you go, anywhere!

Posted

@JScript

Yeah, I change them to the good old "if-endif".

In me opinion ternary operators should have never been added to a language like Autoit.

Seems with all the projects I'm involved in, I won't update to latest Au3 version anytime soon.

So it's quite annoying to see guy using them.

Posted
  On 7/3/2014 at 9:14 PM, JFX said:

 

So it's quite annoying to see guy using them.

With all due respect please leave your opinion out of this discussion, as you are undermining my hard work of many hours. You clearly lack a basic understanding in programming and what the ternary operator is, because it's not just AutoIt where you can find it.

All,

For those who actually have an interest in programming, please test the UDF and leave unnecessary comments about the direction of AutoIt out of it.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

  On 7/3/2014 at 9:14 PM, JFX said:

Seems with all the projects I'm involved in, I won't update to latest Au3 version anytime soon.

So it's quite annoying to see guy using them.

 

I use very old release/beta version of AutoIt 3.2.12.1/3.3.7.23 too and I have no plans for upgrade too

but there is very simple way how to test/use latest (or generally other) version of AutoIt

for particular script without installing it/upgrading current AutoIt.

Just download ZIP version of latest AutoIt and Scite4AutoIt3 and copy (unpack) it somewhere

and place directive #AutoIt3Wrapper_Autoit3Dir= with link to that directory

at top of your testing script.

Note: You have to open such script in new Scite.exe from downoaded ZIP

so you can create user menu in your file manager (TCMD or FAR)

and that AU3 script open not by Enter (old Scite) but by this user menu (new Scite):

  Quote
"C:Program Files (x86)AutoIt3312SciTeSciTE.exe" "!.!" --> AU3 3.3.12.0

 

@guinness

Sorry for OFFTOPIC but this information can be generally usefull for more people.

Edited by Zedna
Posted

No problem, it's for the greater good in the end.

I have updated the UDF which was downloaded 33 times since yesterday. Awesome!

Changelog:
    2014/07/04:
    Added: #Regions. (Thanks mLipok)
    Added: #Tidy_Parameters=/sort_funcs /reel (Thanks mLipok)
    Added: All optional params now accept the default keyword.
    Added: Link to this thread. (Thanks mLipok)
    Added: Main header. (Thanks mLipok)
    Changed:  $f.... >> $b..... (Thanks mLipok)

Note: If the ternary issue is stopping people using it then I can switch to using __Iif() which is part of WinAPIInternals.au3 (aka WinAPIEx.au3) and is either a wrapper for the ternary operator or the old if statment, depending on what version of WinAPIEx you're using. So...up to you people.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted (edited)

As to JFX's question of what makes this different...see the initial post.

Edited by guinness

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Moderators
Posted

guinness,

Stick with the ternary syntax - if people do not like it (or do not want to update to support it) then they can modify the code themselves. ;)

 

  Quote

_ResourceGet() has potential memory leak

[...]

because it must be done after using of resources at the end and not inside UDF

Perhaps store called resources in an array which is then used by an "Internal Use Only" UDF function called on exit via OnAutoItExitRegister. I do something similar in my NoFocusLines UDF. :)

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/4/2014 at 2:10 PM, Melba23 said:

Perhaps store called resources in an array which is then used by an "Internal Use Only" UDF function called on exit via OnAutoItExitRegister. I do something similar in my NoFocusLines UDF.

Thanks. I plan on tweaking this UDF next week with improved management.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

OK, done.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

Posted

The second one isn't official supported in AutoIt yet.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

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...