njscorpion Posted September 16, 2009 Posted September 16, 2009 hi all,i was trying to implement OnAutoItExit () functionthe following is my script:Opt("OnExitFunc","_beforeExiting") sleep(5000) Func _beforeExiting() Switch @exitMethod Case 0 ;Natural closing. MsgBox(0,"Exit Method",@exitMethod) Case 1 ;close by Exit function. MsgBox(0,"Exit Method",@exitMethod) Case 2 ;close by clicking on exit of the systray. MsgBox(0,"Exit Method",@exitMethod) Case 3 ;close by user logoff. MsgBox(0,"Exit Method",@exitMethod) Case 4 ;close by Windows shutdown. MsgBox(0,"Exit Method",@exitMethod) Case Else MsgBox(0,"Exit Method","Unknown") EndSwitch EndFuncwhen i use SciTe Editor for execution it works well, but when i right click and execute or compile it to exe and run it throws an exceptionRight-click Execute:EXE Error:Am i doing something wrong?
jvanegmond Posted September 16, 2009 Posted September 16, 2009 Check the version of AutoIt that you are using. It is possible that SciTe uses the beta and when you run it is run as release. github.com/jvanegmond
njscorpion Posted September 17, 2009 Author Posted September 17, 2009 (edited) Check the version of AutoIt that you are using. It is possible that SciTe uses the beta and when you run it is run as release.thanks for ur reply.after your reply i tried compiling the the exe using SciTe Editor and the out put worked but how do i fix it? also how do i check which version is actually used to compile the exe, in SciTe i am using "Ctrl+F7" for Beta build it requires "Alt+F7". how do i set system default version? Edited September 17, 2009 by njscorpion
jvanegmond Posted September 17, 2009 Posted September 17, 2009 In your start menu under AutoIt\Beta\ there is a shortcut called "Toggle AU3 beta". You can click that to switch from beta to release or the other way. I suggest you just download the latest version of AutoIt anyway: The version you are using is from before v3.1.0 which was released on 7 February of 2005! To update AutoIt there is a nice tool called "Check For Updates" for updates, you can find it in your AutoIt folder... Or maybe you don't have the tool, because you're using such an old version.. In that case download the newest version from the AutoIt website. : ) github.com/jvanegmond
njscorpion Posted September 17, 2009 Author Posted September 17, 2009 ...is from before v3.1.0 ...i am actually using version 3.3.0.0thanks a lot
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