Jump to content

New SciTE4AutoIt3 available with SciTE v1.79


Jos
 Share

Recommended Posts

Felt that one coming.

Think its more a case of the beta directive not triggering any messages about the lack of a installed beta version, after uninstalling the beta. So the beta directive just silently stayed in my directive's blocks. Until I used Compile script from within AutoIt3Wrapper (normally I never do that). At this point I of course forgot (and ignored) the beta directive being there (Got used to it being not a problem.).

---

This Directive tells all utilities to use the AutoIt3 Beta build.

Think I got it. As Build and Run are 'Production' only commands.

Sorry about that. (geheugen als een zeef aan deze kant.)

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

  • Replies 299
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Developers

Think I got it. As Build and Run are 'Production' only commands.

Sorry about that. (geheugen als een zeef aan deze kant.)

Not really, what AutoIt3wrapper does is it will check if the Beta dir is there and the aut2exe program exists or else revert to the Production version without any warning. The issue you see is with Obfuscator. Obfuscator is told to use the beta include files and cannot find these file hence the errors.

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

  • 4 weeks later...

I discovered some inconvenience or maybe bug in Obfuscator with striponly option.

When I use _IEErrorHandlerRegister("MyErrFunc") then there is error:

### StripOnly Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by the Call() statement.

I know that in IE UDF inside _IEErrorHandlerRegister() there is called

$oIEErrorHandler = ObjEvent("AutoIt.Error", $s_functionName)

which is the source of problem.

I added this line to my script:

#Obfuscator_Ignore_Funcs=MyErrFunc

to avoid striping my error function "Func MyErrFunc()"

so finally Obfuscator still reportd error but my function is not stripped.

Maybe there can be added some logic incorporating #Obfuscator_Ignore_Funcs= directive to avoid such error report

Here is whole my testing script:

#AutoIt3Wrapper_run_obfuscator=y
#Obfuscator_parameters=/so
#Obfuscator_Ignore_Funcs=MyErrFunc

#Include <IE.au3>
Global $error

;~ $objErr = ObjEvent("AutoIt.Error","MyErrFunc") ; used _IEErrorHandlerRegister() instead

_IEErrorHandlerRegister("MyErrFunc")
; --> internally calls $oIEErrorHandler = ObjEvent("AutoIt.Error", $s_functionName)

_IEErrorHandlerDeregister()
 
Func MyErrFunc()
;    MsgBox(16, "Error", "Při COM došlo k chybě!" & @CRLF & @CRLF & _
;            "Popis chyby: " & @TAB & $oIEErrorHandler.description & @CRLF & _
;            "Win. popis:" & @TAB & $oIEErrorHandler.windescription & @CRLF & _
;            "Číslo řádku: " & @TAB & $oIEErrorHandler.scriptline & @CRLF & _
;            "Číslo chyby: " & @TAB & Hex($oIEErrorHandler.number, 8) & @CRLF & _
;            "Objekt: " & @TAB & $oIEErrorHandler.source)

    $error = $oIEErrorHandler.description
    SetError(1)
EndFunc

and the result after compile:

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "C:\Program Files\AutoIt3\PZ\AZPRO_IMPORT_LKW\test1.au3" /autoit3dir "C:\Program Files\AutoIt3"

+>16:53:19 Starting AutoIt3Wrapper v.2.0.1.22 Environment(Language:0405 Keyboard:A0000405 OS:WIN_XP/Service Pack 2 CPU:X86 OS:X86)

>Running AU3Check (1.54.13.0) from:C:\Program Files\AutoIt3

+>16:53:19 AU3Check ended.rc:0

>Running Obfuscator (1.0.28.3) from:C:\Program Files\AutoIt3\SciTE cmdline:

-### StripOnly Error: Found ObjEvent() statement using unsolvable Func, which will/could lead to removal of Funcs that are used by the Call() statement.

>### current Func: _IEErrorHandlerRegister

C:\Program Files\AutoIt3\include\IE.au3(3644,1) Warning for line:$oIEErrorHandler = ObjEvent("AutoIt.Error", $s_functionName) 

-#############################################################################################

-#### Obfuscator Found 1 Error(s)!!!! This means your script could have problems running properly. ####

-#############################################################################################

- Iteration 1 Strip Functions result: Output 78 lines and stripped 2965 lines

