Kolesnikoff Posted April 14, 2009 Posted April 14, 2009 (edited) #include <GUIConstants.au3> $Form2 = GUICreate("Dialog", 316, 111, 347, 263) GUISetIcon("D:\003.ico") $GroupBox1 = GUICtrlCreateGroup("", 8, 1, 297, 65) $Text = GUICtrlCreateInput("Enter some text here...", 56, 24, 193, 21) GUICtrlCreateGroup("", -99, -99, 1, 1) $Button1 = GUICtrlCreateButton("&Create", 113, 75, 75, 25, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd There is a GUI interface to input the variable $ Text. After clicking on "Create", to create a new EXE file with a given variable $ Text:$OP=FileOpen ( "textfile.txt", 1) FileWriteLine ( $OP, $Text) FileClose ($OP) As a result, we get an EXE file, after the implementation of which will create a text file with the entered text. Now it is "Enter some text here..." How is it implemented? Edited April 14, 2009 by Kolesnikoff
Uten Posted April 14, 2009 Posted April 14, 2009 (edited) To me this does not make any sense as described.Do you want to modify the existing exe or create a new one? Do you want to write out a script and use aut2exe to create a new exe? Or do you want to skip au2exe and create a binary thing containing information from $text?Maybe this old topic is what your after?EDIT: Just checked the topic again and to my surprise the code is waked? Is this just my problem or is it common to the rest of you? Edited April 14, 2009 by Uten Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
Kolesnikoff Posted April 14, 2009 Author Posted April 14, 2009 (edited) Do you want to modify the existing exe or create a new one?Create a new oneDo you want to write out a script and use aut2exe to create a new exe?write out a script and use other script with GUI interface to create a new exe with this code:$OP=FileOpen ( "textfile.txt", 1)FileWriteLine ( $OP, $Text) //$Text is appropriated some text. Default is "Enter some text here..."FileClose ($OP) Edited April 14, 2009 by Kolesnikoff
Uten Posted April 14, 2009 Posted April 14, 2009 Just analyse the output you get in scite when compiling a script and then do the same from your application. Your call in RunWait(...) should be something like this: F:\portableapps\devtools\scite\..\autoit-v3.3.0.0\aut2exe\aut2exe.exe /in "E:\DOCUME~1\UTENNA~1\LOCALS~1\Temp\newexe.au3" /out "F:\newexe.exe" /comp 2 /pack /Bin E:\DOCUME~1\UTENNA~1\LOCALS~1\Temp\AutoItSC.bin Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling
zorphnog Posted April 14, 2009 Posted April 14, 2009 Why do you need a separate .exe for each input? It would be much easier to just create one .exe that accepts a command line argument. Then the GUI, can just create a shortcut with the specified text as the .exe command line argument.
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