Sign in to follow this  
Followers 0
LuxiVDN

Include source after copmpiling

8 posts in this topic

hi,

Is it possible to add code after compiling script? I think like that:

; Some functions

; download from web new code or include from other file another file, which could subsequently change

Exit

sory for my English

Share this post


Link to post
Share on other sites



how? ;)

Share this post


Link to post
Share on other sites

let's say you wanna put your code in a text file called 'Test.txt'

Test()

Func Test()

MsgBox(0,'Msg Title','Hello')

EndFunc

To run the code in Test.txt use this

$TextFile = "Test.txt"
RunWait('"' & @AutoItExe & '" /AutoIt3ExecuteScript ' & $TextFile)

You have to see Running Scripts in the help file

1 person likes this

Share this post


Link to post
Share on other sites

Hi, LuxiVDN. This is how I do it, in case I do something stupid and delete my source (not that that ever happens) ;) Using this method, the source file only gets put onto the machine when you want it, not every time you run the script.

You can make the switch for your command line anything you would like. In this case, if you execute "MySource.exe" /Extract from the Run line, it will extract the source code and then exit without actually running through the script.

If StringInStr($cmdlineRaw, "/Extract") Then
    FileInstall("C:MySource.au3", @TempDir & "MySource.au3", 1)
    Exit
EndIf
3 people like this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

This is how I do it, in case I do something stupid and delete my source (not that that ever happens) Posted Image Using this method, the source file only gets put onto the machine when you want it, not every time you run the script.

OUT-FREEKING-STANDING!!!! Time to go hunt up all my old source code and recompile it all using this method! This should be added to the WIKI or something (then again, maybe it's already there and I just haven't seen it until now).


Whenever someone says "pls" because it's shorter than "please", I say "no" because it's shorter than "yes".

Share this post


Link to post
Share on other sites

Hi guys,

Is there a way to include all source file without specifying thme one by one ?

Share this post


Link to post
Share on other sites

Hi guys,

Is there a way to include all source file without specifying thme one by one ?

How about putting them in a zip folder? This could even be beneficial because you could encrpyt and password protect it.


RAID Calculator | Software Installer

The truth has been suppressed since the dawn of time.

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