- Iteration 2 Strip Variables result: Output 42 lines and stripped 7 lines

+> Source 4530 lines 174967 Characters.

+> Stripped 2972 Func/Var lines and 1486 comment lines, Total 172192 Characters.

+> Saved 98% lines 98% Characters.

+> Obfuscator v1.0.28.3 finished created:C:\Program Files\AutoIt3\PZ\AZPRO_IMPORT_LKW\test1_Obfuscated.au3

>Running AU3Check for obfuscated file(1.54.13.0) from:C:\Program Files\AutoIt3

+>16:53:21 AU3Check Obfuscated code ended.rc:0

>Running:(3.2.12.1):C:\Program Files\AutoIt3\aut2exe\aut2exe.exe /in "C:\Program Files\AutoIt3\PZ\AZPRO_IMPORT_LKW\test1_Obfuscated.au3" /out "C:\Program Files\AutoIt3\PZ\AZPRO_IMPORT_LKW\test1.exe" /nopack /comp 2

+>16:53:22 Aut2exe.exe ended.rc:0

>Running:(3.1.0.0):C:\Program Files\AutoIt3\aut2exe\upx.exe" --best --compress-icons=0 -qq "C:\Program Files\AutoIt3\PZ\AZPRO_IMPORT_LKW\test1.exe"

  528189 -> 262461 49.69% win32/pe test1.exe

+>16:53:23 UPX Ended: rc:0

+>16:53:23 Created program:C:\Program Files\AutoIt3\PZ\AZPRO_IMPORT_LKW\test1.exe

->16:53:23 Warning: This is an Unicode compiled script and will not run on Win9x/ME.

>Exit code: 0 Time: 4.872

Link to comment
Share on other sites

  • Developers

The "#Obfuscator_Ignore_Funcs=MyErrFunc" directive will handle that it isn't stripped and probably Obfuscator could figure out that this statement doesn't need the warning:

_IEErrorHandlerRegister("MyErrFunc")

EDIT: Forget about this remark... next one is correct.

.. but it will never be able to figure out the contents of a variable like in:

$s_functionName = "MyErrFunc"
$oIEErrorHandler = ObjEvent("AutoIt.Error", $s_functionName)

I will have a look at the first option to see what it takes to avoid the warning there.

Jos

Edited by Jos

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

  • 2 weeks later...

Scite4AutoIt3: Tools, Jump to Func Prod. (Ctrl-J)

Using the folowing #include structure. (local located files)

[file_00] func_00

+ [file_11]* func_11

| + [file_21]* func_21

| + [file_22]* func_22

+ [file_13]* func_13

| + [file_23]* func_23

| | + [file_11]* (added in attempt to linkup to the branch including the other functions)

(+)'#include ...'

(*)'once'

But when trying to jump from file "file_23" to any of the other functions, other then "func_23", they all produce a "Unable to find function definition: <functionName>". (only expected "func_00" to fail.)

I'm interested in having this work on this side. (eyeballing the AutoItGotoDefinition.lua file, but like to ask first before trying to dig in.)

Any comments or suggestions ?

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

  • Developers

The way it works is that this function can only jump to Func's in the current file or in any of the #included files mentioned in this current file.

It has no knowledge of the file included by the higher level files.

Just wondering if you really should use a UDF in file_23 that is located in File_13 without including file_13 in it?

Jos

Edited by Jos

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

Aha, first level include files only.

Got it.

---

Probably not.

But as a side note, I tend to use a general include file that contains most of the general include for a project. But because of the first include-level only scan that rules out Ctrl-J support on those projects.

Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Link to comment
Share on other sites

Dont know if this is a Scite bug but is the only app that i am seeing this behavior with:

have two monitors with Scite open on the 'extended' monitor

uncheck the 'extend my windows desktop onto this monitor' leaving just the one monitor with all the apps snapped over there now.

open the save as dialog in Scite - in my case it is opening off screen, i can only assume relative to Scites previous location.

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

  • Developers

Something that really annoys me about SciTE, but I'm not 100% sure if it's SciTE's default behaviour or the modifications for AU3.

If you have line bookmarks, then run tidy it loses the bookmark positions. Major annoyance when you have a few dozen of them.

The file is reloaded which causes the bookmarks to be lost. I haven't been able to comeup with a simple scenario that will work.

