Jump to content

FreeStyle - Release - another, better preprossessor for AutoIt3


jennico
 Share

Recommended Posts

So I'm trying this out, running Vista and AutoIt 3.2.12.0 / 3.2.13.3 beta. There are a few compile errors, but quickly fixable with hints from Au3Check (some missing closing parenthesis, a missing comma, undeclared vars).

Immediately noticeable is it incorrectly recognizes my production AutoIt version as 3.2.13.3 (the beta). It recognizes the beta correctly. I'm not sure what including the beta in the library does for me though? It doesn't seem I can switch between preprocessing against production or beta. But I would think this *could* cause problems depending which version you compile with, ie a constant or function somewhere from production slips into a beta compile. I mean, constants could change, or functions WILL be patched for bugs.

The GUI is a little funky in Vista. I think because you're squezing things together so much, the controls and windows need a little more space in Vista. Just some minor overlap and misalignment. The editor window comes up with bad dimensions as well, slightly too vertically large for the screen. And there's a message box during the initial scanning phase that is too big for the screen as well if you have a lot of omitted includes, ie if you include Beta stuff in the library (which goes back to my question above about why prod and beta aren't kept separate).

I tried a script, and got several GDI+ related errors - missing $tag*** and $gh*** constants (discussed already), but was also missing _GDIPlus_GetEncoders() function, and _WinAPI_GetLastError() function.

I'm guessing the History function is not implemented yet.

Keep up the good work, it looks really promising. If you want any more info, let me know.

Edited by wraithdu
Link to comment
Share on other sites

  • Replies 53
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

of course, let's keep talking about the problems !

i also came to the conclusion that especially the gdiplus script inherits lots of problems. the first problem is, that paulia does not consequently use uppercase for his constants (this is a kind of convention in all other includes). the second problem is, that in gdiplus some important variabes are not declared as Global Const, but as Global. for example, $giGDIPRef=0 and $ghGDIPDll=0. these are no Constants, but nevertheless they have to be defined. this needs some workaround. it is better to define them as Local within the functions and then pass them as byref params.

on the other hand, i do not want to register EVERY variable because this would lead to huge libraries and confusion, because then every temporary variable will be registered, like $i, $a, $x and then later patched. this will definitely destroy the original scripts.

maybe one of the chiefs (Larry?) could check gdiplus.au3 for some improvements and a clearer syntax. meanwhile, if no further include is concerned, i could try to integrate the gdiplus.au3 as an exception from the rules .....

concerning the autoit version, look at the script, it graps the version from the registry, resp. from @autoitversion (which also is only a macro that refers to the registry keys). i am not sure what could cause this confusion. i hope it is not a wrong registry key and so an autoit bug.

at this state of development (this was not clear to me before), it is better NOT to implement duplicate functions but carefully add beta includes from the administration tab one by one. at this point, i do not yet recommend to collect ALL possible data from the Library Inventory tab. (i hoped, that this could be possible, but now i see the problems arising.

i am heavily working on a good handling for duplicate constants and functions, so they will be clearly marked and there will be clear references between the constants and the includes that they come from. maybe i implement a prompt when FreeStyle cannot decide which one is the best alternative.

you have seen the future possibility of choosing the history button. what i want to do, is setting restore points to the library like winxp does it, then you will be able to choose and load explicit libraries, lets say, a 3.2.10.0 library, a 3.2.12.1 library and the corresponding betas. this is some work to do and i would appreciate help if someone is able to script parts of the solutions.

Concerning the constants: the "genuine" global constants (which are the majority), like $WS_POPUP will never change their values, because they are taken from the windows API. for the others, it would be very friendly to give them unique names, because i experienced global constants with different values from different includes. this has to be avoided !

concerning udf: it would be very friendly not to use identical function names for (even slightly) different declarations. an example for this is _sendmessage() or wm_notify(), which vary from one include to the other. so a project like FreeStyle will fail to distinguish between these different versions of the same call. by the way, there are differences in partameters, so these function will definitely fail. it is a good idea e.g. to add a _ to the slightly changed udf when it differs from the similar one.

it would help me a lot to get a link to the example scripts that fail to be converted so i can analyze where exactly the error causing problem is.

i would also appreciate if someone has some script improvements. i especially think of "stringregexp", this would speed it up a lot.

thanks for any ideas you can contribute to improve this interesting script !

j.

edit: the messagebox is nonsense, just a relic, just ignore it. the editor window takes @desktopheight maybe this is caused by a very high title bar in vista, i will make it smaller. anyway, the editor is just a simple beginning, maybe someone feels able to add more features like resizing, there are example scripts in the forum, search for _scilexer.au3 !

the tab windows always have repainting problems, the same on winxp, i tried different spacings but still no improvement. i assume that maybe the group controls interfere with the extended comboboxes and labels. well, this is design and will be fixed by the time.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

Sorry to harp on the problems. It really is a great start on this project, which I'm sure is a huge undertaking. Everyone who uses it can appreciate your hard work and the difficulties you must have to overcome.

Now I nitpicked just to be thorough, but things like the Vista GUI issues, the messagebox, and the editor window are just cosmetic, nothing major. The only thing that needs to be sorted for me would be separating production from beta includes so they don't get mixed up. I've got several apps that could benefit from a good include cleaning muttley

Link to comment
Share on other sites

I really hate to knit-pick, but I have a really minuscule bug to report, in the GUI that your script creates, the images have white backgrounds, so when on a computer with certain custom themes, they show up in white boxes in your GUI.

This is really not a critical issue, or even one that I expect you to fix, but I figured I'd report it anyway.

_________[u]UDFs[/u]_________-Mouse UDF-Math UDF-Misc Constants-Uninstaller Shell

Link to comment
Share on other sites

ok, thank you for your comments.

i agree the gui problems are minor. the pictures are icons taken from system dlls (because i did not want to fileinstall extra images). so it should not be possible that they have white backgrounds. i really wonder about this.

since i cannot reproduce this issue, please try to make script changes on your own and paste them here (at least the changed lines). furthermore, i would be glad if anyone could tell me how to refresh the gui regularly so it doesn't turn ugly from time to time (maybe i give it a try with adlib).

when you look into the FreeStyle script you will see, that i have already been trying to handle duplicates / beta entries by marking them with "°". i will go on completing this, because it is first priority.

anyway, up to now FreeStyle already is a nice info tool and a good place to store example scripts and selfmade udfs which are spread around on your pc.

cheers muttley

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

released v 0.91

changelog:

08-07-08 v 9.0 First release Beta Version

09-07-08 v 9.1

Fixed Bug: Difference in linecounts between 'Parameters.ini' and 'Functions.ini'.

Fixed Bug: Bad checkbox style a_lower & b_lower.

Fixed Bug: Commented out Duplicate mark relic '°'.

Fixed Bug: Footnote '°=Duplicate'.

Fixed Syntax Bugs (1).

Fixed Issue: _SciGui Height.

Added feature 'Lex GDIPlus': Special GDIPlus.au3 / A3LGDIPlus variables will be available.

Added feature: FreeStyle Version will be checked / Changelog.txt added.

Added feature: All Settings can be saved now.

Added feature: Example View in Functions Group.

Added feature: Run Example in Functions Group.

N.B.: Examples are taken from the 'Examples\Helpfile' Directory. Lots of them are NOT working !

GDIPlus now works like a charm.

i am scared about the next task: duplicates / Beta handling. this will be a lot of frustrating trial & error and braintwisting work... muttley

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

Cool, I'll check it out when I get home.

I noticed in your sig you're using AutoIt 3.2.8.1....

This is bound to cause problems with people using your scripts since most everyone should be using at least the latest production version, if not the betas. Any reason you're not using the latest production version as well (3.2.12.1)?

EDIT: I figured out the issue with the version numbers being shown. The Beta version is right because it reads from the registry. But the production version you are using @AutoItVersion which reads from the compiled script. So if I compiled with the Beta, then it shows the prod version as the beta version. Same thing for the production library version. It's probably a good idea to read both from the registry since it doesn't really matter (in this sense) what version the EXE was compiled with.

Edited by wraithdu
Link to comment
Share on other sites

ok, thanks, i'll change this @autoitversion info with the regread value.

regarding the other question: i will not use an autoit version that does not work properly. i am tired of downgrading again. the last proper version was 3.8.2.1. sorry. i didn't test the new 3.2.12.1 thoroughly yet. but of course i have the latest includes and helpfiles in use, so my scripts will always be working, moreover because i do not use #includes any more. (this finally brought me to make this FreeStyle script.)

for the same reason i will not use vista. i think it's a question of personal temperament.

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

The version in the registry is only valid if you use the installer for AutoIt. I think my registry still says 3.1.?.?. I always frget to update that setting to the actual version. And I never have anything showing in the beta version.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

welcome geosoft !!! muttley

so, what does your @autoitversion macro say ?

by the way, released v 0.92.

08-07-08 v 9.0 First release Beta Version

09-07-08 v 9.1

Fixed Bug: Difference in linecounts between "Parameters.ini" and "Functions.ini" causing wrong references.

Fixed Bug: Bad checkbox style a_lower & b_lower.

Fixed Bug: Commented out Duplicate mark relic "°".

Fixed Bug: Footnote "°=Duplicate".

Fixed Syntax Bugs (1).

Fixed Issue: _SciGui Height.

Added feature "Lex GDIPlus": Special GDIPlus.au3 / A3LGDIPlus variables will be available.

Added feature: FreeStyle Version will be checked / Changelog.txt added.

Added feature: All Settings can be saved now.

Added feature: "Example View" in Functions Group.

Added feature: "Run Example" in Functions Group.

N.B.: Examples are taken from the "Examples\Helpfile" Directory. Lots of them are NOT working ! NOT my fault !

09-07-08 v 9.2

Fixed bug: Using Registry Key instead of "@AutoItVersion".

Fixed bug: Adding multiple Include files.

Added feature: "View Helpfile" in Functions Group.

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

welcome geosoft !!! muttley

so, what does your @autoitversion macro say ?

by the way, released v 0.92.

j.

3.2.13.3 That's because I never install a beta as a beta. I just copy the beta files into the AutoIt 3 folder. If I have to revert it's easy to just copy the older version over the top. I also have archived all the AutoIt versions right back to when AutoIt would still fit on a 1.44 mb diskette.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

so it checks the version of the used exe. have to think how i can realize this in my script.... i cannot use the regkey to detect the installation directory..... hmmmmm..... muttley

i agree with you regarding the older versions. better to keep them all.

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

How about checking the version of AutoIt3.exe, Aut2Exe.exe, or AutoItSC.bin files in the installed production and beta directories? You have to know the installation directories for your program to work, so you'll already have the locations.

Link to comment
Share on other sites

well, this tells me where the exe is, but still won't find the includes directory, if it's not the same as the exe. maybe i should not take care about people who do not properly install autoit ? (this is a joke - smile) muttley

j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

If AutoIt is not properly installed, then it won't function at all! Seriously though, if there is not a formal installation, then you'll have to assume the EXE is located in the includes directory parent. One more reg key to check is -

[HKEY_CURRENT_USER\Software\AutoIt v3\AutoIt]

"Include"=

At least with Scite4AutoIt3, the user can specify a user include directory separate from the main includes directory.

Link to comment
Share on other sites

well, this tells me where the exe is, but still won't find the includes directory, if it's not the same as the exe. maybe i should not take care about people who do not properly install autoit ? (this is a joke - smile) muttley

j.

If you have the path to the exe then getting the path to the include folder is simple.

The method I use is to first read the registry if no luck there then use FileSelectFolder() and save that to an ini file in the script folder. I don't use @AutoItVersion or @AutoItExe primarily because they are not condusive with compiled scripts. If your code is used compiled then the macros are no good to you.

;
Func _IncludePath()
  Local $aiFldr, $aiPath
  $aiPath = RegRead("HKLM\SOFTWARE\AutoIt v3\AutoIt", "InstallDir")
  If NOT $aiPath Then $aiFldr = FileSelectFolder("Select your AutoIt3 folder", "", 2, @ProgramFilesDir)
  If StringRight($aiFldr, 1) = "\" Then $aiFldr = StringTrimRight($aiFldr, 1)
  If Not StringInStr($aiFldr, "\include") Then $aiFldr &= "\include"
  If NOT FileExists($aiFldr) OR StringInStr($aiFldr, "AutoIt3") = 0 Then Return SetError(1)
  SetError(0)
  Return $aiFldr
EndFunc ;<==> _IncludePath()
;

BTW; I've been working on basicly the same function but there are still 1 or 2 issues to overcome.

EDIT: Wrong reg example.

Edited by GEOSoft

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

so, george, does FreeStyle work for you ? that's the basic question.

j.

I didn't run it because it works with Scite and I don't use that as my editor. I was simply talking about the include path issue.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

I'm checking out v0.92 and it looks good. Few issues on compile though, which I'm not sure how haven't caused you problems yet. All are caught by Au3Check.

1. Line 873 - missing closing parenthesis before 'Then'

2. Line 893 - missing comma immediately after first closing parenthesis

3. Line 991 - $b (a function parameter) is redeclared in the function

4. Line 1038 - $i (a function parameter) is redeclared in the function

5. RunErrorsFatal is no longer a valid Opt, default behavior is like RunErrorsFatal = 0

6. $s_exit and $s_link are not declared before use (just warnings). Just add 'Global $s_exit, $s_link' at the top somewhere.

Duplicate function names, mainly from multiple versions of custom UDF's, is still an issue, but I'm not sure how to handle that yet. Perhaps not including custom UDF's at all in FreeStyle (personal decision)? My issue is that I have different versions of some UDF's with slightly different functionality for different purposes, but they have identical function names.

I did want to mention though, script pre-processing aside, it's great to have a Library to look up functions and constants. It's a super convenient thing.

Edited by wraithdu
Link to comment
Share on other sites

yes, i agree, thank you very much.

before it was a desktop mess looking up all the helpfiles, includes directories and example scripts, like a dozen tabs open in SciTe, moreover one or more browser tabs to the forum, when working on a script. now you have them all properly listed and you can even play around and find interesting new things without searching at all.

i think FreeStyle could also be a nice introduction to the udf universe for newbies.

what was astonishing to me, is the acceptable speed when building and resorting the libraries, i would not have exspected that. there are really large arrays to handle and search.

I didn't run it because it works with Scite and I don't use that as my editor. I was simply talking about the include path issue.

hey george, you can really try it ! i even implemented an option to use a custom editor, so i would like to know if i can cope with your exotic configuration.

j.

Edited by jennico
Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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