Sign in to follow this  
Followers 0
paule

Can I start a LUA script bevor the AutoIt compiled?

12 posts in this topic

Hello,

I will start a LUA Script when I pressed F5 or F7 in Scite editor.

How can I do that?

Regards Paule

Share this post


Link to post
Share on other sites



Hello,

I will start a LUA Script when I pressed F5 or F7 in Scite editor.

How can I do that?

Regards Paule

Read how the configure SciTE and review what we have done in the full SciTE4AutoIt3 installation. There are many examples there.

JOs


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

I have a lua script that change the string "|12 to "|00xx|" at the aktual LineNumber.

I have my lua script in the Scite menu und is have a hotkey. Often I forget in scite to press the hotkey when I compiled my AutoIt script. I will that the lua script started bevor the AutoIt script were compiled.

Can you give me a link to read the configuration of scite?

thanks paule

Share this post


Link to post
Share on other sites

http://www.scintilla.org/SciTEDoc.html

For more documentation. Download wscite and browse the included html documentations.


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

Share this post


Link to post
Share on other sites

here my au3.properties

# Commands to compile / run your script

command.go.$(au3)="$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "$(FilePath)" /autoit3dir "$(autoit3dir)" /UserParams $(1) $(2) $(3) $(4)

;command.go.$(au3)="$(autoit3dir)\autoit3.exe" /ErrorStdOut "$(FilePath)" $(1) $(2) $(3) $(4)

command.go.subsystem.$(au3)=1

command.compile.$(au3)="$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper_Gui.exe" /in "$(FilePath)"

command.compile.filter.$(au3)=1

command.build.$(au3)="$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper.exe" /prod /in "$(FilePath)" /autoit3dir "$(autoit3dir)"

command.build.filter.$(au3)=1

#~ #command.build.$(au3)="$(autoit3dir)\aut2exe\aut2exe.exe" /in "$(FilePath)"

where do I include the lua script bevor AutoIt3Wrapper.exe starts?

Share this post


Link to post
Share on other sites

Other than that you got the right properties file ... and the right section for adding additional tool command to scite for au3 files. For what you really want to do (as specified in your first message), You don't.

Keep reading that Scite documentation until you hit the 'ext.lua.*' section. And after digesting that continue with the additional document links in that section.

Than try to do a test run that will only run your lua script, from the tools menu, on the current au3 file.


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

Share this post


Link to post
Share on other sites

I have a lua script in scite for AutoIt.

Here the lua script.

function TraceLineNumber()

for m in editor:match("\"|[0-9]*|",SCFIND_REGEXP,0) do

local LineNumber = editor:LineFromPosition(m.pos)+1

if LineNumber < 10 then

LineNumber = "000"..LineNumber

elseif LineNumber < 100 then

LineNumber = "00"..LineNumber

elseif LineNumber < 1000 then

LineNumber = "0"..LineNumber

end

m:replace("\"|"..LineNumber.."|")

end

print("Ich habe fertig")

end

In SciTEStartup.lua I have added the line

LoadLuaFile("TraceLineNumber.lua") -- suche "|12| und ersetze durch akuelle Zeilennummer ==> "|0015|

In SciTEUser.properties I have added

# 34 Zeilenummern ersetzen

command.name.34.$(au3)=ZeilenNummer ersetzen

command.subsystem.34.$(au3)=3

command.34.$(au3)=InvokeTool TraceLineNumber

command.save.before.34.$(au3)=2

command.shortcut.34.$(au3)=Shift+Ctrl+Z

Once more:

I will bevor my AutoIt were compiled that the lua script "TraceLineNumber.lua" will be execute

I have read the documentation. I will not compile a lua script!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Ok. (Now here I getting on unfamiliar terrain. But Lua guru's around here might correct any BS on my part.)

Next step is to make a additional lua function that 1) will run your script on the document in question, And 2) that will run AutoIt3Wrapper after it.

Problem 1

To pass the needed AutoIt3Wrapper options you probably would use something like this

bcommand.34=InvokeTool TraceLineNumber_and_AutoIt3Wrapper /prod "$(FilePath)" ...

(don't forget the "$(SciteDefaultHome)\AutoIt3Wrapper\AutoIt3Wrapper_Gui.exe" part.)

(browse relevant AutoIt-Lua functions for parameter use.)

Problem 2

Running AutoIt3Wrapper from Lua.

Probably done with Lua os.execute command. (But I'm not sure as I have never used that one yet.)

Thats probably as far as I can help you. GL

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

Share this post


Link to post
Share on other sites

Read how the configure SciTE and review what we have done in the full SciTE4AutoIt3 installation. There are many examples there.

JOs

For my problem you wrote: "here are many examples there."

Can you give me a link?

Thanks Paule

Share this post


Link to post
Share on other sites

For my problem you wrote: "here are many examples there."

Can you give me a link?

Thanks Paule

in au3.properties you find this section:

# Standard LUA Functions

There you will find all LUA funcs we use.

All LUA files containing these Funcs can ve found in the LUA subdirectory.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

in au3.properties you find this section:

# Standard LUA Functions

There you will find all LUA funcs we use.

All LUA files containing these Funcs can ve found in the LUA subdirectory.

Jos

I thing you don't not read topic.

there was no lua script that startet when the the AutoIt script was compiled.

Sorry for my question.

Regards paule

Share this post


Link to post
Share on other sites

I thing you don't not read topic.

there was no lua script that startet when the the AutoIt script was compiled.

.. or I read it but didn't understand which seem to be a likely option in this case.

I understood you wanted to stat a LUA script when you hit F5 on an AutoIt3 file.... so what did you mean to ask?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0