Only thing tested is to save the session before replacing and then reload the session, but the issue is that if any other file is open which is modified, a prompt will pop up asking to save that file.

Ideas are welcome ......

Jos

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

  • Developers

Dont know if this is a Scite bug but is the only app that i am seeing this behavior with:

have two monitors with Scite open on the 'extended' monitor

uncheck the 'extend my windows desktop onto this monitor' leaving just the one monitor with all the apps snapped over there now.

open the save as dialog in Scite - in my case it is opening off screen, i can only assume relative to Scites previous location.

No idea and do not have this setup to test with. Either way, I am not fixing any general SciTE issues and try to use Neil's distribution.

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

  • Developers

Is it possible to remove items from the SciTE tools menu without editing the au3.properties file?

SciTEConfig 3rd tab.

But why would you want this anyway?

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

The file is reloaded which causes the bookmarks to be lost. I haven't been able to comeup with a simple scenario that will work.

Only thing tested is to save the session before replacing and then reload the session, but the issue is that if any other file is open which is modified, a prompt will pop up asking to save that file.

Ideas are welcome ......

Jos

Thinking out loud as I'm out of familiarity with the SciTE API:

  • Enumerate the bookmarks in Lua writing line numbers to a temporary file.
  • Launch Tidy and let it do it's thing.
  • Restore bookmarks by reading the temporary file.
  • Delete the temporary file.
This assumes Tidy doesn't change the number of lines in a file. If Tidy does change the number of lines (consolidating multiple empty lines) then this would result in bookmarks being in the wrong place after any consolidation.
Link to comment
Share on other sites

This assumes Tidy doesn't change the number of lines in a file. If Tidy does change the number of lines (consolidating multiple empty lines) then this would result in bookmarks being in the wrong place after any consolidation.

Well the same thing happens similarly when you delete a line, causing everything below it to shift up, falsifying the position of the original intended bookmark. But keeping this behaviour is ideal.

Link to comment
Share on other sites

  • Developers

Thinking out loud as I'm out of familiarity with the SciTE API:

  • Enumerate the bookmarks in Lua writing line numbers to a temporary file.
  • Launch Tidy and let it do it's thing.
  • Restore bookmarks by reading the temporary file.
  • Delete the temporary file.
This assumes Tidy doesn't change the number of lines in a file. If Tidy does change the number of lines (consolidating multiple empty lines) then this would result in bookmarks being in the wrong place after any consolidation.

Saving the bookmarks is easy as I can save the session to a temp file that will contain that... something like:

buffer.7.path=D:\Development\AutoIt3\installer_SciTe4AutoIt3\Programs\tidyC\test.au3
buffer.7.position=959
buffer.7.current=1
buffer.7.bookmarks=8,14,16,22,27

The thing I have never figured out to-date is how to do the bookmark function via the Director interface available.Been playing with Extender but no go yet.

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

  • Developers

Saving the bookmarks is easy as I can save the session to a temp file that will contain that... something like:

buffer.7.path=D:\Development\AutoIt3\installer_SciTe4AutoIt3\Programs\tidyC\test.au3
buffer.7.position=959
buffer.7.current=1
buffer.7.bookmarks=8,14,16,22,27

The thing I have never figured out to-date is how to do the bookmark function via the Director interface available.Been playing with Extender but no go yet.

Managed to get the Director interface working for adding bookmarks eg:

extender:dostring editor:MarkerAdd(21,1)

so Tidy can restore the bookmarks on the original lines which will be incorrect in case empty lines were removed.

Only issue to solve is to use the correct director interface in case multiple SciTE instances are running.

Jos

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

  • Developers

Uploaded Tidy v2.2.0.10 that will reload the Bookmark after tidy is completed.

What it will do is the following:

1. savesession: to %temp%\tidyscite.session

2. replace the original file with the tidied file

3. SciTE Revert command to force the reload of the file.

4. Read the saved bookmarks and add these back.

2 remarks:

1. When there are multiple instances of SciTE then the commands will be send to the first found SciTE director window which could mean the bookmarks get lost.

2. when lines are removed by tidy due to the /REM option, the bookmark will be on the wrong line for those bookmark located after removed lines.

Give it a try to see if that works for you too.

Jos

Edited by Jos

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

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

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