CsM33 Posted September 19, 2006 Share Posted September 19, 2006 I wrote a script that works fine when I right click the file and hit run script, however when I compile it to an exe it does absolutely nothing when I click it. Link to comment Share on other sites More sharing options...
CoderDunn Posted September 19, 2006 Share Posted September 19, 2006 If you posted the code, then someone might be able to help you. Maybe you need to reinstall AutoIt3? Hallman Link to comment Share on other sites More sharing options...
CsM33 Posted September 19, 2006 Author Share Posted September 19, 2006 (edited) expandcollapse popupRun("notepad.exe") WinWaitActive("Untitled - Notepad") Send("DO NOT TOUCH YOUR MOUSE OR KEYBOARD AS THIS WILL DAMAGE THE INSTALLATION.") Send("{Enter}") Sleep(1000) Send("THIS IS A REMINDER WHICH WILL CLOSE.") Send("{Enter}") Sleep(1000) Send("YOUR INSTALLATION WILL BEGIN AUTOMATICALLY.") Send("{Enter}") Send("HOWEVER IF YOU MOVE YOUR MOUSE OR PRESS ANY KEYS") Send("{Enter}") Send("THE INSTALLATION WILL BE DAMAGED!") Send("{Enter 3}") Sleep(3000) Send("THE INSTALLATION WILL BEGIN ANY SECOND") Sleep(5000) WinClose("Untitled - Notepad") WinWaitActive("Notepad", "The text in the Untitled file has changed") Send("!y") WinWaitActive("Save") Send("{TAB 7}") Send("{Down 2}") Send("{Enter}") Send("{Tab 2}") Sleep(100) Send("installLOG") Send("{Enter}") Sleep(1500) Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("@Echo Off") Send("{ENTER}") Send("Msg * Hey Jared. This is chris and it looks like you restarted your computer!") Send("{ENTER}") Send("exit"} WinClose("Untitled - Notepad") Send("!y") WinWaitActive("Save") Send("{TAB 5}") Send("{DOWN 4}") Send("{Enter}") Send("{TAB 3}") Send("W") Send("{Enter}") Send("{Down}") Send("S") Send("y") Send("{Enter}") Send("{Tab}") Send("msbatchbb.bat") Send("{Tab}") Send("{Down 2}") Send("{Enter 2}") It's basically a fake installer. But it makes a batch program that I will put into his startup that gives him the message every time he restarts. Edited September 19, 2006 by CsM33 Link to comment Share on other sites More sharing options...
CoderDunn Posted September 19, 2006 Share Posted September 19, 2006 (edited) Try adding this at the top of your script then compile it. MsgBox(0,"","The compiled script ran.") See if it displays the msg. The code doesn't seem to have errors. Spoke to soon ... Line 36 has a bracket to end the function instead of a parenthese Edited September 19, 2006 by Hallman Link to comment Share on other sites More sharing options...
CsM33 Posted September 19, 2006 Author Share Posted September 19, 2006 No. I added that code and still nothing happens. What could be the problem? Link to comment Share on other sites More sharing options...
CoderDunn Posted September 20, 2006 Share Posted September 20, 2006 Seems like the compiler is broke. Try reinstalling AutoIt Link to comment Share on other sites More sharing options...
taurus905 Posted September 20, 2006 Share Posted September 20, 2006 CsM33,Send("exit"}Should be: Send("exit")taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 20, 2006 Moderators Share Posted September 20, 2006 @taurus... ... Do you mean Send("{ENTER}")? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
CoderDunn Posted September 20, 2006 Share Posted September 20, 2006 (edited) But even with that errror it wouldn't make the compiled script do nothing. It would say "Script Error Line 36". Edited September 20, 2006 by Hallman Link to comment Share on other sites More sharing options...
CsM33 Posted September 20, 2006 Author Share Posted September 20, 2006 I just re-installed autoit and still nothing happened. It works fine when I right click and run the script. But when I make it an exe it doesn't do shit. Link to comment Share on other sites More sharing options...
CsM33 Posted September 20, 2006 Author Share Posted September 20, 2006 @taurus... ... Do you mean Send("{ENTER}")? No. I want it to type the word exit. Link to comment Share on other sites More sharing options...
CoderDunn Posted September 20, 2006 Share Posted September 20, 2006 (edited) Well i have no idea what the problem is but ... To make your script much better look into BlockInput(), and FileWrite() in the AutoIt helpfile. Edited September 20, 2006 by Hallman Link to comment Share on other sites More sharing options...
CsM33 Posted September 20, 2006 Author Share Posted September 20, 2006 It has to be something with the code. I just made one with a run("notepad.exe") and saved it, compiled it, and it works fine... Link to comment Share on other sites More sharing options...
taurus905 Posted September 20, 2006 Share Posted September 20, 2006 I just re-installed autoit and still nothing happened. It works fine when I right click and run the script. But when I make it an exe it doesn't do shit.CsM33,It runs fine for me in script or compiled.I am no expert, but I would reinstall SciTE also.taurus905 "Never mistake kindness for weakness."-- Author Unknown --"The highest point to which a weak but experienced mind can rise is detecting the weakness of better men."-- Georg Lichtenberg --Simple Obfuscator (Beta not needed.), Random names for Vars and Funcs Link to comment Share on other sites More sharing options...
CoderDunn Posted September 20, 2006 Share Posted September 20, 2006 A little advice ... Your whole script can be summed up to one line. FileWrite("SAVE PATH\msbatchbb.bat","@Echo Off" & @CRLF & "Msg * Hey Jared. This is chris and it looks like you restarted your computer!" & @CRLF & "exit") Replace SAVE PATH with where you want to save it. If you want to have a message saying it's gonna install, add a MsgBox() to the top. Hallman Link to comment Share on other sites More sharing options...
Uten Posted September 20, 2006 Share Posted September 20, 2006 CsM33 When you rightclick you compiled exe and select properties Then version what does it say? On my system I get File Version: 3.2.0.1 (it's a while since that one was compiled ) 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 Link to comment Share on other sites More sharing options...
Confuzzled Posted September 24, 2006 Share Posted September 24, 2006 Chris: Maybe Jared got to your computer/compiler before you got to his! What you are doing does not appear to be kosher. 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