Jump to content



Photo

Include source after copmpiling


  • Please log in to reply
7 replies to this topic

#1 LuxiVDN

LuxiVDN

    Seeker

  • Normal Members
  • 2 posts

Posted 08 April 2012 - 05:37 PM

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







#2 DCCD

DCCD

    DCCD+

  • Active Members
  • PipPipPipPipPipPip
  • 340 posts

Posted 08 April 2012 - 05:54 PM

Yes, you can do that.

#3 LuxiVDN

LuxiVDN

    Seeker

  • Normal Members
  • 2 posts

Posted 08 April 2012 - 06:16 PM

how? ;)

#4 DCCD

DCCD

    DCCD+

  • Active Members
  • PipPipPipPipPipPip
  • 340 posts

Posted 08 April 2012 - 06:38 PM

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
  • Fubarable likes this

#5 JLogan3o13

JLogan3o13

    Down to 98

  • MVPs
  • 2,114 posts

Posted 09 April 2012 - 02:52 PM

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

  • JohnQSmith likes this
J.I spent 10 minutes reviewing code and thinking "What kind of drugs is this guy on?" before realizing it was something I wrote.My Scripts:Include Source with Compiled Script, Disk Maintenance for Windows XP, "Deal-A-Day" Sites, SCCM 2007 Front End, Windows Firewall UDF

#6 JohnQSmith

JohnQSmith

    Polymath

  • Active Members
  • PipPipPipPip
  • 226 posts

Posted 09 April 2012 - 03:24 PM

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

#7 gillesg

gillesg

    Seeker

  • Active Members
  • 16 posts

Posted 27 June 2012 - 07:53 PM

Hi guys,

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

#8 abberration

abberration

    Prodigy

  • Active Members
  • PipPipPip
  • 183 posts

Posted 27 June 2012 - 08:02 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users