NegativeNrG Posted March 18, 2006 Share Posted March 18, 2006 Is it possible to Execute the inputted code in an editbox? aE. Scite's 'Beta Run' will Run the Code in the Editbox. [size=20]My File Upload[/size]Register at my site and upload. Link to comment Share on other sites More sharing options...
death pax Posted March 18, 2006 Share Posted March 18, 2006 (edited) yes. #include <GUIConstants.au3> dim $EditContents $Form1 = GUICreate("Edit Box Code", 488, 441, 192, 125) $Edit1 = GUICtrlCreateEdit("", 8, 8, 473, 377) $Button1 = GUICtrlCreateButton("Execute Code", 144, 400, 225, 33, 0) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Button1 $EditContents=GuiCtrlRead($Edit1) $EditContents=$EditContents&@CRLF $handle=FileOpen(@TempDir&"\Code.au3",10) FileWrite($handle,$EditContents) FileClose($handle) sleep(50) Run('"'&@ScriptFullPath&'" /AutoIt3ExecuteScript "'&@TempDir&'\Code.Au3"') Case Else ;;;;;;; EndSelect WEnd Exit Note: this code has to be compiled to exe form before you can use it One of the nice functions of Autoit is the fact that you can use any compiled exe the same way you can use autoit3.exe for executing a single line of code, see the "/AutoIt3ExecuteLine" switch in the help file Edited March 18, 2006 by death pax Link to comment Share on other sites More sharing options...
NegativeNrG Posted March 18, 2006 Author Share Posted March 18, 2006 Hey, Thanks alot Death. IT Does seem to work. [size=20]My File Upload[/size]Register at my site and upload. Link to comment Share on other sites More sharing options...
death pax Posted March 18, 2006 Share Posted March 18, 2006 no problem ^.^ Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now